Package com.yahoo.vespa.model.admin
Class LogForwarder
- java.lang.Object
-
- com.yahoo.config.model.producer.AbstractConfigProducer<AbstractConfigProducer<?>>
-
- com.yahoo.vespa.model.AbstractService
-
- com.yahoo.vespa.model.admin.LogForwarder
-
- All Implemented Interfaces:
com.yahoo.cloud.config.LogforwarderConfig.Producer
,com.yahoo.config.ConfigInstance.Producer
,ConfigProducer
,NetworkPortRequestor
,Service
,Serializable
public class LogForwarder extends AbstractService implements com.yahoo.cloud.config.LogforwarderConfig.Producer
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LogForwarder.Config
-
Field Summary
-
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 LogForwarder(AbstractConfigProducer parent, LogForwarder.Config config)
Creates a new LogForwarder instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
allocatePorts(int start, PortAllocBridge from)
allocate the ports you needstatic LogForwarder.Config
cfg()
void
getConfig(com.yahoo.cloud.config.LogforwarderConfig.Builder builder)
int
getPortCount()
LogForwarder does not need any ports.Optional<String>
getPreShutdownCommand()
Services that wish that a command should be run before shutdown should return the command here.String
getStartupCommand()
Must be overridden by services that should be started by config-sentinel.-
Methods inherited from class com.yahoo.vespa.model.AbstractService
addEnvironmentVariable, addEnvironmentVariable, appendJvmOptions, defaultPreload, distributeCpuSocketAffinity, getAffinity, getDefaultMetricDimensions, getEnv, getHealthPort, getHost, getHostName, getHostResource, getId, getIndex, getJvmOptions, getNumPortsAllocated, getPortsMeta, getPreLoad, getRelativePort, getServiceInfo, getServiceName, getServicePropertyString, getServicePropertyString, getServiceType, getWantedPort, initService, isInitialized, prependJvmOptions, remove, requiresWantedPort, 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
-
-
-
-
Constructor Detail
-
LogForwarder
public LogForwarder(AbstractConfigProducer parent, LogForwarder.Config config)
Creates a new LogForwarder instance.
-
-
Method Detail
-
cfg
public static LogForwarder.Config cfg()
-
allocatePorts
public void allocatePorts(int start, PortAllocBridge from)
Description copied from interface:NetworkPortRequestor
allocate the ports you need- Specified by:
allocatePorts
in interfaceNetworkPortRequestor
-
getPortCount
public int getPortCount()
LogForwarder does not need any ports.- Specified by:
getPortCount
in interfaceNetworkPortRequestor
- Returns:
- The number of ports reserved by the LogForwarder
-
getStartupCommand
public 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 interfaceService
- Overrides:
getStartupCommand
in classAbstractService
- Returns:
- The command used to start LogForwarder
-
getConfig
public void getConfig(com.yahoo.cloud.config.LogforwarderConfig.Builder builder)
- Specified by:
getConfig
in interfacecom.yahoo.cloud.config.LogforwarderConfig.Producer
-
getPreShutdownCommand
public Optional<String> getPreShutdownCommand()
Description copied from interface:Service
Services that wish that a command should be run before shutdown should return the command here. The command will be executed by the config sentinel before sending SIGTERM to the service. The command is executed without a timeout.- Specified by:
getPreShutdownCommand
in interfaceService
- Overrides:
getPreShutdownCommand
in classAbstractService
-
-