Package org.apache.zookeeper.server
Class ServerConfig
- java.lang.Object
- 
- org.apache.zookeeper.server.ServerConfig
 
- 
 @Public public class ServerConfig extends Object Server configuration storage. We use this instead of Properties as it's typed.
- 
- 
Field SummaryFields Modifier and Type Field Description protected InetSocketAddressclientPortAddressprotected FiledataDirprotected FiledataLogDirprotected StringinitialConfigprotected longjvmPauseInfoThresholdMsJVM Pause Monitor info threshold in msprotected booleanjvmPauseMonitorToRunJVM Pause Monitor feature switchprotected longjvmPauseSleepTimeMsJVM Pause Monitor sleep time in msprotected longjvmPauseWarnThresholdMsJVM Pause Monitor warn threshold in msprotected intlistenBacklogdefaults to -1 if not set explicitlyprotected intmaxClientCnxnsprotected intmaxSessionTimeoutdefaults to -1 if not set explicitlyprotected StringmetricsProviderClassNameprotected PropertiesmetricsProviderConfigurationprotected intminSessionTimeoutdefaults to -1 if not set explicitlyprotected InetSocketAddresssecureClientPortAddressprotected inttickTime
 - 
Constructor SummaryConstructors Constructor Description ServerConfig()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description InetSocketAddressgetClientPortAddress()intgetClientPortListenBacklog()Maximum number of pending socket connections to read, -1 if unsetFilegetDataDir()FilegetDataLogDir()longgetJvmPauseInfoThresholdMs()longgetJvmPauseSleepTimeMs()longgetJvmPauseWarnThresholdMs()intgetMaxClientCnxns()intgetMaxSessionTimeout()maximum session timeout in milliseconds, -1 if unsetStringgetMetricsProviderClassName()PropertiesgetMetricsProviderConfiguration()intgetMinSessionTimeout()minimum session timeout in milliseconds, -1 if unsetInetSocketAddressgetSecureClientPortAddress()intgetTickTime()booleanisJvmPauseMonitorToRun()voidparse(String path)Parse a ZooKeeper configuration filevoidparse(String[] args)Parse arguments for server configurationvoidreadFrom(QuorumPeerConfig config)Read attributes from a QuorumPeerConfig.
 
- 
- 
- 
Field Detail- 
clientPortAddressprotected InetSocketAddress clientPortAddress 
 - 
secureClientPortAddressprotected InetSocketAddress secureClientPortAddress 
 - 
dataDirprotected File dataDir 
 - 
dataLogDirprotected File dataLogDir 
 - 
tickTimeprotected int tickTime 
 - 
maxClientCnxnsprotected int maxClientCnxns 
 - 
minSessionTimeoutprotected int minSessionTimeout defaults to -1 if not set explicitly
 - 
maxSessionTimeoutprotected int maxSessionTimeout defaults to -1 if not set explicitly
 - 
metricsProviderClassNameprotected String metricsProviderClassName 
 - 
metricsProviderConfigurationprotected Properties metricsProviderConfiguration 
 - 
listenBacklogprotected int listenBacklog defaults to -1 if not set explicitly
 - 
initialConfigprotected String initialConfig 
 - 
jvmPauseMonitorToRunprotected boolean jvmPauseMonitorToRun JVM Pause Monitor feature switch
 - 
jvmPauseWarnThresholdMsprotected long jvmPauseWarnThresholdMs JVM Pause Monitor warn threshold in ms
 - 
jvmPauseInfoThresholdMsprotected long jvmPauseInfoThresholdMs JVM Pause Monitor info threshold in ms
 - 
jvmPauseSleepTimeMsprotected long jvmPauseSleepTimeMs JVM Pause Monitor sleep time in ms
 
- 
 - 
Method Detail- 
parsepublic void parse(String[] args) Parse arguments for server configuration- Parameters:
- args- clientPort dataDir and optional tickTime and maxClientCnxns
- Throws:
- IllegalArgumentException- on invalid usage
 
 - 
parsepublic void parse(String path) throws QuorumPeerConfig.ConfigException Parse a ZooKeeper configuration file- Parameters:
- path- the patch of the configuration file
- Throws:
- QuorumPeerConfig.ConfigException- error processing configuration
 
 - 
readFrompublic void readFrom(QuorumPeerConfig config) Read attributes from a QuorumPeerConfig.- Parameters:
- config-
 
 - 
getClientPortAddresspublic InetSocketAddress getClientPortAddress() 
 - 
getSecureClientPortAddresspublic InetSocketAddress getSecureClientPortAddress() 
 - 
getDataDirpublic File getDataDir() 
 - 
getDataLogDirpublic File getDataLogDir() 
 - 
getTickTimepublic int getTickTime() 
 - 
getMaxClientCnxnspublic int getMaxClientCnxns() 
 - 
getMinSessionTimeoutpublic int getMinSessionTimeout() minimum session timeout in milliseconds, -1 if unset
 - 
getMaxSessionTimeoutpublic int getMaxSessionTimeout() maximum session timeout in milliseconds, -1 if unset
 - 
getJvmPauseInfoThresholdMspublic long getJvmPauseInfoThresholdMs() 
 - 
getJvmPauseWarnThresholdMspublic long getJvmPauseWarnThresholdMs() 
 - 
getJvmPauseSleepTimeMspublic long getJvmPauseSleepTimeMs() 
 - 
isJvmPauseMonitorToRunpublic boolean isJvmPauseMonitorToRun() 
 - 
getMetricsProviderClassNamepublic String getMetricsProviderClassName() 
 - 
getMetricsProviderConfigurationpublic Properties getMetricsProviderConfiguration() 
 - 
getClientPortListenBacklogpublic int getClientPortListenBacklog() Maximum number of pending socket connections to read, -1 if unset
 
- 
 
-