Package org.apache.zookeeper.server
Class ServerConfig
java.lang.Object
org.apache.zookeeper.server.ServerConfig
Server configuration storage.
We use this instead of Properties as it's typed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InetSocketAddressprotected Fileprotected Fileprotected Stringprotected longJVM Pause Monitor info threshold in msprotected booleanJVM Pause Monitor feature switchprotected longJVM Pause Monitor sleep time in msprotected longJVM Pause Monitor warn threshold in msprotected intdefaults to -1 if not set explicitlyprotected intprotected intdefaults to -1 if not set explicitlyprotected Stringprotected Propertiesprotected intdefaults to -1 if not set explicitlyprotected InetSocketAddressprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintMaximum number of pending socket connections to read, -1 if unsetlonglonglongintintmaximum session timeout in milliseconds, -1 if unsetintminimum session timeout in milliseconds, -1 if unsetintbooleanvoidParse a ZooKeeper configuration filevoidParse arguments for server configurationvoidreadFrom(QuorumPeerConfig config) Read attributes from a QuorumPeerConfig.
-
Field Details
-
clientPortAddress
-
secureClientPortAddress
-
dataDir
-
dataLogDir
-
tickTime
protected int tickTime -
maxClientCnxns
protected int maxClientCnxns -
minSessionTimeout
protected int minSessionTimeoutdefaults to -1 if not set explicitly -
maxSessionTimeout
protected int maxSessionTimeoutdefaults to -1 if not set explicitly -
metricsProviderClassName
-
metricsProviderConfiguration
-
listenBacklog
protected int listenBacklogdefaults to -1 if not set explicitly -
initialConfig
-
jvmPauseMonitorToRun
protected boolean jvmPauseMonitorToRunJVM Pause Monitor feature switch -
jvmPauseWarnThresholdMs
protected long jvmPauseWarnThresholdMsJVM Pause Monitor warn threshold in ms -
jvmPauseInfoThresholdMs
protected long jvmPauseInfoThresholdMsJVM Pause Monitor info threshold in ms -
jvmPauseSleepTimeMs
protected long jvmPauseSleepTimeMsJVM Pause Monitor sleep time in ms
-
-
Constructor Details
-
ServerConfig
public ServerConfig()
-
-
Method Details
-
parse
Parse arguments for server configuration- Parameters:
args- clientPort dataDir and optional tickTime and maxClientCnxns- Throws:
IllegalArgumentException- on invalid usage
-
parse
Parse a ZooKeeper configuration file- Parameters:
path- the patch of the configuration file- Throws:
QuorumPeerConfig.ConfigException- error processing configuration
-
readFrom
Read attributes from a QuorumPeerConfig.- Parameters:
config-
-
getClientPortAddress
-
getSecureClientPortAddress
-
getDataDir
-
getDataLogDir
-
getTickTime
public int getTickTime() -
getMaxClientCnxns
public int getMaxClientCnxns() -
getMinSessionTimeout
public int getMinSessionTimeout()minimum session timeout in milliseconds, -1 if unset -
getMaxSessionTimeout
public int getMaxSessionTimeout()maximum session timeout in milliseconds, -1 if unset -
getJvmPauseInfoThresholdMs
public long getJvmPauseInfoThresholdMs() -
getJvmPauseWarnThresholdMs
public long getJvmPauseWarnThresholdMs() -
getJvmPauseSleepTimeMs
public long getJvmPauseSleepTimeMs() -
isJvmPauseMonitorToRun
public boolean isJvmPauseMonitorToRun() -
getMetricsProviderClassName
-
getMetricsProviderConfiguration
-
getClientPortListenBacklog
public int getClientPortListenBacklog()Maximum number of pending socket connections to read, -1 if unset
-