{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/40602179","id":40602179,"diff_hunk":"@@ -0,0 +1,51 @@\n+/**\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements.  See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * the License.  You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ **/\n+\n+package org.apache.kafka.common.cache;\n+\n+/**\n+ * Wrapper for caches that adds simple synchronization to provide a thread-safe cache. Note that this simply adds\n+ * synchronization around each cache method on the underlying unsynchronized cache. It does not add any support for\n+ * atomically checking for existence of an entry and computing and inserting the value if it is missing.\n+ */\n+public class SynchronizedCache<K, V> implements Cache<K, V> {\n+    private Cache<K, V> underlying;","path":"clients/src/main/java/org/apache/kafka/common/cache/SynchronizedCache.java","position":null,"original_position":26,"commit_id":"363121db176a3e5b39f00caa1706e5481efe41ad","original_commit_id":"b828c60ee1905c8b98ffef1bc48a429439be09fd","user":{"login":"ewencp","id":47366,"avatar_url":"https://avatars.githubusercontent.com/u/47366?v=3","gravatar_id":"","url":"https://api.github.com/users/ewencp","html_url":"https://github.com/ewencp","followers_url":"https://api.github.com/users/ewencp/followers","following_url":"https://api.github.com/users/ewencp/following{/other_user}","gists_url":"https://api.github.com/users/ewencp/gists{/gist_id}","starred_url":"https://api.github.com/users/ewencp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewencp/subscriptions","organizations_url":"https://api.github.com/users/ewencp/orgs","repos_url":"https://api.github.com/users/ewencp/repos","events_url":"https://api.github.com/users/ewencp/events{/privacy}","received_events_url":"https://api.github.com/users/ewencp/received_events","type":"User","site_admin":false},"body":"Fixed","created_at":"2015-09-28T20:37:30Z","updated_at":"2015-09-28T20:37:30Z","html_url":"https://github.com/apache/kafka/pull/250#discussion_r40602179","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/250","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/40602179"},"html":{"href":"https://github.com/apache/kafka/pull/250#discussion_r40602179"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/250"}}},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/250","id":46125201,"html_url":"https://github.com/apache/kafka/pull/250","diff_url":"https://github.com/apache/kafka/pull/250.diff","patch_url":"https://github.com/apache/kafka/pull/250.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/250","number":250,"state":"open","locked":false,"title":"KAFKA-2474: Add caching of JSON schema conversions to JsonConverter.","user":{"login":"ewencp","id":47366,"avatar_url":"https://avatars.githubusercontent.com/u/47366?v=3","gravatar_id":"","url":"https://api.github.com/users/ewencp","html_url":"https://github.com/ewencp","followers_url":"https://api.github.com/users/ewencp/followers","following_url":"https://api.github.com/users/ewencp/following{/other_user}","gists_url":"https://api.github.com/users/ewencp/gists{/gist_id}","starred_url":"https://api.github.com/users/ewencp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewencp/subscriptions","organizations_url":"https://api.github.com/users/ewencp/orgs","repos_url":"https://api.github.com/users/ewencp/repos","events_url":"https://api.github.com/users/ewencp/events{/privacy}","received_events_url":"https://api.github.com/users/ewencp/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-28T06:57:57Z","updated_at":"2015-09-28T20:37:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d9ef22e7096e73486a455ad68efebd71a196292","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/250/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/250/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/250/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/363121db176a3e5b39f00caa1706e5481efe41ad","head":{"label":"ewencp:kafka-2474-cache-json-schema-conversions","ref":"kafka-2474-cache-json-schema-conversions","sha":"363121db176a3e5b39f00caa1706e5481efe41ad","user":{"login":"ewencp","id":47366,"avatar_url":"https://avatars.githubusercontent.com/u/47366?v=3","gravatar_id":"","url":"https://api.github.com/users/ewencp","html_url":"https://github.com/ewencp","followers_url":"https://api.github.com/users/ewencp/followers","following_url":"https://api.github.com/users/ewencp/following{/other_user}","gists_url":"https://api.github.com/users/ewencp/gists{/gist_id}","starred_url":"https://api.github.com/users/ewencp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewencp/subscriptions","organizations_url":"https://api.github.com/users/ewencp/orgs","repos_url":"https://api.github.com/users/ewencp/repos","events_url":"https://api.github.com/users/ewencp/events{/privacy}","received_events_url":"https://api.github.com/users/ewencp/received_events","type":"User","site_admin":false},"repo":{"id":31331021,"name":"kafka","full_name":"ewencp/kafka","owner":{"login":"ewencp","id":47366,"avatar_url":"https://avatars.githubusercontent.com/u/47366?v=3","gravatar_id":"","url":"https://api.github.com/users/ewencp","html_url":"https://github.com/ewencp","followers_url":"https://api.github.com/users/ewencp/followers","following_url":"https://api.github.com/users/ewencp/following{/other_user}","gists_url":"https://api.github.com/users/ewencp/gists{/gist_id}","starred_url":"https://api.github.com/users/ewencp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewencp/subscriptions","organizations_url":"https://api.github.com/users/ewencp/orgs","repos_url":"https://api.github.com/users/ewencp/repos","events_url":"https://api.github.com/users/ewencp/events{/privacy}","received_events_url":"https://api.github.com/users/ewencp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ewencp/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/ewencp/kafka","forks_url":"https://api.github.com/repos/ewencp/kafka/forks","keys_url":"https://api.github.com/repos/ewencp/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ewencp/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ewencp/kafka/teams","hooks_url":"https://api.github.com/repos/ewencp/kafka/hooks","issue_events_url":"https://api.github.com/repos/ewencp/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/ewencp/kafka/events","assignees_url":"https://api.github.com/repos/ewencp/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/ewencp/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/ewencp/kafka/tags","blobs_url":"https://api.github.com/repos/ewencp/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ewencp/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ewencp/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/ewencp/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ewencp/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/ewencp/kafka/languages","stargazers_url":"https://api.github.com/repos/ewencp/kafka/stargazers","contributors_url":"https://api.github.com/repos/ewencp/kafka/contributors","subscribers_url":"https://api.github.com/repos/ewencp/kafka/subscribers","subscription_url":"https://api.github.com/repos/ewencp/kafka/subscription","commits_url":"https://api.github.com/repos/ewencp/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/ewencp/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/ewencp/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/ewencp/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/ewencp/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/ewencp/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ewencp/kafka/merges","archive_url":"https://api.github.com/repos/ewencp/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ewencp/kafka/downloads","issues_url":"https://api.github.com/repos/ewencp/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/ewencp/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/ewencp/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/ewencp/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ewencp/kafka/labels{/name}","releases_url":"https://api.github.com/repos/ewencp/kafka/releases{/id}","created_at":"2015-02-25T19:10:48Z","updated_at":"2015-02-25T19:10:51Z","pushed_at":"2015-09-28T19:36:28Z","git_url":"git://github.com/ewencp/kafka.git","ssh_url":"git@github.com:ewencp/kafka.git","clone_url":"https://github.com/ewencp/kafka.git","svn_url":"https://github.com/ewencp/kafka","homepage":null,"size":22599,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"0.8.2"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"c7bc5366dd874bf956873ba0f60c2c2820052fb3","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":2211243,"name":"kafka","full_name":"apache/kafka","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/kafka","description":"Mirror of Apache Kafka","fork":false,"url":"https://api.github.com/repos/apache/kafka","forks_url":"https://api.github.com/repos/apache/kafka/forks","keys_url":"https://api.github.com/repos/apache/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/kafka/teams","hooks_url":"https://api.github.com/repos/apache/kafka/hooks","issue_events_url":"https://api.github.com/repos/apache/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/apache/kafka/events","assignees_url":"https://api.github.com/repos/apache/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/apache/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/apache/kafka/tags","blobs_url":"https://api.github.com/repos/apache/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/kafka/languages","stargazers_url":"https://api.github.com/repos/apache/kafka/stargazers","contributors_url":"https://api.github.com/repos/apache/kafka/contributors","subscribers_url":"https://api.github.com/repos/apache/kafka/subscribers","subscription_url":"https://api.github.com/repos/apache/kafka/subscription","commits_url":"https://api.github.com/repos/apache/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/apache/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/kafka/merges","archive_url":"https://api.github.com/repos/apache/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/kafka/downloads","issues_url":"https://api.github.com/repos/apache/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/apache/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/kafka/labels{/name}","releases_url":"https://api.github.com/repos/apache/kafka/releases{/id}","created_at":"2011-08-15T18:06:16Z","updated_at":"2015-09-28T15:45:36Z","pushed_at":"2015-09-28T19:36:29Z","git_url":"git://github.com/apache/kafka.git","ssh_url":"git@github.com:apache/kafka.git","clone_url":"https://github.com/apache/kafka.git","svn_url":"https://github.com/apache/kafka","homepage":null,"size":33362,"stargazers_count":1968,"watchers_count":1968,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1183,"mirror_url":"git://git.apache.org/kafka.git","open_issues_count":92,"forks":1183,"open_issues":92,"watchers":1968,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/250"},"html":{"href":"https://github.com/apache/kafka/pull/250"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/250"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/250/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/250/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/250/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/363121db176a3e5b39f00caa1706e5481efe41ad"}}}}