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  File dataDir
           
protected  File 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  int purgeInterval
           
protected  QuorumVerifier quorumVerifier
           
protected  HashMap<Long,Long> serverGroup
           
protected  long serverId
           
protected  HashMap<Long,QuorumPeer.QuorumServer> servers
           
protected  HashMap<Long,Long> serverWeight
           
protected  int snapRetainCount
           
protected  int syncLimit
           
protected  int tickTime
           
 
Constructor Summary
QuorumPeerConfig()
           
 
Method Summary
 InetSocketAddress getClientPortAddress()
           
 File getDataDir()
           
 File getDataLogDir()
           
 int getElectionAlg()
           
 int getElectionPort()
           
 int getInitLimit()
           
 int getMaxClientCnxns()
           
 int getMaxSessionTimeout()
           
 int getMinSessionTimeout()
           
 QuorumPeer.LearnerType getPeerType()
           
 int getPurgeInterval()
           
 QuorumVerifier getQuorumVerifier()
           
 long getServerId()
           
 Map<Long,QuorumPeer.QuorumServer> getServers()
           
 int getSnapRetainCount()
           
 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 File dataDir

dataLogDir

protected File 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

snapRetainCount

protected int snapRetainCount

purgeInterval

protected int purgeInterval

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 File getDataDir()

getDataLogDir

public File 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()

getSnapRetainCount

public int getSnapRetainCount()

getPurgeInterval

public int getPurgeInterval()

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 © 2011 The Apache Software Foundation