private static class SyncReplicationWALProvider.DefaultSyncReplicationPeerInfoProvider extends Object implements SyncReplicationPeerInfoProvider
Modifier | Constructor and Description |
---|---|
private |
DefaultSyncReplicationPeerInfoProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
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.
|
Optional<Pair<String,String>> |
getPeerIdAndRemoteWALDir(TableName table)
Return the peer id and remote WAL directory if the table is synchronously replicated and the
state is
SyncReplicationState.ACTIVE . |
private DefaultSyncReplicationPeerInfoProvider()
public Optional<Pair<String,String>> getPeerIdAndRemoteWALDir(TableName table)
SyncReplicationPeerInfoProvider
SyncReplicationState.ACTIVE
.getPeerIdAndRemoteWALDir
in interface SyncReplicationPeerInfoProvider
public boolean checkState(TableName table, BiPredicate<SyncReplicationState,SyncReplicationState> checker)
SyncReplicationPeerInfoProvider
Will call the checker with current sync replication state and new sync replication state.
checkState
in interface SyncReplicationPeerInfoProvider
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.