Package com.yahoo.vespa.model
Interface NetworkPortRequestor
- All Known Subinterfaces:
Service
- All Known Implementing Classes:
AbstractService
,ApplicationContainer
,ClusterControllerContainer
,ConfigProxy
,ConfigSentinel
,Configserver
,Container
,ContentNode
,Distributor
,Logd
,LogForwarder
,Logserver
,LogserverContainer
,MetricsProxyContainer
,SearchNode
,Slobrok
,StorageNode
,TransactionLogServer
public interface NetworkPortRequestor
Interface implemented by services using network ports, identifying its requirements.
- Author:
- arnej
-
Method Summary
Modifier and TypeMethodDescriptionvoid
allocatePorts
(int start, PortAllocBridge from) allocate the ports you needReturns the config id, never nullint
Returns the number of ports needed by this service.Returns the name that identifies this service for the config-sentinel, never nullReturns the type of servicedefault int
Returns the desired base port for this service, or '0' if this service should use the default port allocation mechanism.default boolean
Returns true if the desired base port (returned by getWantedPort()) for this service is the only allowed base port.
-
Method Details
-
getServiceType
String getServiceType()Returns the type of service -
getServiceName
String getServiceName()Returns the name that identifies this service for the config-sentinel, never null -
getConfigId
String getConfigId()Returns the config id, never null -
getWantedPort
default int getWantedPort()Returns the desired base port for this service, or '0' if this service should use the default port allocation mechanism.- Returns:
- The desired base port for this service.
-
allocatePorts
allocate the ports you need -
getPortCount
int getPortCount()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. -
requiresWantedPort
default boolean requiresWantedPort()Returns true if the desired base port (returned by getWantedPort()) for this service is the only allowed base port.- Returns:
- true if this Service requires the wanted base port.
-