Class ConfigProxy

All Implemented Interfaces:
com.yahoo.config.ConfigInstance.Producer, ConfigProducer, NetworkPortRequestor, Service, Serializable

public class ConfigProxy extends AbstractService
There is one config proxy running on each Vespa host, and one instance of this class is therefore created by each instance of class Host. NOTE: The Config proxy is not started by the config system, and does not receive any config. It's included here so we know what host it runs on, and to give an error message if another service tries to reserve the port it is using.
Author:
Vidar Larsen, Harald Musum
See Also:
  • Field Details

  • Constructor Details

    • ConfigProxy

      public ConfigProxy(Host host)
      Creates a new ConfigProxy instance.
      Parameters:
      host - hostname
  • Method Details

    • allocatePorts

      public void allocatePorts(int start, PortAllocBridge from)
      Description copied from interface: NetworkPortRequestor
      allocate the ports you need
    • getWantedPort

      public int getWantedPort()
      Returns the desired base port for this service.
      Specified by:
      getWantedPort in interface NetworkPortRequestor
      Overrides:
      getWantedPort in class AbstractService
      Returns:
      The desired base port for the first instance of the service type.
    • requiresWantedPort

      public boolean requiresWantedPort()
      The desired base port is the only allowed base port.
      Specified by:
      requiresWantedPort in interface NetworkPortRequestor
      Overrides:
      requiresWantedPort in class AbstractService
      Returns:
      false by default
    • getPortCount

      public int getPortCount()
      ConfigProxy needs one rpc client port.
      Returns:
      The number of ports reserved by the config proxy