Class Slobrok

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

public class Slobrok extends AbstractService implements com.yahoo.vespa.config.core.StateserverConfig.Producer
Represents a Slobrok service.
Author:
gjoranv
See Also:
  • Field Details

  • Constructor Details

    • Slobrok

      public Slobrok(AbstractConfigProducer<?> parent, int index, com.yahoo.config.model.api.ModelContext.FeatureFlags featureFlags)
      Parameters:
      parent - the parent ConfigProducer.
      index - unique index for all slobroks
  • Method Details

    • getConfig

      public void getConfig(com.yahoo.vespa.config.core.StateserverConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.vespa.config.core.StateserverConfig.Producer
    • getWantedPort

      public int getWantedPort()
      Description copied from class: AbstractService
      Returns the desired base port for the first instance of the service type. Returns '0' as default, which means that the service type should use the default port allocation mechanism.
      Specified by:
      getWantedPort in interface NetworkPortRequestor
      Overrides:
      getWantedPort in class AbstractService
      Returns:
      The desired base port for the first instance of the service type.
    • getStartupCommand

      public Optional<String> getStartupCommand()
      Description copied from class: AbstractService
      Must be overridden by services that should be started by config-sentinel. The returned value will be used in config-sentinel configuration. Returns empty by default.
      Specified by:
      getStartupCommand in interface Service
      Overrides:
      getStartupCommand in class AbstractService
      Returns:
      empty by default.
    • allocatePorts

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

      public int getPortCount()
      Description copied from interface: NetworkPortRequestor
      Returns the number of ports needed by this service. User-defined ports for container http servers should not be counted, as those ports are required to be outside Vespa's port range.
      Specified by:
      getPortCount in interface NetworkPortRequestor
      Returns:
      The number of ports needed by the slobrok.
    • getHealthPort

      public int getHealthPort()
      Description copied from class: AbstractService
      The service HTTP port for health status
      Specified by:
      getHealthPort in interface Service
      Overrides:
      getHealthPort in class AbstractService
      Returns:
      The port on which the state server should respond
    • getConnectionSpec

      public String getConnectionSpec()
      Returns:
      The connection spec to this Slobrok