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 InetSocketAddress
protected File
protected File
protected String
protected long
JVM Pause Monitor info threshold in msprotected boolean
JVM Pause Monitor feature switchprotected long
JVM Pause Monitor sleep time in msprotected long
JVM Pause Monitor warn threshold in msprotected int
defaults to -1 if not set explicitlyprotected int
protected int
defaults to -1 if not set explicitlyprotected String
protected Properties
protected int
defaults to -1 if not set explicitlyprotected InetSocketAddress
protected int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Maximum number of pending socket connections to read, -1 if unsetlong
long
long
int
int
maximum session timeout in milliseconds, -1 if unsetint
minimum session timeout in milliseconds, -1 if unsetint
boolean
void
Parse a ZooKeeper configuration filevoid
Parse arguments for server configurationvoid
readFrom
(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
-