org.apache.zookeeper.server.quorum
Class QuorumPeerConfig

java.lang.Object
  extended by org.apache.zookeeper.server.quorum.QuorumPeerConfig

public class QuorumPeerConfig
extends Object


Nested Class Summary
static class QuorumPeerConfig.ConfigException
           
 
Field Summary
protected  InetSocketAddress clientPortAddress
           
protected  String dataDir
           
protected  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  HashMap<Long,QuorumPeer.QuorumServer> observers
           
protected  QuorumPeer.LearnerType peerType
           
protected  QuorumVerifier quorumVerifier
           
protected  HashMap<Long,Long> serverGroup
           
protected  long serverId
           
protected  HashMap<Long,QuorumPeer.QuorumServer> servers
           
protected  HashMap<Long,Long> serverWeight
           
protected  int syncLimit
           
protected  int tickTime
           
 
Constructor Summary
QuorumPeerConfig()
           
 
Method Summary
 InetSocketAddress getClientPortAddress()
           
 String getDataDir()
           
 String getDataLogDir()
           
 int getElectionAlg()
           
 int getElectionPort()
           
 int getInitLimit()
           
 int getMaxClientCnxns()
           
 int getMaxSessionTimeout()
           
 int getMinSessionTimeout()
           
 QuorumPeer.LearnerType getPeerType()
           
 QuorumVerifier getQuorumVerifier()
           
 long getServerId()
           
 Map<Long,QuorumPeer.QuorumServer> getServers()
           
 int getSyncLimit()
           
 int getTickTime()
           
 boolean isDistributed()
           
 void parse(String path)
          Parse a ZooKeeper configuration file
 void parseProperties(Properties zkProp)
          Parse config from a Properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clientPortAddress

protected InetSocketAddress clientPortAddress

dataDir

protected String dataDir

dataLogDir

protected String dataLogDir

tickTime

protected int tickTime

maxClientCnxns

protected int maxClientCnxns

minSessionTimeout

protected int minSessionTimeout
defaults to -1 if not set explicitly


maxSessionTimeout

protected int maxSessionTimeout
defaults to -1 if not set explicitly


initLimit

protected int initLimit

syncLimit

protected int syncLimit

electionAlg

protected int electionAlg

electionPort

protected int electionPort

servers

protected final HashMap<Long,QuorumPeer.QuorumServer> servers

observers

protected final HashMap<Long,QuorumPeer.QuorumServer> observers

serverId

protected long serverId

serverWeight

protected HashMap<Long,Long> serverWeight

serverGroup

protected HashMap<Long,Long> serverGroup

numGroups

protected int numGroups

quorumVerifier

protected QuorumVerifier quorumVerifier

peerType

protected QuorumPeer.LearnerType peerType
Constructor Detail

QuorumPeerConfig

public QuorumPeerConfig()
Method Detail

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

getClientPortAddress

public InetSocketAddress getClientPortAddress()

getDataDir

public String getDataDir()

getDataLogDir

public String getDataLogDir()

getTickTime

public int getTickTime()

getMaxClientCnxns

public int getMaxClientCnxns()

getMinSessionTimeout

public int getMinSessionTimeout()

getMaxSessionTimeout

public int getMaxSessionTimeout()

getInitLimit

public int getInitLimit()

getSyncLimit

public int getSyncLimit()

getElectionAlg

public int getElectionAlg()

getElectionPort

public int getElectionPort()

getQuorumVerifier

public QuorumVerifier getQuorumVerifier()

getServers

public Map<Long,QuorumPeer.QuorumServer> getServers()

getServerId

public long getServerId()

isDistributed

public boolean isDistributed()

getPeerType

public QuorumPeer.LearnerType getPeerType()


Copyright © 2012 The Apache Software Foundation