{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments/45305864","id":45305864,"diff_hunk":"@@ -0,0 +1,59 @@\n+/*\n+*  Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n+*\n+*  WSO2 Inc. licenses this file to you under the Apache License,\n+*  Version 2.0 (the \"License\"); you may not use this file except\n+*  in compliance with the License.\n+*  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,\n+* software distributed under the License is distributed on an\n+* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+* KIND, either express or implied.  See the License for the\n+* specific language governing permissions and limitations\n+* under the License.\n+*/\n+\n+package org.wso2.carbon.apimgt.impl.utils;\n+\n+import org.apache.axis2.clustering.ClusteringAgent;\n+import org.apache.axis2.clustering.ClusteringFault;\n+import org.apache.commons.logging.Log;\n+import org.apache.commons.logging.LogFactory;\n+\n+import org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder;\n+\n+/**\n+ * This class contains the functions to update stat publishing in Store-Publisher domain\n+ */\n+public class StatUpdateStorePublisherDomain {\n+\n+    private static final Log log = LogFactory.getLog(StatUpdateStorePublisherDomain.class);\n+\n+    /**\n+     * This method updates the stat publishing status in Store-Publisher domain by using a cluster message\n+     *\n+     * @param statUpdateStatus status of the stat publishing state\n+     */\n+    public void updateStatsPublishStore(boolean statUpdateStatus) {\n+\n+        log.debug(\"Started updating Stats publishing status to : \" + statUpdateStatus);\n+\n+        ClusteringAgent clusteringAgent = ServiceReferenceHolder.getContextService().getServerConfigContext().\n+                                            getAxisConfiguration().getClusteringAgent();\n+\n+        if (clusteringAgent != null) {\n+            //changing stat publishing status at other nodes via a cluster message\n+            try {\n+                clusteringAgent.sendMessage(new StatUpdateClusterMessage(statUpdateStatus), true);\n+            } catch (ClusteringFault clusteringFault) {\n+                //error is only logged because initially gateway has modified the status\n+                log.error(\"Failed to send cluster message to Publisher/Store domain \" +\n+                        \"and update stats publishing status.\");\n+            }\n+            log.debug(\"Successfully updated Stats publishing status to : \" + statUpdateStatus);","path":"components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/StatUpdateStorePublisherDomain.java","position":56,"original_position":56,"commit_id":"8de8e03cc4d5f592215b2f4f551efaea80bce371","original_commit_id":"8de8e03cc4d5f592215b2f4f551efaea80bce371","user":{"login":"chamindias","id":8359365,"avatar_url":"https://avatars.githubusercontent.com/u/8359365?v=3","gravatar_id":"","url":"https://api.github.com/users/chamindias","html_url":"https://github.com/chamindias","followers_url":"https://api.github.com/users/chamindias/followers","following_url":"https://api.github.com/users/chamindias/following{/other_user}","gists_url":"https://api.github.com/users/chamindias/gists{/gist_id}","starred_url":"https://api.github.com/users/chamindias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chamindias/subscriptions","organizations_url":"https://api.github.com/users/chamindias/orgs","repos_url":"https://api.github.com/users/chamindias/repos","events_url":"https://api.github.com/users/chamindias/events{/privacy}","received_events_url":"https://api.github.com/users/chamindias/received_events","type":"User","site_admin":false},"body":"Please note this \"StatUpdateStorePublisherDomain\" class has been removed and the methods are included in \"APIProviderImpl\". In APIProviderImpl, log.isDebugEnabled() is checked.\r\nPlease refer : https://github.com/wso2/carbon-apimgt/commit/4df13636996d6ffab9a90a0a5ff9dca53c2e04e8 (removing class and relocating methods) and https://github.com/wso2/carbon-apimgt/commit/14ad7f3bee29148abf11916998e284fa70d59fcb (check debug option)","created_at":"2015-11-19T06:14:24Z","updated_at":"2015-11-19T06:14:24Z","html_url":"https://github.com/wso2/carbon-apimgt/pull/907#discussion_r45305864","pull_request_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/907","_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments/45305864"},"html":{"href":"https://github.com/wso2/carbon-apimgt/pull/907#discussion_r45305864"},"pull_request":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/907"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/907","id":42556397,"html_url":"https://github.com/wso2/carbon-apimgt/pull/907","diff_url":"https://github.com/wso2/carbon-apimgt/pull/907.diff","patch_url":"https://github.com/wso2/carbon-apimgt/pull/907.patch","issue_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/907","number":907,"state":"closed","locked":false,"title":"Fixing JIRA: https://wso2.org/jira/browse/APIMANAGER-3963","user":{"login":"chamindias","id":8359365,"avatar_url":"https://avatars.githubusercontent.com/u/8359365?v=3","gravatar_id":"","url":"https://api.github.com/users/chamindias","html_url":"https://github.com/chamindias","followers_url":"https://api.github.com/users/chamindias/followers","following_url":"https://api.github.com/users/chamindias/following{/other_user}","gists_url":"https://api.github.com/users/chamindias/gists{/gist_id}","starred_url":"https://api.github.com/users/chamindias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chamindias/subscriptions","organizations_url":"https://api.github.com/users/chamindias/orgs","repos_url":"https://api.github.com/users/chamindias/repos","events_url":"https://api.github.com/users/chamindias/events{/privacy}","received_events_url":"https://api.github.com/users/chamindias/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-17T05:59:37Z","updated_at":"2015-11-19T06:14:24Z","closed_at":"2015-08-17T06:10:28Z","merged_at":"2015-08-17T06:10:28Z","merge_commit_sha":"1e67f18e1d471e9a2c792c6cdfdc125e5344e195","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/907/commits","review_comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/907/comments","review_comment_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/907/comments","statuses_url":"https://api.github.com/repos/wso2/carbon-apimgt/statuses/8de8e03cc4d5f592215b2f4f551efaea80bce371","head":{"label":"chamindias:release-1.9.1","ref":"release-1.9.1","sha":"8de8e03cc4d5f592215b2f4f551efaea80bce371","user":{"login":"chamindias","id":8359365,"avatar_url":"https://avatars.githubusercontent.com/u/8359365?v=3","gravatar_id":"","url":"https://api.github.com/users/chamindias","html_url":"https://github.com/chamindias","followers_url":"https://api.github.com/users/chamindias/followers","following_url":"https://api.github.com/users/chamindias/following{/other_user}","gists_url":"https://api.github.com/users/chamindias/gists{/gist_id}","starred_url":"https://api.github.com/users/chamindias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chamindias/subscriptions","organizations_url":"https://api.github.com/users/chamindias/orgs","repos_url":"https://api.github.com/users/chamindias/repos","events_url":"https://api.github.com/users/chamindias/events{/privacy}","received_events_url":"https://api.github.com/users/chamindias/received_events","type":"User","site_admin":false},"repo":{"id":36054025,"name":"carbon-apimgt","full_name":"chamindias/carbon-apimgt","owner":{"login":"chamindias","id":8359365,"avatar_url":"https://avatars.githubusercontent.com/u/8359365?v=3","gravatar_id":"","url":"https://api.github.com/users/chamindias","html_url":"https://github.com/chamindias","followers_url":"https://api.github.com/users/chamindias/followers","following_url":"https://api.github.com/users/chamindias/following{/other_user}","gists_url":"https://api.github.com/users/chamindias/gists{/gist_id}","starred_url":"https://api.github.com/users/chamindias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chamindias/subscriptions","organizations_url":"https://api.github.com/users/chamindias/orgs","repos_url":"https://api.github.com/users/chamindias/repos","events_url":"https://api.github.com/users/chamindias/events{/privacy}","received_events_url":"https://api.github.com/users/chamindias/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chamindias/carbon-apimgt","description":"","fork":true,"url":"https://api.github.com/repos/chamindias/carbon-apimgt","forks_url":"https://api.github.com/repos/chamindias/carbon-apimgt/forks","keys_url":"https://api.github.com/repos/chamindias/carbon-apimgt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chamindias/carbon-apimgt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chamindias/carbon-apimgt/teams","hooks_url":"https://api.github.com/repos/chamindias/carbon-apimgt/hooks","issue_events_url":"https://api.github.com/repos/chamindias/carbon-apimgt/issues/events{/number}","events_url":"https://api.github.com/repos/chamindias/carbon-apimgt/events","assignees_url":"https://api.github.com/repos/chamindias/carbon-apimgt/assignees{/user}","branches_url":"https://api.github.com/repos/chamindias/carbon-apimgt/branches{/branch}","tags_url":"https://api.github.com/repos/chamindias/carbon-apimgt/tags","blobs_url":"https://api.github.com/repos/chamindias/carbon-apimgt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chamindias/carbon-apimgt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chamindias/carbon-apimgt/git/refs{/sha}","trees_url":"https://api.github.com/repos/chamindias/carbon-apimgt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chamindias/carbon-apimgt/statuses/{sha}","languages_url":"https://api.github.com/repos/chamindias/carbon-apimgt/languages","stargazers_url":"https://api.github.com/repos/chamindias/carbon-apimgt/stargazers","contributors_url":"https://api.github.com/repos/chamindias/carbon-apimgt/contributors","subscribers_url":"https://api.github.com/repos/chamindias/carbon-apimgt/subscribers","subscription_url":"https://api.github.com/repos/chamindias/carbon-apimgt/subscription","commits_url":"https://api.github.com/repos/chamindias/carbon-apimgt/commits{/sha}","git_commits_url":"https://api.github.com/repos/chamindias/carbon-apimgt/git/commits{/sha}","comments_url":"https://api.github.com/repos/chamindias/carbon-apimgt/comments{/number}","issue_comment_url":"https://api.github.com/repos/chamindias/carbon-apimgt/issues/comments{/number}","contents_url":"https://api.github.com/repos/chamindias/carbon-apimgt/contents/{+path}","compare_url":"https://api.github.com/repos/chamindias/carbon-apimgt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chamindias/carbon-apimgt/merges","archive_url":"https://api.github.com/repos/chamindias/carbon-apimgt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chamindias/carbon-apimgt/downloads","issues_url":"https://api.github.com/repos/chamindias/carbon-apimgt/issues{/number}","pulls_url":"https://api.github.com/repos/chamindias/carbon-apimgt/pulls{/number}","milestones_url":"https://api.github.com/repos/chamindias/carbon-apimgt/milestones{/number}","notifications_url":"https://api.github.com/repos/chamindias/carbon-apimgt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chamindias/carbon-apimgt/labels{/name}","releases_url":"https://api.github.com/repos/chamindias/carbon-apimgt/releases{/id}","created_at":"2015-05-22T05:30:42Z","updated_at":"2015-05-22T05:31:04Z","pushed_at":"2015-11-19T05:38:09Z","git_url":"git://github.com/chamindias/carbon-apimgt.git","ssh_url":"git@github.com:chamindias/carbon-apimgt.git","clone_url":"https://github.com/chamindias/carbon-apimgt.git","svn_url":"https://github.com/chamindias/carbon-apimgt","homepage":null,"size":59855,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"release-1.3.0"}},"base":{"label":"wso2:release-1.9.1","ref":"release-1.9.1","sha":"172b024b6ae63ce2711d93f1cdfc165ed9fc46fa","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":17201744,"name":"carbon-apimgt","full_name":"wso2/carbon-apimgt","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/carbon-apimgt","description":"","fork":false,"url":"https://api.github.com/repos/wso2/carbon-apimgt","forks_url":"https://api.github.com/repos/wso2/carbon-apimgt/forks","keys_url":"https://api.github.com/repos/wso2/carbon-apimgt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/carbon-apimgt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/carbon-apimgt/teams","hooks_url":"https://api.github.com/repos/wso2/carbon-apimgt/hooks","issue_events_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/carbon-apimgt/events","assignees_url":"https://api.github.com/repos/wso2/carbon-apimgt/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/carbon-apimgt/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/carbon-apimgt/tags","blobs_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/carbon-apimgt/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/carbon-apimgt/languages","stargazers_url":"https://api.github.com/repos/wso2/carbon-apimgt/stargazers","contributors_url":"https://api.github.com/repos/wso2/carbon-apimgt/contributors","subscribers_url":"https://api.github.com/repos/wso2/carbon-apimgt/subscribers","subscription_url":"https://api.github.com/repos/wso2/carbon-apimgt/subscription","commits_url":"https://api.github.com/repos/wso2/carbon-apimgt/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/carbon-apimgt/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/carbon-apimgt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/carbon-apimgt/merges","archive_url":"https://api.github.com/repos/wso2/carbon-apimgt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/carbon-apimgt/downloads","issues_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/carbon-apimgt/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/carbon-apimgt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/carbon-apimgt/labels{/name}","releases_url":"https://api.github.com/repos/wso2/carbon-apimgt/releases{/id}","created_at":"2014-02-26T06:46:48Z","updated_at":"2015-11-03T03:25:24Z","pushed_at":"2015-11-19T05:29:29Z","git_url":"git://github.com/wso2/carbon-apimgt.git","ssh_url":"git@github.com:wso2/carbon-apimgt.git","clone_url":"https://github.com/wso2/carbon-apimgt.git","svn_url":"https://github.com/wso2/carbon-apimgt","homepage":null,"size":61707,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":103,"mirror_url":null,"open_issues_count":8,"forks":103,"open_issues":8,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/907"},"html":{"href":"https://github.com/wso2/carbon-apimgt/pull/907"},"issue":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/issues/907"},"comments":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/issues/907/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/907/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/907/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/statuses/8de8e03cc4d5f592215b2f4f551efaea80bce371"}}}}