@InterfaceAudience.Private public interface ReplicationPeerStorage
Modifier and Type | Method and Description |
---|---|
void |
addPeer(String peerId,
ReplicationPeerConfig peerConfig,
boolean enabled,
SyncReplicationState syncReplicationState)
Add a replication peer.
|
ReplicationPeerConfig |
getPeerConfig(String peerId)
Get the peer config of a replication peer.
|
SyncReplicationState |
getPeerNewSyncReplicationState(String peerId)
Get the new sync replication state.
|
SyncReplicationState |
getPeerSyncReplicationState(String peerId)
Get the sync replication state.
|
boolean |
isPeerEnabled(String peerId)
Test whether a replication peer is enabled.
|
List<String> |
listPeerIds()
Return the peer ids of all replication peers.
|
void |
removePeer(String peerId)
Remove a replication peer.
|
void |
setPeerNewSyncReplicationState(String peerId,
SyncReplicationState state)
Set the new sync replication state that we are going to transit to.
|
void |
setPeerState(String peerId,
boolean enabled)
Set the state of peer,
true to ENABLED , otherwise to DISABLED . |
void |
transitPeerSyncReplicationState(String peerId)
Overwrite the sync replication state with the new sync replication state which is set with the
setPeerNewSyncReplicationState(String, SyncReplicationState) method above, and clear
the new sync replication state. |
void |
updatePeerConfig(String peerId,
ReplicationPeerConfig peerConfig)
Update the config a replication peer.
|
void addPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled, SyncReplicationState syncReplicationState) throws ReplicationException
ReplicationException
- if there are errors accessing the storage service.void removePeer(String peerId) throws ReplicationException
ReplicationException
- if there are errors accessing the storage service.void setPeerState(String peerId, boolean enabled) throws ReplicationException
true
to ENABLED
, otherwise to DISABLED
.ReplicationException
- if there are errors accessing the storage service.void updatePeerConfig(String peerId, ReplicationPeerConfig peerConfig) throws ReplicationException
ReplicationException
- if there are errors accessing the storage service.List<String> listPeerIds() throws ReplicationException
ReplicationException
- if there are errors accessing the storage service.boolean isPeerEnabled(String peerId) throws ReplicationException
ReplicationException
- if there are errors accessing the storage service.ReplicationPeerConfig getPeerConfig(String peerId) throws ReplicationException
ReplicationException
- if there are errors accessing the storage service.void setPeerNewSyncReplicationState(String peerId, SyncReplicationState state) throws ReplicationException
ReplicationException
- if there are errors accessing the storage service.void transitPeerSyncReplicationState(String peerId) throws ReplicationException
setPeerNewSyncReplicationState(String, SyncReplicationState)
method above, and clear
the new sync replication state.ReplicationException
- if there are errors accessing the storage service.SyncReplicationState getPeerSyncReplicationState(String peerId) throws ReplicationException
ReplicationException
- if there are errors accessing the storage service.SyncReplicationState getPeerNewSyncReplicationState(String peerId) throws ReplicationException
SyncReplicationState.NONE
if we are not
in a transition.ReplicationException
- if there are errors accessing the storage service.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.