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
,Service
,Slobrok
,StorageNode
,TransactionLogServer
public interface NetworkPortRequestor
Interface implemented by services using network ports, identifying its requirements.- Author:
- arnej
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
allocatePorts(int start, PortAllocBridge from)
allocate the ports you needString
getConfigId()
Returns the config id, never nullint
getPortCount()
Returns the number of ports needed by this service.String
getServiceName()
Returns the name that identifies this service for the config-sentinel, never nullString
getServiceType()
Returns the type of servicedefault int
getWantedPort()
Returns the desired base port for this service, or '0' if this service should use the default port allocation mechanism.default boolean
requiresWantedPort()
Returns true if the desired base port (returned by getWantedPort()) for this service is the only allowed base port.
-
-
-
Method Detail
-
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
void allocatePorts(int start, PortAllocBridge from)
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.
-
-