{"action":"created","comment":{"url":"https://api.github.com/repos/geoserver/geoserver/pulls/comments/29092159","id":29092159,"diff_hunk":"@@ -0,0 +1,42 @@\n+package org.geoserver.cluster.hazelcast;\n+\n+import java.util.logging.Level;\n+import java.util.logging.Logger;\n+\n+import org.geoserver.platform.ExtensionFilter;\n+import org.geoserver.util.CacheProvider;\n+import org.geotools.util.logging.Logging;\n+\n+/**\n+ * Filter to exclude extensions that conflict with hz-cluster.\n+ * \n+ * @author Kevin Smith, Boundless\n+ *\n+ */\n+public class HzExtensionFilter implements ExtensionFilter {\n+    HzCluster cluster;\n+    \n+    protected static Logger LOGGER = Logging.getLogger(\"org.geoserver.cluster.hazelcast\");\n+    \n+    public HzExtensionFilter(HzCluster cluster) {\n+        this.cluster = cluster;\n+    }\n+    \n+    @Override\n+    public boolean exclude(String beanId, Object bean) {\n+        if(cluster.isEnabled()) {\n+            if((bean instanceof CacheProvider) && !(bean instanceof HzCacheProvider)) {\n+                // If another extension does this too then we're in trouble as only the default will be used.\n+                LOGGER.log(Level.INFO, \"hz-cluster module is supressing conflicting CacheProvider {0}\", new Object[]{beanId});","path":"src/community/hz-cluster/src/main/java/org/geoserver/cluster/hazelcast/HzExtensionFilter.java","position":30,"original_position":30,"commit_id":"10545db6e7ce50066df8921cb949c19cdd7d4cd2","original_commit_id":"10545db6e7ce50066df8921cb949c19cdd7d4cd2","user":{"login":"jodygarnett","id":629681,"avatar_url":"https://avatars.githubusercontent.com/u/629681?v=3","gravatar_id":"","url":"https://api.github.com/users/jodygarnett","html_url":"https://github.com/jodygarnett","followers_url":"https://api.github.com/users/jodygarnett/followers","following_url":"https://api.github.com/users/jodygarnett/following{/other_user}","gists_url":"https://api.github.com/users/jodygarnett/gists{/gist_id}","starred_url":"https://api.github.com/users/jodygarnett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodygarnett/subscriptions","organizations_url":"https://api.github.com/users/jodygarnett/orgs","repos_url":"https://api.github.com/users/jodygarnett/repos","events_url":"https://api.github.com/users/jodygarnett/events{/privacy}","received_events_url":"https://api.github.com/users/jodygarnett/received_events","type":"User","site_admin":false},"body":"This could probably be at CONFIG level as well.","created_at":"2015-04-24T22:50:20Z","updated_at":"2015-04-24T22:50:20Z","html_url":"https://github.com/geoserver/geoserver/pull/1026#discussion_r29092159","pull_request_url":"https://api.github.com/repos/geoserver/geoserver/pulls/1026","_links":{"self":{"href":"https://api.github.com/repos/geoserver/geoserver/pulls/comments/29092159"},"html":{"href":"https://github.com/geoserver/geoserver/pull/1026#discussion_r29092159"},"pull_request":{"href":"https://api.github.com/repos/geoserver/geoserver/pulls/1026"}}},"pull_request":{"url":"https://api.github.com/repos/geoserver/geoserver/pulls/1026","id":34089008,"html_url":"https://github.com/geoserver/geoserver/pull/1026","diff_url":"https://github.com/geoserver/geoserver/pull/1026.diff","patch_url":"https://github.com/geoserver/geoserver/pull/1026.patch","issue_url":"https://api.github.com/repos/geoserver/geoserver/issues/1026","number":1026,"state":"open","locked":false,"title":"GEOS-6994, Cache provider conflict resolution","user":{"login":"smithkm","id":2184425,"avatar_url":"https://avatars.githubusercontent.com/u/2184425?v=3","gravatar_id":"","url":"https://api.github.com/users/smithkm","html_url":"https://github.com/smithkm","followers_url":"https://api.github.com/users/smithkm/followers","following_url":"https://api.github.com/users/smithkm/following{/other_user}","gists_url":"https://api.github.com/users/smithkm/gists{/gist_id}","starred_url":"https://api.github.com/users/smithkm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smithkm/subscriptions","organizations_url":"https://api.github.com/users/smithkm/orgs","repos_url":"https://api.github.com/users/smithkm/repos","events_url":"https://api.github.com/users/smithkm/events{/privacy}","received_events_url":"https://api.github.com/users/smithkm/received_events","type":"User","site_admin":false},"body":"Resolve conflicts between CacheProviders by picking one and then logging a warning.  The user can specify priority with a system property.\r\n\r\nThis was tricky to test so i made some changes to unit testing support.\r\n\r\nI also added automatic conflict resolution for hz-cluster without the need for user action.\r\n\r\nSee: https://osgeo-org.atlassian.net/browse/GEOS-6994","created_at":"2015-04-24T21:46:26Z","updated_at":"2015-04-24T22:50:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"750949a4ed7fc409ef00749996aaffd89d90c94d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/geoserver/geoserver/pulls/1026/commits","review_comments_url":"https://api.github.com/repos/geoserver/geoserver/pulls/1026/comments","review_comment_url":"https://api.github.com/repos/geoserver/geoserver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geoserver/geoserver/issues/1026/comments","statuses_url":"https://api.github.com/repos/geoserver/geoserver/statuses/10545db6e7ce50066df8921cb949c19cdd7d4cd2","head":{"label":"geoserver:cache-provider","ref":"cache-provider","sha":"10545db6e7ce50066df8921cb949c19cdd7d4cd2","user":{"login":"geoserver","id":186522,"avatar_url":"https://avatars.githubusercontent.com/u/186522?v=3","gravatar_id":"","url":"https://api.github.com/users/geoserver","html_url":"https://github.com/geoserver","followers_url":"https://api.github.com/users/geoserver/followers","following_url":"https://api.github.com/users/geoserver/following{/other_user}","gists_url":"https://api.github.com/users/geoserver/gists{/gist_id}","starred_url":"https://api.github.com/users/geoserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoserver/subscriptions","organizations_url":"https://api.github.com/users/geoserver/orgs","repos_url":"https://api.github.com/users/geoserver/repos","events_url":"https://api.github.com/users/geoserver/events{/privacy}","received_events_url":"https://api.github.com/users/geoserver/received_events","type":"Organization","site_admin":false},"repo":{"id":2751199,"name":"geoserver","full_name":"geoserver/geoserver","owner":{"login":"geoserver","id":186522,"avatar_url":"https://avatars.githubusercontent.com/u/186522?v=3","gravatar_id":"","url":"https://api.github.com/users/geoserver","html_url":"https://github.com/geoserver","followers_url":"https://api.github.com/users/geoserver/followers","following_url":"https://api.github.com/users/geoserver/following{/other_user}","gists_url":"https://api.github.com/users/geoserver/gists{/gist_id}","starred_url":"https://api.github.com/users/geoserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoserver/subscriptions","organizations_url":"https://api.github.com/users/geoserver/orgs","repos_url":"https://api.github.com/users/geoserver/repos","events_url":"https://api.github.com/users/geoserver/events{/privacy}","received_events_url":"https://api.github.com/users/geoserver/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoserver/geoserver","description":"Official GeoServer repository","fork":false,"url":"https://api.github.com/repos/geoserver/geoserver","forks_url":"https://api.github.com/repos/geoserver/geoserver/forks","keys_url":"https://api.github.com/repos/geoserver/geoserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoserver/geoserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoserver/geoserver/teams","hooks_url":"https://api.github.com/repos/geoserver/geoserver/hooks","issue_events_url":"https://api.github.com/repos/geoserver/geoserver/issues/events{/number}","events_url":"https://api.github.com/repos/geoserver/geoserver/events","assignees_url":"https://api.github.com/repos/geoserver/geoserver/assignees{/user}","branches_url":"https://api.github.com/repos/geoserver/geoserver/branches{/branch}","tags_url":"https://api.github.com/repos/geoserver/geoserver/tags","blobs_url":"https://api.github.com/repos/geoserver/geoserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoserver/geoserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoserver/geoserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoserver/geoserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoserver/geoserver/statuses/{sha}","languages_url":"https://api.github.com/repos/geoserver/geoserver/languages","stargazers_url":"https://api.github.com/repos/geoserver/geoserver/stargazers","contributors_url":"https://api.github.com/repos/geoserver/geoserver/contributors","subscribers_url":"https://api.github.com/repos/geoserver/geoserver/subscribers","subscription_url":"https://api.github.com/repos/geoserver/geoserver/subscription","commits_url":"https://api.github.com/repos/geoserver/geoserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoserver/geoserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoserver/geoserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoserver/geoserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoserver/geoserver/contents/{+path}","compare_url":"https://api.github.com/repos/geoserver/geoserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoserver/geoserver/merges","archive_url":"https://api.github.com/repos/geoserver/geoserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoserver/geoserver/downloads","issues_url":"https://api.github.com/repos/geoserver/geoserver/issues{/number}","pulls_url":"https://api.github.com/repos/geoserver/geoserver/pulls{/number}","milestones_url":"https://api.github.com/repos/geoserver/geoserver/milestones{/number}","notifications_url":"https://api.github.com/repos/geoserver/geoserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoserver/geoserver/labels{/name}","releases_url":"https://api.github.com/repos/geoserver/geoserver/releases{/id}","created_at":"2011-11-10T19:56:06Z","updated_at":"2015-04-24T09:39:57Z","pushed_at":"2015-04-24T21:46:27Z","git_url":"git://github.com/geoserver/geoserver.git","ssh_url":"git@github.com:geoserver/geoserver.git","clone_url":"https://github.com/geoserver/geoserver.git","svn_url":"https://github.com/geoserver/geoserver","homepage":"http://geoserver.org","size":219000,"stargazers_count":388,"watchers_count":388,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":481,"mirror_url":null,"open_issues_count":15,"forks":481,"open_issues":15,"watchers":388,"default_branch":"master"}},"base":{"label":"geoserver:master","ref":"master","sha":"a9933fe10b5313785c64d1f2018a4e95d88bb5c1","user":{"login":"geoserver","id":186522,"avatar_url":"https://avatars.githubusercontent.com/u/186522?v=3","gravatar_id":"","url":"https://api.github.com/users/geoserver","html_url":"https://github.com/geoserver","followers_url":"https://api.github.com/users/geoserver/followers","following_url":"https://api.github.com/users/geoserver/following{/other_user}","gists_url":"https://api.github.com/users/geoserver/gists{/gist_id}","starred_url":"https://api.github.com/users/geoserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoserver/subscriptions","organizations_url":"https://api.github.com/users/geoserver/orgs","repos_url":"https://api.github.com/users/geoserver/repos","events_url":"https://api.github.com/users/geoserver/events{/privacy}","received_events_url":"https://api.github.com/users/geoserver/received_events","type":"Organization","site_admin":false},"repo":{"id":2751199,"name":"geoserver","full_name":"geoserver/geoserver","owner":{"login":"geoserver","id":186522,"avatar_url":"https://avatars.githubusercontent.com/u/186522?v=3","gravatar_id":"","url":"https://api.github.com/users/geoserver","html_url":"https://github.com/geoserver","followers_url":"https://api.github.com/users/geoserver/followers","following_url":"https://api.github.com/users/geoserver/following{/other_user}","gists_url":"https://api.github.com/users/geoserver/gists{/gist_id}","starred_url":"https://api.github.com/users/geoserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoserver/subscriptions","organizations_url":"https://api.github.com/users/geoserver/orgs","repos_url":"https://api.github.com/users/geoserver/repos","events_url":"https://api.github.com/users/geoserver/events{/privacy}","received_events_url":"https://api.github.com/users/geoserver/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoserver/geoserver","description":"Official GeoServer repository","fork":false,"url":"https://api.github.com/repos/geoserver/geoserver","forks_url":"https://api.github.com/repos/geoserver/geoserver/forks","keys_url":"https://api.github.com/repos/geoserver/geoserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoserver/geoserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoserver/geoserver/teams","hooks_url":"https://api.github.com/repos/geoserver/geoserver/hooks","issue_events_url":"https://api.github.com/repos/geoserver/geoserver/issues/events{/number}","events_url":"https://api.github.com/repos/geoserver/geoserver/events","assignees_url":"https://api.github.com/repos/geoserver/geoserver/assignees{/user}","branches_url":"https://api.github.com/repos/geoserver/geoserver/branches{/branch}","tags_url":"https://api.github.com/repos/geoserver/geoserver/tags","blobs_url":"https://api.github.com/repos/geoserver/geoserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoserver/geoserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoserver/geoserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoserver/geoserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoserver/geoserver/statuses/{sha}","languages_url":"https://api.github.com/repos/geoserver/geoserver/languages","stargazers_url":"https://api.github.com/repos/geoserver/geoserver/stargazers","contributors_url":"https://api.github.com/repos/geoserver/geoserver/contributors","subscribers_url":"https://api.github.com/repos/geoserver/geoserver/subscribers","subscription_url":"https://api.github.com/repos/geoserver/geoserver/subscription","commits_url":"https://api.github.com/repos/geoserver/geoserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoserver/geoserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoserver/geoserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoserver/geoserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoserver/geoserver/contents/{+path}","compare_url":"https://api.github.com/repos/geoserver/geoserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoserver/geoserver/merges","archive_url":"https://api.github.com/repos/geoserver/geoserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoserver/geoserver/downloads","issues_url":"https://api.github.com/repos/geoserver/geoserver/issues{/number}","pulls_url":"https://api.github.com/repos/geoserver/geoserver/pulls{/number}","milestones_url":"https://api.github.com/repos/geoserver/geoserver/milestones{/number}","notifications_url":"https://api.github.com/repos/geoserver/geoserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoserver/geoserver/labels{/name}","releases_url":"https://api.github.com/repos/geoserver/geoserver/releases{/id}","created_at":"2011-11-10T19:56:06Z","updated_at":"2015-04-24T09:39:57Z","pushed_at":"2015-04-24T21:46:27Z","git_url":"git://github.com/geoserver/geoserver.git","ssh_url":"git@github.com:geoserver/geoserver.git","clone_url":"https://github.com/geoserver/geoserver.git","svn_url":"https://github.com/geoserver/geoserver","homepage":"http://geoserver.org","size":219000,"stargazers_count":388,"watchers_count":388,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":481,"mirror_url":null,"open_issues_count":15,"forks":481,"open_issues":15,"watchers":388,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geoserver/geoserver/pulls/1026"},"html":{"href":"https://github.com/geoserver/geoserver/pull/1026"},"issue":{"href":"https://api.github.com/repos/geoserver/geoserver/issues/1026"},"comments":{"href":"https://api.github.com/repos/geoserver/geoserver/issues/1026/comments"},"review_comments":{"href":"https://api.github.com/repos/geoserver/geoserver/pulls/1026/comments"},"review_comment":{"href":"https://api.github.com/repos/geoserver/geoserver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geoserver/geoserver/pulls/1026/commits"},"statuses":{"href":"https://api.github.com/repos/geoserver/geoserver/statuses/10545db6e7ce50066df8921cb949c19cdd7d4cd2"}}}}