Class LeaderBean
- java.lang.Object
-
- org.apache.zookeeper.server.ZooKeeperServerBean
-
- org.apache.zookeeper.server.quorum.LeaderBean
-
- All Implemented Interfaces:
ZKMBeanInfo,LeaderMXBean,ZooKeeperServerMXBean
public class LeaderBean extends ZooKeeperServerBean implements LeaderMXBean
Leader MBean interface implementation.
-
-
Field Summary
-
Fields inherited from class org.apache.zookeeper.server.ZooKeeperServerBean
zks
-
-
Constructor Summary
Constructors Constructor Description LeaderBean(Leader leader, ZooKeeperServer zks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringfollowerInfo()java.lang.StringgetCurrentZxid()Current zxid of cluster.longgetElectionTimeTaken()intgetLastProposalSize()intgetMaxProposalSize()intgetMinProposalSize()java.lang.StringgetName()voidresetProposalStatistics()Resets statistics of proposal size (min/max/last)-
Methods inherited from class org.apache.zookeeper.server.ZooKeeperServerBean
getAvgRequestLatency, getClientPort, getFsyncThresholdExceedCount, getJuteMaxBufferSize, getMaxClientCnxnsPerHost, getMaxRequestLatency, getMaxSessionTimeout, getMinRequestLatency, getMinSessionTimeout, getNumAliveConnections, getOutstandingRequests, getPacketsReceived, getPacketsSent, getStartTime, getTickTime, getVersion, isHidden, resetFsyncThresholdExceedCount, resetLatency, resetMaxLatency, resetStatistics, setMaxClientCnxnsPerHost, setMaxSessionTimeout, setMinSessionTimeout, setTickTime
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.zookeeper.server.ZooKeeperServerMXBean
getAvgRequestLatency, getClientPort, getFsyncThresholdExceedCount, getJuteMaxBufferSize, getMaxClientCnxnsPerHost, getMaxRequestLatency, getMaxSessionTimeout, getMinRequestLatency, getMinSessionTimeout, getNumAliveConnections, getOutstandingRequests, getPacketsReceived, getPacketsSent, getStartTime, getTickTime, getVersion, resetFsyncThresholdExceedCount, resetLatency, resetMaxLatency, resetStatistics, setMaxClientCnxnsPerHost, setMaxSessionTimeout, setMinSessionTimeout, setTickTime
-
-
-
-
Constructor Detail
-
LeaderBean
public LeaderBean(Leader leader, ZooKeeperServer zks)
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceZKMBeanInfo- Overrides:
getNamein classZooKeeperServerBean- Returns:
- a string identifying the MBean
-
getCurrentZxid
public java.lang.String getCurrentZxid()
Description copied from interface:LeaderMXBeanCurrent zxid of cluster.- Specified by:
getCurrentZxidin interfaceLeaderMXBean
-
followerInfo
public java.lang.String followerInfo()
- Specified by:
followerInfoin interfaceLeaderMXBean- Returns:
- information on current followers
-
getElectionTimeTaken
public long getElectionTimeTaken()
- Specified by:
getElectionTimeTakenin interfaceLeaderMXBean- Returns:
- time taken for leader election in milliseconds.
-
getLastProposalSize
public int getLastProposalSize()
- Specified by:
getLastProposalSizein interfaceLeaderMXBean- Returns:
- size of latest generated proposal
-
getMinProposalSize
public int getMinProposalSize()
- Specified by:
getMinProposalSizein interfaceLeaderMXBean- Returns:
- size of smallest generated proposal
-
getMaxProposalSize
public int getMaxProposalSize()
- Specified by:
getMaxProposalSizein interfaceLeaderMXBean- Returns:
- size of largest generated proposal
-
resetProposalStatistics
public void resetProposalStatistics()
Description copied from interface:LeaderMXBeanResets statistics of proposal size (min/max/last)- Specified by:
resetProposalStatisticsin interfaceLeaderMXBean
-
-