org.apache.zookeeper.server.quorum
Class QuorumPeerConfig
java.lang.Object
org.apache.zookeeper.server.quorum.QuorumPeerConfig
public class QuorumPeerConfig
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
clientPort
protected int clientPort
dataDir
protected String dataDir
dataLogDir
protected String dataLogDir
tickTime
protected int tickTime
initLimit
protected int initLimit
syncLimit
protected int syncLimit
electionAlg
protected int electionAlg
electionPort
protected int electionPort
maxClientCnxns
protected int maxClientCnxns
servers
protected final HashMap<Long,QuorumPeer.QuorumServer> servers
serverId
protected long serverId
serverWeight
protected HashMap<Long,Long> serverWeight
serverGroup
protected HashMap<Long,Long> serverGroup
numGroups
protected int numGroups
quorumVerifier
protected QuorumVerifier quorumVerifier
QuorumPeerConfig
public QuorumPeerConfig()
parse
public void parse(String path)
throws QuorumPeerConfig.ConfigException
- Parse a ZooKeeper configuration file
- Parameters:
path
- the patch of the configuration file
- Throws:
QuorumPeerConfig.ConfigException
- error processing configuration
parseProperties
public void parseProperties(Properties zkProp)
throws IOException,
QuorumPeerConfig.ConfigException
- Parse config from a Properties.
- Parameters:
zkProp
- Properties to parse from.
- Throws:
IOException
QuorumPeerConfig.ConfigException
getClientPort
public int getClientPort()
getDataDir
public String getDataDir()
getDataLogDir
public String getDataLogDir()
getTickTime
public int getTickTime()
getInitLimit
public int getInitLimit()
getSyncLimit
public int getSyncLimit()
getElectionAlg
public int getElectionAlg()
getElectionPort
public int getElectionPort()
getMaxClientCnxns
public int getMaxClientCnxns()
getQuorumVerifier
public QuorumVerifier getQuorumVerifier()
getServers
public Map<Long,QuorumPeer.QuorumServer> getServers()
getServerId
public long getServerId()
isDistributed
public boolean isDistributed()