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 {#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 Summary

    Constructors
    Constructor
    Description
    FileDistributionConnectionPool(com.yahoo.config.subscription.ConfigSourceSet sourceSet, com.yahoo.jrt.Supervisor supervisor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.yahoo.vespa.config.JRTConnection
     
    com.yahoo.vespa.config.JRTConnection
    switchConnection(com.yahoo.vespa.config.Connection failingConnection)
     

    Methods inherited from class com.yahoo.vespa.config.JRTConnectionPool

    addSources, close, getSize, getSources, initialize, pickNewConnectionRandomly, toString, updateSources, updateSources

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • FileDistributionConnectionPool

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

    • 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