diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-02-25 13:27:09 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-02-25 14:24:26 +0100 |
commit | a40709e319105f33a81eeec0dce09572fe45ecb7 (patch) | |
tree | f59e29066e5fde7e056a06afe2e35a171df46155 /config-proxy | |
parent | d69aeb4ee39c352c87336e617f5d73c58b2faeb8 (diff) |
Use a typesafe Duration instead of integer milliseondst status.
Diffstat (limited to 'config-proxy')
-rw-r--r-- | config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java index 5ca387b6122..f022ed11f3d 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java @@ -17,6 +17,7 @@ import com.yahoo.vespa.config.RawConfig; import com.yahoo.vespa.config.TimingValues; import com.yahoo.vespa.config.protocol.JRTServerConfigRequest; +import java.time.Duration; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -68,7 +69,7 @@ class RpcConfigSourceClient implements ConfigSourceClient, Runnable { this.memoryCache = new MemoryCache(); this.delayedResponses = new DelayedResponses(); checkConfigSources(); - nextConfigFuture = nextConfigScheduler.scheduleAtFixedRate(this, 0, SystemTimer.adjustTimeoutByDetectedHz(10), MILLISECONDS); + nextConfigFuture = nextConfigScheduler.scheduleAtFixedRate(this, 0, SystemTimer.adjustTimeoutByDetectedHz(Duration.ofMillis(10)).toMillis(), MILLISECONDS); this.requesters = new JrtConfigRequesters(); DelayedResponseHandler command = new DelayedResponseHandler(delayedResponses, memoryCache, responseHandler); this.delayedResponsesFuture = delayedResponsesScheduler.scheduleAtFixedRate(command, 5, 1, SECONDS); |