Skip to content

Commit

Permalink
Merge pull request apolloconfig#687 from powerYao/master
Browse files Browse the repository at this point in the history
Cat单词不应出现在方法名,此处简化去除一下
  • Loading branch information
nobodyiam authored Aug 10, 2017
2 parents 7fbd51f + e933a43 commit cfe3ad6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,17 @@ public DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> pollNotifi
}

deferredResult
.onTimeout(() -> logWatchedKeysToCat(watchedKeys, "Apollo.LongPoll.TimeOutKeys"));
.onTimeout(() -> logWatchedKeys(watchedKeys, "Apollo.LongPoll.TimeOutKeys"));

deferredResult.onCompletion(() -> {
//unregister all keys
for (String key : watchedKeys) {
deferredResults.remove(key, deferredResult);
}
logWatchedKeysToCat(watchedKeys, "Apollo.LongPoll.CompletedKeys");
logWatchedKeys(watchedKeys, "Apollo.LongPoll.CompletedKeys");
});

logWatchedKeysToCat(watchedKeys, "Apollo.LongPoll.RegisteredKeys");
logWatchedKeys(watchedKeys, "Apollo.LongPoll.RegisteredKeys");
logger.debug("Listening {} from appId: {}, cluster: {}, namespace: {}, datacenter: {}",
watchedKeys, appId, cluster, namespaces, dataCenter);
}
Expand Down Expand Up @@ -278,7 +278,7 @@ public void handleMessage(ReleaseMessage message, String channel) {
return keys.get(2);
};

private void logWatchedKeysToCat(Set<String> watchedKeys, String eventName) {
private void logWatchedKeys(Set<String> watchedKeys, String eventName) {
for (String watchedKey : watchedKeys) {
Tracer.logEvent(eventName, watchedKey);
}
Expand Down

0 comments on commit cfe3ad6

Please sign in to comment.