提交 e4a0094f 编写于 作者: N nobodyiam

rename method names

上级 cfe3ad66
......@@ -106,11 +106,11 @@ public class ConfigServiceLocator {
transaction.setStatus(Transaction.SUCCESS);
List<ServiceDTO> services = response.getBody();
if (services == null || services.isEmpty()) {
logConfigServiceToCat("Empty response!");
logConfigService("Empty response!");
continue;
}
m_configServices.set(services);
logConfigServicesToCat(services);
logConfigServices(services);
return;
} catch (Throwable ex) {
Tracer.logEvent("ApolloConfigException", ExceptionUtil.getDetailMessage(ex));
......@@ -145,13 +145,13 @@ public class ConfigServiceLocator {
return domainName + "/services/config?" + MAP_JOINER.join(queryParams);
}
private void logConfigServicesToCat(List<ServiceDTO> serviceDtos) {
private void logConfigServices(List<ServiceDTO> serviceDtos) {
for (ServiceDTO serviceDto : serviceDtos) {
logConfigServiceToCat(serviceDto.getHomepageUrl());
logConfigService(serviceDto.getHomepageUrl());
}
}
private void logConfigServiceToCat(String serviceUrl) {
private void logConfigService(String serviceUrl) {
Tracer.logEvent("Apollo.Config.Services", serviceUrl);
}
}
......@@ -107,17 +107,17 @@ public class NotificationController implements ReleaseMessageListener {
}
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, namespace, dataCenter);
}
......@@ -159,7 +159,7 @@ public class NotificationController implements ReleaseMessageListener {
logger.debug("Notification completed");
}
private void logWatchedKeysToCat(Set<String> watchedKeys, String eventName) {
private void logWatchedKeys(Set<String> watchedKeys, String eventName) {
for (String watchedKey : watchedKeys) {
Tracer.logEvent(eventName, watchedKey);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册