diff options
author | Bjørn Christian Seime <bjorncs@oath.com> | 2019-01-14 17:03:55 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@oath.com> | 2019-01-14 17:13:01 +0100 |
commit | 64c2d214d0122ba491f78c7298f0bf16ea3455bd (patch) | |
tree | 04bd240fa9d17b5586eee5aa49de41e390e36242 /config | |
parent | 8aeee26b882c6aa1e12383502cfa37bb18082b53 (diff) |
Add jrt supervisor as constructor parameter
Diffstat (limited to 'config')
-rw-r--r-- | config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java b/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java index efeaacf225b..82306276617 100644 --- a/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java +++ b/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java @@ -28,7 +28,7 @@ public class JRTConnectionPool implements ConnectionPool { private static final Logger log = Logger.getLogger(JRTConnectionPool.class.getName()); - private final Supervisor supervisor = new Supervisor(new Transport()); + private final Supervisor supervisor; private final Map<String, JRTConnection> connections = new LinkedHashMap<>(); // The config sources used by this connection pool. @@ -38,6 +38,11 @@ public class JRTConnectionPool implements ConnectionPool { private volatile JRTConnection currentConnection; public JRTConnectionPool(ConfigSourceSet sourceSet) { + this(new Supervisor(new Transport()), sourceSet); + } + + public JRTConnectionPool(Supervisor supervisor, ConfigSourceSet sourceSet) { + this.supervisor = supervisor; addSources(sourceSet); } |