|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.zookeeper.server.ServerConfig
public class ServerConfig
Server configuration storage. We use this instead of Properties as it's typed.
| Field Summary | |
|---|---|
protected InetSocketAddress |
clientPortAddress
|
protected String |
dataDir
|
protected 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 Summary | |
|---|---|
ServerConfig()
|
|
| Method Summary | |
|---|---|
InetSocketAddress |
getClientPortAddress()
|
String |
getDataDir()
|
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(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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected InetSocketAddress clientPortAddress
protected String dataDir
protected String dataLogDir
protected int tickTime
protected int maxClientCnxns
protected int minSessionTimeout
protected int maxSessionTimeout
| Constructor Detail |
|---|
public ServerConfig()
| Method Detail |
|---|
public void parse(String[] args)
args - clientPort dataDir and optional tickTime
IllegalArgumentException - on invalid usage
public void parse(String path)
throws QuorumPeerConfig.ConfigException
path - the patch of the configuration file
QuorumPeerConfig.ConfigException - error processing configurationpublic void readFrom(QuorumPeerConfig config)
config - public InetSocketAddress getClientPortAddress()
public String getDataDir()
public String getDataLogDir()
public int getTickTime()
public int getMaxClientCnxns()
public int getMinSessionTimeout()
public int getMaxSessionTimeout()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||