summaryrefslogtreecommitdiffstats
path: root/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java')
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java12
1 files changed, 6 insertions, 6 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 ab85c534251..5df7b1fc021 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
@@ -4,7 +4,7 @@ package com.yahoo.vespa.config.proxy;
import com.yahoo.concurrent.DaemonThreadFactory;
import com.yahoo.config.ConfigurationRuntimeException;
import com.yahoo.config.subscription.ConfigSourceSet;
-import com.yahoo.config.subscription.impl.JrtConfigRequesters;
+import com.yahoo.config.subscription.impl.JRTConfigRequester;
import com.yahoo.jrt.Request;
import com.yahoo.jrt.Spec;
import com.yahoo.jrt.Supervisor;
@@ -51,7 +51,7 @@ class RpcConfigSourceClient implements ConfigSourceClient, Runnable {
private final ScheduledExecutorService nextConfigScheduler =
Executors.newScheduledThreadPool(1, new DaemonThreadFactory("next config"));
private final ScheduledFuture<?> nextConfigFuture;
- private final JrtConfigRequesters requesters;
+ private final JRTConfigRequester requester;
// Scheduled executor that periodically checks for requests that have timed out and response should be returned to clients
private final ScheduledExecutorService delayedResponsesScheduler =
Executors.newScheduledThreadPool(1, new DaemonThreadFactory("delayed responses"));
@@ -64,7 +64,7 @@ class RpcConfigSourceClient implements ConfigSourceClient, Runnable {
this.delayedResponses = new DelayedResponses();
checkConfigSources();
nextConfigFuture = nextConfigScheduler.scheduleAtFixedRate(this, 0, 10, MILLISECONDS);
- this.requesters = new JrtConfigRequesters();
+ this.requester = JRTConfigRequester.create(configSourceSet, timingValues);
DelayedResponseHandler command = new DelayedResponseHandler(delayedResponses, memoryCache, rpcServer);
this.delayedResponsesFuture = delayedResponsesScheduler.scheduleAtFixedRate(command, 5, 1, SECONDS);
}
@@ -142,7 +142,7 @@ class RpcConfigSourceClient implements ConfigSourceClient, Runnable {
if (activeSubscribers.containsKey(configCacheKey)) return;
log.log(Level.FINE, () -> "Could not find good config in cache, creating subscriber for: " + configCacheKey);
- var subscriber = new Subscriber(input, timingValues, requesters.getRequester(configSourceSet, timingValues));
+ var subscriber = new Subscriber(input, configSourceSet, timingValues, requester);
try {
subscriber.subscribe();
activeSubscribers.put(configCacheKey, subscriber);
@@ -187,12 +187,12 @@ class RpcConfigSourceClient implements ConfigSourceClient, Runnable {
log.log(Level.FINE, "nextConfigScheduler.shutdownNow");
nextConfigScheduler.shutdownNow();
log.log(Level.FINE, "requester.close");
- requesters.close();
+ requester.close();
}
@Override
public String getActiveSourceConnection() {
- return requesters.getRequester(configSourceSet, timingValues).getConnectionPool().getCurrent().getAddress();
+ return requester.getConnectionPool().getCurrent().getAddress();
}
@Override