@Public public class ServerConfig extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
protected java.net.InetSocketAddress |
clientPortAddress |
|
protected java.lang.String |
dataDir |
|
protected java.lang.String |
dataLogDir |
|
protected int |
maxClientCnxns |
|
protected int |
maxSessionTimeout |
defaults to -1 if not set explicitly
|
protected int |
minSessionTimeout |
defaults to -1 if not set explicitly
|
protected int |
tickTime |
Constructor | Description |
---|---|
ServerConfig() |
Modifier and Type | Method | Description |
---|---|---|
java.net.InetSocketAddress |
getClientPortAddress() |
|
java.lang.String |
getDataDir() |
|
java.lang.String |
getDataLogDir() |
|
int |
getMaxClientCnxns() |
|
int |
getMaxSessionTimeout() |
maximum session timeout in milliseconds, -1 if unset
|
int |
getMinSessionTimeout() |
minimum session timeout in milliseconds, -1 if unset
|
int |
getTickTime() |
|
void |
parse(java.lang.String path) |
Parse a ZooKeeper configuration file
|
void |
parse(java.lang.String[] args) |
Parse arguments for server configuration
|
void |
readFrom(QuorumPeerConfig config) |
Read attributes from a QuorumPeerConfig.
|
protected java.net.InetSocketAddress clientPortAddress
protected java.lang.String dataDir
protected java.lang.String dataLogDir
protected int tickTime
protected int maxClientCnxns
protected int minSessionTimeout
protected int maxSessionTimeout
public void parse(java.lang.String[] args)
args
- clientPort dataDir and optional tickTime and maxClientCnxnsjava.lang.IllegalArgumentException
- on invalid usagepublic void parse(java.lang.String path) throws QuorumPeerConfig.ConfigException
path
- the patch of the configuration fileQuorumPeerConfig.ConfigException
- error processing configurationpublic void readFrom(QuorumPeerConfig config)
config
- public java.net.InetSocketAddress getClientPortAddress()
public java.lang.String getDataDir()
public java.lang.String getDataLogDir()
public int getTickTime()
public int getMaxClientCnxns()
public int getMinSessionTimeout()
public int getMaxSessionTimeout()
Copyright © 2018 The Apache Software Foundation