{"action":"created","comment":{"url":"https://api.github.com/repos/Netflix/eureka/pulls/comments/31496335","id":31496335,"diff_hunk":"@@ -103,13 +109,26 @@ public void registerAppMetadata(Map<String, String> appMetadata) {\n \n     /**\n      * Set the status of this instance. Application can use this to indicate\n-     * whether it is ready to receive traffic.\n+     * whether it is ready to receive traffic. Setting the status here also notifies all registered listeners\n+     * of a status change event.\n      *\n-     * @param status\n-     *            Status of the instance\n+     * @param status Status of the instance\n      */\n-    public void setInstanceStatus(InstanceStatus status) {\n-        instanceInfo.setStatus(status);\n+    public synchronized void setInstanceStatus(InstanceStatus status) {\n+        InstanceStatus prev = instanceInfo.setStatus(status);\n+        if (prev != null) {\n+            for (StatusChangeListener listener : listeners.values()) {\n+                listener.notify(new StatusChangeEvent(prev, status));","path":"eureka-client/src/main/java/com/netflix/appinfo/ApplicationInfoManager.java","position":48,"original_position":48,"commit_id":"5148ea874e8343a3993a94cb21362f196bb9b3fc","original_commit_id":"5148ea874e8343a3993a94cb21362f196bb9b3fc","user":{"login":"NiteshKant","id":820005,"avatar_url":"https://avatars.githubusercontent.com/u/820005?v=3","gravatar_id":"","url":"https://api.github.com/users/NiteshKant","html_url":"https://github.com/NiteshKant","followers_url":"https://api.github.com/users/NiteshKant/followers","following_url":"https://api.github.com/users/NiteshKant/following{/other_user}","gists_url":"https://api.github.com/users/NiteshKant/gists{/gist_id}","starred_url":"https://api.github.com/users/NiteshKant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NiteshKant/subscriptions","organizations_url":"https://api.github.com/users/NiteshKant/orgs","repos_url":"https://api.github.com/users/NiteshKant/repos","events_url":"https://api.github.com/users/NiteshKant/events{/privacy}","received_events_url":"https://api.github.com/users/NiteshKant/received_events","type":"User","site_admin":false},"body":"Handle errors on listener invocation?","created_at":"2015-06-02T06:48:20Z","updated_at":"2015-06-02T06:48:20Z","html_url":"https://github.com/Netflix/eureka/pull/530#discussion_r31496335","pull_request_url":"https://api.github.com/repos/Netflix/eureka/pulls/530","_links":{"self":{"href":"https://api.github.com/repos/Netflix/eureka/pulls/comments/31496335"},"html":{"href":"https://github.com/Netflix/eureka/pull/530#discussion_r31496335"},"pull_request":{"href":"https://api.github.com/repos/Netflix/eureka/pulls/530"}}},"pull_request":{"url":"https://api.github.com/repos/Netflix/eureka/pulls/530","id":36681727,"html_url":"https://github.com/Netflix/eureka/pull/530","diff_url":"https://github.com/Netflix/eureka/pull/530.diff","patch_url":"https://github.com/Netflix/eureka/pull/530.patch","issue_url":"https://api.github.com/repos/Netflix/eureka/issues/530","number":530,"state":"open","locked":false,"title":"Adding the ability to execute on-demand updates to the eureka server","user":{"login":"qiangdavidliu","id":6243760,"avatar_url":"https://avatars.githubusercontent.com/u/6243760?v=3","gravatar_id":"","url":"https://api.github.com/users/qiangdavidliu","html_url":"https://github.com/qiangdavidliu","followers_url":"https://api.github.com/users/qiangdavidliu/followers","following_url":"https://api.github.com/users/qiangdavidliu/following{/other_user}","gists_url":"https://api.github.com/users/qiangdavidliu/gists{/gist_id}","starred_url":"https://api.github.com/users/qiangdavidliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiangdavidliu/subscriptions","organizations_url":"https://api.github.com/users/qiangdavidliu/orgs","repos_url":"https://api.github.com/users/qiangdavidliu/repos","events_url":"https://api.github.com/users/qiangdavidliu/events{/privacy}","received_events_url":"https://api.github.com/users/qiangdavidliu/received_events","type":"User","site_admin":false},"body":"Adding the ability to execute on-demand updates to the eureka server. Current set up is triggered by changes to ApplicationInfoManager.setInstanceStatus(). This capability can be turned on/off via eureka.shouldOnDemandUpdateStatusChange.","created_at":"2015-06-01T23:30:25Z","updated_at":"2015-06-02T06:48:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9fba967f69910004267cae04cea857f1bd356a5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Netflix/eureka/pulls/530/commits","review_comments_url":"https://api.github.com/repos/Netflix/eureka/pulls/530/comments","review_comment_url":"https://api.github.com/repos/Netflix/eureka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Netflix/eureka/issues/530/comments","statuses_url":"https://api.github.com/repos/Netflix/eureka/statuses/5148ea874e8343a3993a94cb21362f196bb9b3fc","head":{"label":"qiangdavidliu:master","ref":"master","sha":"5148ea874e8343a3993a94cb21362f196bb9b3fc","user":{"login":"qiangdavidliu","id":6243760,"avatar_url":"https://avatars.githubusercontent.com/u/6243760?v=3","gravatar_id":"","url":"https://api.github.com/users/qiangdavidliu","html_url":"https://github.com/qiangdavidliu","followers_url":"https://api.github.com/users/qiangdavidliu/followers","following_url":"https://api.github.com/users/qiangdavidliu/following{/other_user}","gists_url":"https://api.github.com/users/qiangdavidliu/gists{/gist_id}","starred_url":"https://api.github.com/users/qiangdavidliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiangdavidliu/subscriptions","organizations_url":"https://api.github.com/users/qiangdavidliu/orgs","repos_url":"https://api.github.com/users/qiangdavidliu/repos","events_url":"https://api.github.com/users/qiangdavidliu/events{/privacy}","received_events_url":"https://api.github.com/users/qiangdavidliu/received_events","type":"User","site_admin":false},"repo":{"id":23604941,"name":"eureka","full_name":"qiangdavidliu/eureka","owner":{"login":"qiangdavidliu","id":6243760,"avatar_url":"https://avatars.githubusercontent.com/u/6243760?v=3","gravatar_id":"","url":"https://api.github.com/users/qiangdavidliu","html_url":"https://github.com/qiangdavidliu","followers_url":"https://api.github.com/users/qiangdavidliu/followers","following_url":"https://api.github.com/users/qiangdavidliu/following{/other_user}","gists_url":"https://api.github.com/users/qiangdavidliu/gists{/gist_id}","starred_url":"https://api.github.com/users/qiangdavidliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiangdavidliu/subscriptions","organizations_url":"https://api.github.com/users/qiangdavidliu/orgs","repos_url":"https://api.github.com/users/qiangdavidliu/repos","events_url":"https://api.github.com/users/qiangdavidliu/events{/privacy}","received_events_url":"https://api.github.com/users/qiangdavidliu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/qiangdavidliu/eureka","description":"AWS Service registry for resilient mid-tier load balancing and failover.","fork":true,"url":"https://api.github.com/repos/qiangdavidliu/eureka","forks_url":"https://api.github.com/repos/qiangdavidliu/eureka/forks","keys_url":"https://api.github.com/repos/qiangdavidliu/eureka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qiangdavidliu/eureka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qiangdavidliu/eureka/teams","hooks_url":"https://api.github.com/repos/qiangdavidliu/eureka/hooks","issue_events_url":"https://api.github.com/repos/qiangdavidliu/eureka/issues/events{/number}","events_url":"https://api.github.com/repos/qiangdavidliu/eureka/events","assignees_url":"https://api.github.com/repos/qiangdavidliu/eureka/assignees{/user}","branches_url":"https://api.github.com/repos/qiangdavidliu/eureka/branches{/branch}","tags_url":"https://api.github.com/repos/qiangdavidliu/eureka/tags","blobs_url":"https://api.github.com/repos/qiangdavidliu/eureka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qiangdavidliu/eureka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qiangdavidliu/eureka/git/refs{/sha}","trees_url":"https://api.github.com/repos/qiangdavidliu/eureka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qiangdavidliu/eureka/statuses/{sha}","languages_url":"https://api.github.com/repos/qiangdavidliu/eureka/languages","stargazers_url":"https://api.github.com/repos/qiangdavidliu/eureka/stargazers","contributors_url":"https://api.github.com/repos/qiangdavidliu/eureka/contributors","subscribers_url":"https://api.github.com/repos/qiangdavidliu/eureka/subscribers","subscription_url":"https://api.github.com/repos/qiangdavidliu/eureka/subscription","commits_url":"https://api.github.com/repos/qiangdavidliu/eureka/commits{/sha}","git_commits_url":"https://api.github.com/repos/qiangdavidliu/eureka/git/commits{/sha}","comments_url":"https://api.github.com/repos/qiangdavidliu/eureka/comments{/number}","issue_comment_url":"https://api.github.com/repos/qiangdavidliu/eureka/issues/comments{/number}","contents_url":"https://api.github.com/repos/qiangdavidliu/eureka/contents/{+path}","compare_url":"https://api.github.com/repos/qiangdavidliu/eureka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qiangdavidliu/eureka/merges","archive_url":"https://api.github.com/repos/qiangdavidliu/eureka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qiangdavidliu/eureka/downloads","issues_url":"https://api.github.com/repos/qiangdavidliu/eureka/issues{/number}","pulls_url":"https://api.github.com/repos/qiangdavidliu/eureka/pulls{/number}","milestones_url":"https://api.github.com/repos/qiangdavidliu/eureka/milestones{/number}","notifications_url":"https://api.github.com/repos/qiangdavidliu/eureka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qiangdavidliu/eureka/labels{/name}","releases_url":"https://api.github.com/repos/qiangdavidliu/eureka/releases{/id}","created_at":"2014-09-03T03:18:30Z","updated_at":"2015-03-27T18:57:25Z","pushed_at":"2015-06-02T06:33:53Z","git_url":"git://github.com/qiangdavidliu/eureka.git","ssh_url":"git@github.com:qiangdavidliu/eureka.git","clone_url":"https://github.com/qiangdavidliu/eureka.git","svn_url":"https://github.com/qiangdavidliu/eureka","homepage":"","size":8814,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Netflix:master","ref":"master","sha":"00a016c8446bad8323c3a7f9a4c5a536623e79b8","user":{"login":"Netflix","id":913567,"avatar_url":"https://avatars.githubusercontent.com/u/913567?v=3","gravatar_id":"","url":"https://api.github.com/users/Netflix","html_url":"https://github.com/Netflix","followers_url":"https://api.github.com/users/Netflix/followers","following_url":"https://api.github.com/users/Netflix/following{/other_user}","gists_url":"https://api.github.com/users/Netflix/gists{/gist_id}","starred_url":"https://api.github.com/users/Netflix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Netflix/subscriptions","organizations_url":"https://api.github.com/users/Netflix/orgs","repos_url":"https://api.github.com/users/Netflix/repos","events_url":"https://api.github.com/users/Netflix/events{/privacy}","received_events_url":"https://api.github.com/users/Netflix/received_events","type":"Organization","site_admin":false},"repo":{"id":5198041,"name":"eureka","full_name":"Netflix/eureka","owner":{"login":"Netflix","id":913567,"avatar_url":"https://avatars.githubusercontent.com/u/913567?v=3","gravatar_id":"","url":"https://api.github.com/users/Netflix","html_url":"https://github.com/Netflix","followers_url":"https://api.github.com/users/Netflix/followers","following_url":"https://api.github.com/users/Netflix/following{/other_user}","gists_url":"https://api.github.com/users/Netflix/gists{/gist_id}","starred_url":"https://api.github.com/users/Netflix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Netflix/subscriptions","organizations_url":"https://api.github.com/users/Netflix/orgs","repos_url":"https://api.github.com/users/Netflix/repos","events_url":"https://api.github.com/users/Netflix/events{/privacy}","received_events_url":"https://api.github.com/users/Netflix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Netflix/eureka","description":"AWS Service registry for resilient mid-tier load balancing and failover.","fork":false,"url":"https://api.github.com/repos/Netflix/eureka","forks_url":"https://api.github.com/repos/Netflix/eureka/forks","keys_url":"https://api.github.com/repos/Netflix/eureka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Netflix/eureka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Netflix/eureka/teams","hooks_url":"https://api.github.com/repos/Netflix/eureka/hooks","issue_events_url":"https://api.github.com/repos/Netflix/eureka/issues/events{/number}","events_url":"https://api.github.com/repos/Netflix/eureka/events","assignees_url":"https://api.github.com/repos/Netflix/eureka/assignees{/user}","branches_url":"https://api.github.com/repos/Netflix/eureka/branches{/branch}","tags_url":"https://api.github.com/repos/Netflix/eureka/tags","blobs_url":"https://api.github.com/repos/Netflix/eureka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Netflix/eureka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Netflix/eureka/git/refs{/sha}","trees_url":"https://api.github.com/repos/Netflix/eureka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Netflix/eureka/statuses/{sha}","languages_url":"https://api.github.com/repos/Netflix/eureka/languages","stargazers_url":"https://api.github.com/repos/Netflix/eureka/stargazers","contributors_url":"https://api.github.com/repos/Netflix/eureka/contributors","subscribers_url":"https://api.github.com/repos/Netflix/eureka/subscribers","subscription_url":"https://api.github.com/repos/Netflix/eureka/subscription","commits_url":"https://api.github.com/repos/Netflix/eureka/commits{/sha}","git_commits_url":"https://api.github.com/repos/Netflix/eureka/git/commits{/sha}","comments_url":"https://api.github.com/repos/Netflix/eureka/comments{/number}","issue_comment_url":"https://api.github.com/repos/Netflix/eureka/issues/comments{/number}","contents_url":"https://api.github.com/repos/Netflix/eureka/contents/{+path}","compare_url":"https://api.github.com/repos/Netflix/eureka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Netflix/eureka/merges","archive_url":"https://api.github.com/repos/Netflix/eureka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Netflix/eureka/downloads","issues_url":"https://api.github.com/repos/Netflix/eureka/issues{/number}","pulls_url":"https://api.github.com/repos/Netflix/eureka/pulls{/number}","milestones_url":"https://api.github.com/repos/Netflix/eureka/milestones{/number}","notifications_url":"https://api.github.com/repos/Netflix/eureka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Netflix/eureka/labels{/name}","releases_url":"https://api.github.com/repos/Netflix/eureka/releases{/id}","created_at":"2012-07-26T22:23:07Z","updated_at":"2015-06-02T04:48:57Z","pushed_at":"2015-06-02T06:33:53Z","git_url":"git://github.com/Netflix/eureka.git","ssh_url":"git@github.com:Netflix/eureka.git","clone_url":"https://github.com/Netflix/eureka.git","svn_url":"https://github.com/Netflix/eureka","homepage":"","size":15445,"stargazers_count":1000,"watchers_count":1000,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":224,"mirror_url":null,"open_issues_count":29,"forks":224,"open_issues":29,"watchers":1000,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Netflix/eureka/pulls/530"},"html":{"href":"https://github.com/Netflix/eureka/pull/530"},"issue":{"href":"https://api.github.com/repos/Netflix/eureka/issues/530"},"comments":{"href":"https://api.github.com/repos/Netflix/eureka/issues/530/comments"},"review_comments":{"href":"https://api.github.com/repos/Netflix/eureka/pulls/530/comments"},"review_comment":{"href":"https://api.github.com/repos/Netflix/eureka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Netflix/eureka/pulls/530/commits"},"statuses":{"href":"https://api.github.com/repos/Netflix/eureka/statuses/5148ea874e8343a3993a94cb21362f196bb9b3fc"}}}}