@InterfaceAudience.Public public class ServerConfig extends Object
Modifier and Type | Field and Description |
---|---|
protected InetSocketAddress |
clientPortAddress |
protected File |
dataDir |
protected File |
dataLogDir |
protected String |
initialConfig |
protected long |
jvmPauseInfoThresholdMs
JVM Pause Monitor info threshold in ms
|
protected boolean |
jvmPauseMonitorToRun
JVM Pause Monitor feature switch
|
protected long |
jvmPauseSleepTimeMs
JVM Pause Monitor sleep time in ms
|
protected long |
jvmPauseWarnThresholdMs
JVM Pause Monitor warn threshold in ms
|
protected int |
listenBacklog
defaults to -1 if not set explicitly
|
protected int |
maxClientCnxns |
protected int |
maxSessionTimeout
defaults to -1 if not set explicitly
|
protected String |
metricsProviderClassName |
protected Properties |
metricsProviderConfiguration |
protected int |
minSessionTimeout
defaults to -1 if not set explicitly
|
protected InetSocketAddress |
secureClientPortAddress |
protected int |
tickTime |
Constructor and Description |
---|
ServerConfig() |
Modifier and Type | Method and Description |
---|---|
InetSocketAddress |
getClientPortAddress() |
int |
getClientPortListenBacklog()
Maximum number of pending socket connections to read, -1 if unset
|
File |
getDataDir() |
File |
getDataLogDir() |
long |
getJvmPauseInfoThresholdMs() |
long |
getJvmPauseSleepTimeMs() |
long |
getJvmPauseWarnThresholdMs() |
int |
getMaxClientCnxns() |
int |
getMaxSessionTimeout()
maximum session timeout in milliseconds, -1 if unset
|
String |
getMetricsProviderClassName() |
Properties |
getMetricsProviderConfiguration() |
int |
getMinSessionTimeout()
minimum session timeout in milliseconds, -1 if unset
|
InetSocketAddress |
getSecureClientPortAddress() |
int |
getTickTime() |
boolean |
isJvmPauseMonitorToRun() |
void |
parse(String path)
Parse a ZooKeeper configuration file
|
void |
parse(String[] args)
Parse arguments for server configuration
|
void |
readFrom(QuorumPeerConfig config)
Read attributes from a QuorumPeerConfig.
|
protected InetSocketAddress clientPortAddress
protected InetSocketAddress secureClientPortAddress
protected File dataDir
protected File dataLogDir
protected int tickTime
protected int maxClientCnxns
protected int minSessionTimeout
protected int maxSessionTimeout
protected String metricsProviderClassName
protected Properties metricsProviderConfiguration
protected int listenBacklog
protected String initialConfig
protected boolean jvmPauseMonitorToRun
protected long jvmPauseWarnThresholdMs
protected long jvmPauseInfoThresholdMs
protected long jvmPauseSleepTimeMs
public void parse(String[] args)
args
- clientPort dataDir and optional tickTime and maxClientCnxnsIllegalArgumentException
- on invalid usagepublic void parse(String path) throws QuorumPeerConfig.ConfigException
path
- the patch of the configuration fileQuorumPeerConfig.ConfigException
- error processing configurationpublic void readFrom(QuorumPeerConfig config)
config
- public InetSocketAddress getClientPortAddress()
public InetSocketAddress getSecureClientPortAddress()
public File getDataDir()
public File getDataLogDir()
public int getTickTime()
public int getMaxClientCnxns()
public int getMinSessionTimeout()
public int getMaxSessionTimeout()
public long getJvmPauseInfoThresholdMs()
public long getJvmPauseWarnThresholdMs()
public long getJvmPauseSleepTimeMs()
public boolean isJvmPauseMonitorToRun()
public String getMetricsProviderClassName()
public Properties getMetricsProviderConfiguration()
public int getClientPortListenBacklog()
Copyright © 2008–2020 The Apache Software Foundation. All rights reserved.