Class 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 {#link switchConnection(Connection failingConnection)}. Unlike JRTConnectionPool there is no state that holds the 'current' connection, a new connection is picked randomly if getCurrent() is called.
    Author:
    hmusum
    • Constructor Detail

      • FileDistributionConnectionPool

        public FileDistributionConnectionPool​(com.yahoo.config.subscription.ConfigSourceSet sourceSet,
                                              com.yahoo.jrt.Supervisor supervisor)
    • Method Detail

      • getCurrent

        public com.yahoo.vespa.config.JRTConnection getCurrent()
        Specified by:
        getCurrent in interface com.yahoo.vespa.config.ConnectionPool
        Overrides:
        getCurrent in class com.yahoo.vespa.config.JRTConnectionPool
      • switchConnection

        public com.yahoo.vespa.config.JRTConnection switchConnection​(com.yahoo.vespa.config.Connection failingConnection)
        Specified by:
        switchConnection in interface com.yahoo.vespa.config.ConnectionPool
        Overrides:
        switchConnection in class com.yahoo.vespa.config.JRTConnectionPool