Class SyncReplicationPeerInfoProviderImpl
java.lang.Object
org.apache.hadoop.hbase.replication.regionserver.SyncReplicationPeerInfoProviderImpl
- All Implemented Interfaces:
SyncReplicationPeerInfoProvider
@Private
class SyncReplicationPeerInfoProviderImpl
extends Object
implements SyncReplicationPeerInfoProvider
-
Field Summary
Modifier and TypeFieldDescriptionprivate final SyncReplicationPeerMappingManager
private final ReplicationPeers
-
Constructor Summary
ConstructorDescriptionSyncReplicationPeerInfoProviderImpl
(ReplicationPeers replicationPeers, SyncReplicationPeerMappingManager mapping) -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkState
(TableName table, BiPredicate<SyncReplicationState, SyncReplicationState> checker) Check whether the given table is contained in a sync replication peer which can pass the state checker.Return the peer id and remote WAL directory if the table is synchronously replicated and the state isSyncReplicationState.ACTIVE
.
-
Field Details
-
replicationPeers
-
mapping
-
-
Constructor Details
-
SyncReplicationPeerInfoProviderImpl
SyncReplicationPeerInfoProviderImpl(ReplicationPeers replicationPeers, SyncReplicationPeerMappingManager mapping)
-
-
Method Details
-
getPeerIdAndRemoteWALDir
Description copied from interface:SyncReplicationPeerInfoProvider
Return the peer id and remote WAL directory if the table is synchronously replicated and the state isSyncReplicationState.ACTIVE
.- Specified by:
getPeerIdAndRemoteWALDir
in interfaceSyncReplicationPeerInfoProvider
-
checkState
public boolean checkState(TableName table, BiPredicate<SyncReplicationState, SyncReplicationState> checker) Description copied from interface:SyncReplicationPeerInfoProvider
Check whether the given table is contained in a sync replication peer which can pass the state checker.Will call the checker with current sync replication state and new sync replication state.
- Specified by:
checkState
in interfaceSyncReplicationPeerInfoProvider
-