Package com.yahoo.vespa.model
Class ConfigProxy
- java.lang.Object
-
- com.yahoo.config.model.producer.AbstractConfigProducer<AbstractConfigProducer<?>>
-
- com.yahoo.vespa.model.AbstractService
-
- com.yahoo.vespa.model.ConfigProxy
-
- All Implemented Interfaces:
com.yahoo.config.ConfigInstance.Producer
,ConfigProducer
,NetworkPortRequestor
,Service
,java.io.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 classHost
. 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
BASEPORT
-
Fields inherited from class com.yahoo.vespa.model.AbstractService
portsMeta
-
Fields inherited from class com.yahoo.config.model.producer.AbstractConfigProducer
log
-
-
Constructor Summary
Constructors Constructor Description ConfigProxy(Host host)
Creates a new ConfigProxy instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
allocatePorts(int start, PortAllocBridge from)
allocate the ports you needint
getPortCount()
ConfigProxy needs one rpc client port.int
getWantedPort()
Returns the desired base port for this service.boolean
requiresWantedPort()
The desired base port is the only allowed base port.-
Methods inherited from class com.yahoo.vespa.model.AbstractService
appendJvmOptions, distributeCpuSocketAffinity, getAffinity, getCoreOnOOM, getCoreOnOOMEnvVariable, getDefaultMetricDimensions, getEnvVariables, getHealthPort, getHost, getHostName, getHostResource, getId, getIndex, getJvmOptions, getMMapNoCoreEnvVariable, getMMapNoCoreLimit, getNoVespaMalloc, getNoVespaMallocEnvVariable, getNumPortsAllocated, getPortsMeta, getPreLoad, getPreShutdownCommand, getRelativePort, getServiceInfo, getServiceName, getServicePropertyString, getServicePropertyString, getServiceType, getStartupCommand, getVespaMalloc, getVespaMallocDebug, getVespaMallocDebugEnvVariable, getVespaMallocDebugStackTrace, getVespaMallocDebugStackTraceEnvVariable, getVespaMallocEnvVariable, initService, isInitialized, prependJvmOptions, sendFile, sendUri, setAffinity, setBasePort, setCoreOnOOM, setHostResource, setJvmOptions, setMMapNoCoreLimit, setNoVespaMalloc, setPreLoad, setProp, setProp, setVespaMalloc, setVespaMallocDebug, setVespaMallocDebugStackTrace, toString
-
Methods inherited from class com.yahoo.config.model.producer.AbstractConfigProducer
addChild, addConfigId, addDescendantService, addUserConfig, cascadeConfig, dump, getChildren, getChildrenByTypeRecursive, getConfigClassLoader, getConfigId, getDescendantServices, getMonitoringService, getParent, getRoot, getSubId, getUserConfigs, hostSystem, mergeUserConfigs, removeChild, setParent, setUserConfigs, stateIsHosted, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.yahoo.vespa.model.ConfigProducer
addUserConfig, cascadeConfig, dump, getChildren, getConfigId, getDescendantServices, getUserConfigs, hostSystem, validate
-
Methods inherited from interface com.yahoo.vespa.model.NetworkPortRequestor
getConfigId
-
-
-
-
Field Detail
-
BASEPORT
public static final int BASEPORT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConfigProxy
public ConfigProxy(Host host)
Creates a new ConfigProxy instance.- Parameters:
host
- hostname
-
-
Method Detail
-
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 interfaceNetworkPortRequestor
- Overrides:
getWantedPort
in classAbstractService
- 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 interfaceNetworkPortRequestor
- Overrides:
requiresWantedPort
in classAbstractService
- Returns:
- false by default
-
getPortCount
public int getPortCount()
ConfigProxy needs one rpc client port.- Returns:
- The number of ports reserved by the config proxy
-
-