Package com.yahoo.vespa.filedistribution
Class FileDistributionConnectionPool
- java.lang.Object
-
- com.yahoo.vespa.config.JRTConnectionPool
-
- com.yahoo.vespa.filedistribution.FileDistributionConnectionPool
-
- All Implemented Interfaces:
com.yahoo.vespa.config.ConnectionPool
,AutoCloseable
public class FileDistributionConnectionPool extends com.yahoo.vespa.config.JRTConnectionPool
A pool of JRT connections to a set of file distribution source (one or more config servers). Used by file distribution clients, where the source that can serve a file reference might be different for each file reference (unlike config requests, where all requests should be served by the same source). A new connection is chosen randomly when calling {#linkswitchConnection(Connection failingConnection)
}. Unlike JRTConnectionPool there is no state that holds the 'current' connection, a new connection is picked randomly ifgetCurrent()
is called.- Author:
- hmusum
-
-
Constructor Summary
Constructors Constructor Description FileDistributionConnectionPool(com.yahoo.config.subscription.ConfigSourceSet sourceSet, com.yahoo.jrt.Supervisor supervisor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.yahoo.vespa.config.JRTConnection
getCurrent()
com.yahoo.vespa.config.JRTConnection
switchConnection(com.yahoo.vespa.config.Connection failingConnection)
-
-
-
Method Detail
-
getCurrent
public com.yahoo.vespa.config.JRTConnection getCurrent()
- Specified by:
getCurrent
in interfacecom.yahoo.vespa.config.ConnectionPool
- Overrides:
getCurrent
in classcom.yahoo.vespa.config.JRTConnectionPool
-
switchConnection
public com.yahoo.vespa.config.JRTConnection switchConnection(com.yahoo.vespa.config.Connection failingConnection)
- Specified by:
switchConnection
in interfacecom.yahoo.vespa.config.ConnectionPool
- Overrides:
switchConnection
in classcom.yahoo.vespa.config.JRTConnectionPool
-
-