public class QuorumPeerConfig
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
QuorumPeerConfig.ConfigException |
Modifier and Type | Field and Description |
---|---|
protected java.net.InetSocketAddress |
clientPortAddress |
protected java.lang.String |
dataDir |
protected java.lang.String |
dataLogDir |
protected int |
electionAlg |
protected int |
electionPort |
protected int |
initLimit |
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 |
numGroups |
protected java.util.HashMap<java.lang.Long,QuorumPeer.QuorumServer> |
observers |
protected QuorumPeer.LearnerType |
peerType |
protected int |
purgeInterval |
protected QuorumVerifier |
quorumVerifier |
protected java.util.HashMap<java.lang.Long,java.lang.Long> |
serverGroup |
protected long |
serverId |
protected java.util.HashMap<java.lang.Long,QuorumPeer.QuorumServer> |
servers |
protected java.util.HashMap<java.lang.Long,java.lang.Long> |
serverWeight |
protected int |
snapRetainCount |
protected int |
syncLimit |
protected int |
tickTime |
Constructor and Description |
---|
QuorumPeerConfig() |
Modifier and Type | Method and Description |
---|---|
java.net.InetSocketAddress |
getClientPortAddress() |
java.lang.String |
getDataDir() |
java.lang.String |
getDataLogDir() |
int |
getElectionAlg() |
int |
getElectionPort() |
int |
getInitLimit() |
int |
getMaxClientCnxns() |
int |
getMaxSessionTimeout() |
int |
getMinSessionTimeout() |
QuorumPeer.LearnerType |
getPeerType() |
int |
getPurgeInterval() |
QuorumVerifier |
getQuorumVerifier() |
long |
getServerId() |
java.util.Map<java.lang.Long,QuorumPeer.QuorumServer> |
getServers() |
int |
getSnapRetainCount() |
int |
getSyncLimit() |
int |
getTickTime() |
boolean |
isDistributed() |
void |
parse(java.lang.String path)
Parse a ZooKeeper configuration file
|
void |
parseProperties(java.util.Properties zkProp)
Parse config from a Properties.
|
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
protected int initLimit
protected int syncLimit
protected int electionAlg
protected int electionPort
protected final java.util.HashMap<java.lang.Long,QuorumPeer.QuorumServer> servers
protected final java.util.HashMap<java.lang.Long,QuorumPeer.QuorumServer> observers
protected long serverId
protected java.util.HashMap<java.lang.Long,java.lang.Long> serverWeight
protected java.util.HashMap<java.lang.Long,java.lang.Long> serverGroup
protected int numGroups
protected QuorumVerifier quorumVerifier
protected int snapRetainCount
protected int purgeInterval
protected QuorumPeer.LearnerType peerType
public void parse(java.lang.String path) throws QuorumPeerConfig.ConfigException
path
- the patch of the configuration fileQuorumPeerConfig.ConfigException
- error processing configurationpublic void parseProperties(java.util.Properties zkProp) throws java.io.IOException, QuorumPeerConfig.ConfigException
zkProp
- Properties to parse from.java.io.IOException
QuorumPeerConfig.ConfigException
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()
public int getInitLimit()
public int getSyncLimit()
public int getElectionAlg()
public int getElectionPort()
public int getSnapRetainCount()
public int getPurgeInterval()
public QuorumVerifier getQuorumVerifier()
public java.util.Map<java.lang.Long,QuorumPeer.QuorumServer> getServers()
public long getServerId()
public boolean isDistributed()
public QuorumPeer.LearnerType getPeerType()
Copyright © 2016 The Apache Software Foundation