Class RemotePeerBean
- java.lang.Object
-
- org.apache.zookeeper.server.quorum.RemotePeerBean
-
- All Implemented Interfaces:
ZKMBeanInfo,RemotePeerMXBean
public class RemotePeerBean extends Object implements RemotePeerMXBean, ZKMBeanInfo
A remote peer bean only provides limited information about the remote peer, and the peer cannot be managed remotely.
-
-
Constructor Summary
Constructors Constructor Description RemotePeerBean(QuorumPeer localPeer, QuorumPeer.QuorumServer peer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetClientAddress()StringgetElectionAddress()StringgetLearnerType()StringgetName()StringgetQuorumAddress()booleanisHidden()If isHidden returns true, the MBean won't be registered with MBean server, and thus won't be available for management tools.booleanisLeader()voidsetQuorumServer(QuorumPeer.QuorumServer peer)
-
-
-
Constructor Detail
-
RemotePeerBean
public RemotePeerBean(QuorumPeer localPeer, QuorumPeer.QuorumServer peer)
-
-
Method Detail
-
setQuorumServer
public void setQuorumServer(QuorumPeer.QuorumServer peer)
-
getName
public String getName()
- Specified by:
getNamein interfaceRemotePeerMXBean- Specified by:
getNamein interfaceZKMBeanInfo- Returns:
- name of the peer
-
isHidden
public 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 interfaceZKMBeanInfo- Returns:
- true if the MBean is hidden.
-
getQuorumAddress
public String getQuorumAddress()
- Specified by:
getQuorumAddressin interfaceRemotePeerMXBean- Returns:
- IP address of the quorum peer
-
getElectionAddress
public String getElectionAddress()
- Specified by:
getElectionAddressin interfaceRemotePeerMXBean- Returns:
- the election address
-
getClientAddress
public String getClientAddress()
- Specified by:
getClientAddressin interfaceRemotePeerMXBean- Returns:
- the client address
-
getLearnerType
public String getLearnerType()
- Specified by:
getLearnerTypein interfaceRemotePeerMXBean- Returns:
- the learner type
-
isLeader
public boolean isLeader()
- Specified by:
isLeaderin interfaceRemotePeerMXBean- Returns:
- true if the peer is the current leader
-
-