Commit 9742ae28 authored by Jason Song's avatar Jason Song Committed by kezhenxu94

rename timeout to timeoutInMilli for better understanding (#2543)

parent 8eac52e5
...@@ -59,7 +59,7 @@ public class BizConfig extends RefreshableConfig { ...@@ -59,7 +59,7 @@ public class BizConfig extends RefreshableConfig {
return checkInt(interval, 1, Integer.MAX_VALUE, DEFAULT_GRAY_RELEASE_RULE_SCAN_INTERVAL); return checkInt(interval, 1, Integer.MAX_VALUE, DEFAULT_GRAY_RELEASE_RULE_SCAN_INTERVAL);
} }
public long longPollingTimeout() { public long longPollingTimeoutInMilli() {
int timeout = getIntProperty("long.polling.timeout", DEFAULT_LONG_POLLING_TIMEOUT); int timeout = getIntProperty("long.polling.timeout", DEFAULT_LONG_POLLING_TIMEOUT);
return 1000 * checkInt(timeout, 1, Integer.MAX_VALUE, DEFAULT_LONG_POLLING_TIMEOUT); return 1000 * checkInt(timeout, 1, Integer.MAX_VALUE, DEFAULT_LONG_POLLING_TIMEOUT);
} }
......
...@@ -108,7 +108,7 @@ public class NotificationControllerV2 implements ReleaseMessageListener { ...@@ -108,7 +108,7 @@ public class NotificationControllerV2 implements ReleaseMessageListener {
throw new BadRequestException("Invalid format of notifications: " + notificationsAsString); throw new BadRequestException("Invalid format of notifications: " + notificationsAsString);
} }
DeferredResultWrapper deferredResultWrapper = new DeferredResultWrapper(bizConfig.longPollingTimeout()); DeferredResultWrapper deferredResultWrapper = new DeferredResultWrapper(bizConfig.longPollingTimeoutInMilli());
Set<String> namespaces = Sets.newHashSet(); Set<String> namespaces = Sets.newHashSet();
Map<String, Long> clientSideNotifications = Maps.newHashMap(); Map<String, Long> clientSideNotifications = Maps.newHashMap();
Map<String, ApolloConfigNotification> filteredNotifications = filterNotifications(appId, notifications); Map<String, ApolloConfigNotification> filteredNotifications = filterNotifications(appId, notifications);
......
...@@ -23,8 +23,8 @@ public class DeferredResultWrapper { ...@@ -23,8 +23,8 @@ public class DeferredResultWrapper {
private DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> result; private DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> result;
public DeferredResultWrapper(long timeout) { public DeferredResultWrapper(long timeoutInMilli) {
result = new DeferredResult<>(timeout, NOT_MODIFIED_RESPONSE_LIST); result = new DeferredResult<>(timeoutInMilli, NOT_MODIFIED_RESPONSE_LIST);
} }
public void recordNamespaceNameNormalizedResult(String originalNamespaceName, String normalizedNamespaceName) { public void recordNamespaceNameNormalizedResult(String originalNamespaceName, String normalizedNamespaceName) {
......
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