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 Summary
Constructors Constructor Description LocalPeerBean(QuorumPeer peer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getElectionType()
int
getInitLimit()
int
getMaxClientCnxnsPerHost()
Current maxClientCnxns allowed from a particular hostint
getMaxSessionTimeout()
int
getMinSessionTimeout()
java.lang.String
getName()
java.lang.String
getQuorumAddress()
java.lang.String
getState()
int
getSyncLimit()
int
getTick()
int
getTickTime()
boolean
isHidden()
If isHidden returns true, the MBean won't be registered with MBean server, and thus won't be available for management tools.-
Methods inherited from class org.apache.zookeeper.server.quorum.ServerBean
getStartTime
-
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.quorum.ServerMXBean
getStartTime
-
-
-
-
Constructor Detail
-
LocalPeerBean
public LocalPeerBean(QuorumPeer peer)
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceServerMXBean
- Specified by:
getName
in interfaceZKMBeanInfo
- Returns:
- name of the server MBean
-
isHidden
public boolean isHidden()
Description copied from interface:ZKMBeanInfo
If 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:
isHidden
in interfaceZKMBeanInfo
- Overrides:
isHidden
in classServerBean
- Returns:
- true if the MBean is hidden.
-
getTickTime
public int getTickTime()
- Specified by:
getTickTime
in interfaceLocalPeerMXBean
- Returns:
- the number of milliseconds of each tick
-
getMaxClientCnxnsPerHost
public int getMaxClientCnxnsPerHost()
Description copied from interface:LocalPeerMXBean
Current maxClientCnxns allowed from a particular host- Specified by:
getMaxClientCnxnsPerHost
in interfaceLocalPeerMXBean
-
getMinSessionTimeout
public int getMinSessionTimeout()
- Specified by:
getMinSessionTimeout
in interfaceLocalPeerMXBean
- Returns:
- the minimum number of milliseconds allowed for a session timeout
-
getMaxSessionTimeout
public int getMaxSessionTimeout()
- Specified by:
getMaxSessionTimeout
in interfaceLocalPeerMXBean
- Returns:
- the maximum number of milliseconds allowed for a session timeout
-
getInitLimit
public int getInitLimit()
- Specified by:
getInitLimit
in interfaceLocalPeerMXBean
- Returns:
- the number of ticks that the initial sync phase can take
-
getSyncLimit
public int getSyncLimit()
- Specified by:
getSyncLimit
in interfaceLocalPeerMXBean
- Returns:
- the number of ticks that can pass between sending a request and getting a acknowledgment
-
getTick
public int getTick()
- Specified by:
getTick
in interfaceLocalPeerMXBean
- Returns:
- the current tick
-
getState
public java.lang.String getState()
- Specified by:
getState
in interfaceLocalPeerMXBean
- Returns:
- the current server state
-
getQuorumAddress
public java.lang.String getQuorumAddress()
- Specified by:
getQuorumAddress
in interfaceLocalPeerMXBean
- Returns:
- the quorum address
-
getElectionType
public int getElectionType()
- Specified by:
getElectionType
in interfaceLocalPeerMXBean
- Returns:
- the election type
-
-