Interface ReplicationPeerStorage
- All Known Implementing Classes:
FSReplicationPeerStorage,ZKReplicationPeerStorage
Perform read/write to the replication peer storage.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled) Add a replication peer.getPeerConfig(String peerId) Get the peer config of a replication peer.booleanisPeerEnabled(String peerId) Test whether a replication peer is enabled.Return the peer ids of all replication peers.voidremovePeer(String peerId) Remove a replication peer.voidsetPeerState(String peerId, boolean enabled) Set the state of peer,truetoENABLED, otherwise toDISABLED.voidupdatePeerConfig(String peerId, ReplicationPeerConfig peerConfig) Update the config a replication peer.
-
Method Details
-
addPeer
void addPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled) throws ReplicationException Add a replication peer.- Throws:
ReplicationException- if there are errors accessing the storage service.
-
removePeer
Remove a replication peer.- Throws:
ReplicationException- if there are errors accessing the storage service.
-
setPeerState
Set the state of peer,truetoENABLED, otherwise toDISABLED.- Throws:
ReplicationException- if there are errors accessing the storage service.
-
updatePeerConfig
Update the config a replication peer.- Throws:
ReplicationException- if there are errors accessing the storage service.
-
listPeerIds
Return the peer ids of all replication peers.- Throws:
ReplicationException- if there are errors accessing the storage service.
-
isPeerEnabled
Test whether a replication peer is enabled.- Throws:
ReplicationException- if there are errors accessing the storage service.
-
getPeerConfig
Get the peer config of a replication peer.- Throws:
ReplicationException- if there are errors accessing the storage service.
-