Class LocalPeerBean
- java.lang.Object
- 
- org.apache.zookeeper.server.quorum.ServerBean
- 
- org.apache.zookeeper.server.quorum.LocalPeerBean
 
 
- 
- All Implemented Interfaces:
- ZKMBeanInfo,- LocalPeerMXBean,- ServerMXBean
 
 public class LocalPeerBean extends ServerBean implements LocalPeerMXBean Implementation of the local peer MBean interface.
- 
- 
Constructor SummaryConstructors Constructor Description LocalPeerBean(QuorumPeer peer)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetClientAddress()longgetConfigVersion()StringgetElectionAddress()intgetElectionType()intgetInitLimit()StringgetLearnerType()intgetMaxClientCnxnsPerHost()Current maxClientCnxns allowed from a particular hostintgetMaxCnxns()intgetMaxSessionTimeout()intgetMinSessionTimeout()StringgetName()StringgetQuorumAddress()StringgetQuorumSystemInfo()StringgetState()intgetSyncLimit()intgetTick()intgetTickTime()booleanisHidden()If isHidden returns true, the MBean won't be registered with MBean server, and thus won't be available for management tools.booleanisLeader()booleanisPartOfEnsemble()voidsetInitLimit(int initLimit)Set the number of ticks that the initial sync phase can takevoidsetSyncLimit(int syncLimit)Set the number of ticks that can pass between sending a request and getting a acknowledgment- 
Methods inherited from class org.apache.zookeeper.server.quorum.ServerBeangetStartTime
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.zookeeper.server.quorum.ServerMXBeangetStartTime
 
- 
 
- 
- 
- 
Constructor Detail- 
LocalPeerBeanpublic LocalPeerBean(QuorumPeer peer) 
 
- 
 - 
Method Detail- 
getNamepublic String getName() - Specified by:
- getNamein interface- ServerMXBean
- Specified by:
- getNamein interface- ZKMBeanInfo
- Returns:
- name of the server MBean
 
 - 
isHiddenpublic boolean isHidden() Description copied from interface:ZKMBeanInfoIf isHidden returns true, the MBean won't be registered with MBean server, and thus won't be available for management tools. Used for grouping MBeans.- Specified by:
- isHiddenin interface- ZKMBeanInfo
- Overrides:
- isHiddenin class- ServerBean
- Returns:
- true if the MBean is hidden.
 
 - 
getTickTimepublic int getTickTime() - Specified by:
- getTickTimein interface- LocalPeerMXBean
- Returns:
- the number of milliseconds of each tick
 
 - 
getMaxClientCnxnsPerHostpublic int getMaxClientCnxnsPerHost() Description copied from interface:LocalPeerMXBeanCurrent maxClientCnxns allowed from a particular host- Specified by:
- getMaxClientCnxnsPerHostin interface- LocalPeerMXBean
 
 - 
getMinSessionTimeoutpublic int getMinSessionTimeout() - Specified by:
- getMinSessionTimeoutin interface- LocalPeerMXBean
- Returns:
- the minimum number of milliseconds allowed for a session timeout
 
 - 
getMaxSessionTimeoutpublic int getMaxSessionTimeout() - Specified by:
- getMaxSessionTimeoutin interface- LocalPeerMXBean
- Returns:
- the maximum number of milliseconds allowed for a session timeout
 
 - 
getInitLimitpublic int getInitLimit() - Specified by:
- getInitLimitin interface- LocalPeerMXBean
- Returns:
- the number of ticks that the initial sync phase can take
 
 - 
getSyncLimitpublic int getSyncLimit() - Specified by:
- getSyncLimitin interface- LocalPeerMXBean
- Returns:
- the number of ticks that can pass between sending a request and getting a acknowledgment
 
 - 
setInitLimitpublic void setInitLimit(int initLimit) Description copied from interface:LocalPeerMXBeanSet the number of ticks that the initial sync phase can take- Specified by:
- setInitLimitin interface- LocalPeerMXBean
 
 - 
setSyncLimitpublic void setSyncLimit(int syncLimit) Description copied from interface:LocalPeerMXBeanSet the number of ticks that can pass between sending a request and getting a acknowledgment- Specified by:
- setSyncLimitin interface- LocalPeerMXBean
 
 - 
getTickpublic int getTick() - Specified by:
- getTickin interface- LocalPeerMXBean
- Returns:
- the current tick
 
 - 
getStatepublic String getState() - Specified by:
- getStatein interface- LocalPeerMXBean
- Returns:
- the current server state
 
 - 
getQuorumAddresspublic String getQuorumAddress() - Specified by:
- getQuorumAddressin interface- LocalPeerMXBean
- Returns:
- the quorum address
 
 - 
getElectionTypepublic int getElectionType() - Specified by:
- getElectionTypein interface- LocalPeerMXBean
- Returns:
- the election type
 
 - 
getElectionAddresspublic String getElectionAddress() - Specified by:
- getElectionAddressin interface- LocalPeerMXBean
- Returns:
- the election address
 
 - 
getClientAddresspublic String getClientAddress() - Specified by:
- getClientAddressin interface- LocalPeerMXBean
- Returns:
- the client address
 
 - 
getLearnerTypepublic String getLearnerType() - Specified by:
- getLearnerTypein interface- LocalPeerMXBean
- Returns:
- the learner type
 
 - 
getConfigVersionpublic long getConfigVersion() - Specified by:
- getConfigVersionin interface- LocalPeerMXBean
- Returns:
- the config version
 
 - 
getQuorumSystemInfopublic String getQuorumSystemInfo() - Specified by:
- getQuorumSystemInfoin interface- LocalPeerMXBean
- Returns:
- the quorum system information
 
 - 
isPartOfEnsemblepublic boolean isPartOfEnsemble() - Specified by:
- isPartOfEnsemblein interface- LocalPeerMXBean
- Returns:
- true if quorum peer is part of the ensemble, false otherwise
 
 - 
isLeaderpublic boolean isLeader() - Specified by:
- isLeaderin interface- LocalPeerMXBean
- Returns:
- true if the peer is the current leader
 
 - 
getMaxCnxnspublic int getMaxCnxns() - Specified by:
- getMaxCnxnsin interface- LocalPeerMXBean
- Returns:
- Current maxCnxns allowed to a single ZooKeeper server
 
 
- 
 
-