@InterfaceAudience.Private public class ReplicationPeers extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
addPeer(String peerId)
Method called after a peer has been connected.
|
Set<String> |
getAllPeerIds()
Returns the set of peerIds of the clusters that have been connected and have an underlying
ReplicationPeer.
|
org.apache.hadoop.conf.Configuration |
getConf() |
ReplicationPeerImpl |
getPeer(String peerId)
Returns the ReplicationPeerImpl for the specified cached peer.
|
Map<String,ReplicationPeerImpl> |
getPeerCache() |
ReplicationPeerStorage |
getPeerStorage() |
void |
init() |
ReplicationPeerConfig |
refreshPeerConfig(String peerId) |
ReplicationPeer.PeerState |
refreshPeerState(String peerId) |
void |
removePeer(String peerId) |
public org.apache.hadoop.conf.Configuration getConf()
public void init()
throws ReplicationException
ReplicationExceptionpublic ReplicationPeerStorage getPeerStorage()
public boolean addPeer(String peerId) throws ReplicationException
peerId - a short that identifies the clusterReplicationExceptionpublic void removePeer(String peerId)
public ReplicationPeerImpl getPeer(String peerId)
peerId - id for the peerpublic Set<String> getAllPeerIds()
public Map<String,ReplicationPeerImpl> getPeerCache()
public ReplicationPeer.PeerState refreshPeerState(String peerId) throws ReplicationException
ReplicationExceptionpublic ReplicationPeerConfig refreshPeerConfig(String peerId) throws ReplicationException
ReplicationExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.