Commit e4a0094f by nobodyiam

rename method names

parent cfe3ad66
...@@ -106,11 +106,11 @@ public class ConfigServiceLocator { ...@@ -106,11 +106,11 @@ public class ConfigServiceLocator {
transaction.setStatus(Transaction.SUCCESS); transaction.setStatus(Transaction.SUCCESS);
List<ServiceDTO> services = response.getBody(); List<ServiceDTO> services = response.getBody();
if (services == null || services.isEmpty()) { if (services == null || services.isEmpty()) {
logConfigServiceToCat("Empty response!"); logConfigService("Empty response!");
continue; continue;
} }
m_configServices.set(services); m_configServices.set(services);
logConfigServicesToCat(services); logConfigServices(services);
return; return;
} catch (Throwable ex) { } catch (Throwable ex) {
Tracer.logEvent("ApolloConfigException", ExceptionUtil.getDetailMessage(ex)); Tracer.logEvent("ApolloConfigException", ExceptionUtil.getDetailMessage(ex));
...@@ -145,13 +145,13 @@ public class ConfigServiceLocator { ...@@ -145,13 +145,13 @@ public class ConfigServiceLocator {
return domainName + "/services/config?" + MAP_JOINER.join(queryParams); return domainName + "/services/config?" + MAP_JOINER.join(queryParams);
} }
private void logConfigServicesToCat(List<ServiceDTO> serviceDtos) { private void logConfigServices(List<ServiceDTO> serviceDtos) {
for (ServiceDTO 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); Tracer.logEvent("Apollo.Config.Services", serviceUrl);
} }
} }
...@@ -107,17 +107,17 @@ public class NotificationController implements ReleaseMessageListener { ...@@ -107,17 +107,17 @@ public class NotificationController implements ReleaseMessageListener {
} }
deferredResult deferredResult
.onTimeout(() -> logWatchedKeysToCat(watchedKeys, "Apollo.LongPoll.TimeOutKeys")); .onTimeout(() -> logWatchedKeys(watchedKeys, "Apollo.LongPoll.TimeOutKeys"));
deferredResult.onCompletion(() -> { deferredResult.onCompletion(() -> {
//unregister all keys //unregister all keys
for (String key : watchedKeys) { for (String key : watchedKeys) {
deferredResults.remove(key, deferredResult); 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: {}", logger.debug("Listening {} from appId: {}, cluster: {}, namespace: {}, datacenter: {}",
watchedKeys, appId, cluster, namespace, dataCenter); watchedKeys, appId, cluster, namespace, dataCenter);
} }
...@@ -159,7 +159,7 @@ public class NotificationController implements ReleaseMessageListener { ...@@ -159,7 +159,7 @@ public class NotificationController implements ReleaseMessageListener {
logger.debug("Notification completed"); logger.debug("Notification completed");
} }
private void logWatchedKeysToCat(Set<String> watchedKeys, String eventName) { private void logWatchedKeys(Set<String> watchedKeys, String eventName) {
for (String watchedKey : watchedKeys) { for (String watchedKey : watchedKeys) {
Tracer.logEvent(eventName, watchedKey); Tracer.logEvent(eventName, watchedKey);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment