Class Service

    • Constructor Detail

      • Service

        public Service​(ServiceCluster parent,
                       java.lang.String id)
    • Method Detail

      • 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.
      • getStartupCommand

        public java.lang.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 null by default.
        Specified by:
        getStartupCommand in interface Service
        Overrides:
        getStartupCommand in class AbstractService
        Returns:
        null by default.
      • getIndex

        protected int getIndex​(HostResource host)
        Different services are represented using same class here, so we must take service name into account too
        Overrides:
        getIndex in class AbstractService
        Parameters:
        host - a host
        Returns:
        the index of the host