Interface ReplicationPeerStorage
- All Known Implementing Classes:
FSReplicationPeerStorage
,ZKReplicationPeerStorage
Perform read/write to the replication peer storage.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPeer
(String peerId, ReplicationPeerConfig peerConfig, boolean enabled) Add a replication peer.getPeerConfig
(String peerId) Get the peer config of a replication peer.boolean
isPeerEnabled
(String peerId) Test whether a replication peer is enabled.Return the peer ids of all replication peers.void
removePeer
(String peerId) Remove a replication peer.void
setPeerState
(String peerId, boolean enabled) Set the state of peer,true
toENABLED
, otherwise toDISABLED
.void
updatePeerConfig
(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,true
toENABLED
, 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.
-