@InterfaceAudience.Private public class VisibilityReplicationEndpoint extends Object implements ReplicationEndpoint
ReplicationEndpoint.Context, ReplicationEndpoint.ReplicateContext| Modifier and Type | Field and Description |
|---|---|
private ReplicationEndpoint |
delegator |
private static org.slf4j.Logger |
LOG |
private VisibilityLabelService |
visibilityLabelsService |
| Constructor and Description |
|---|
VisibilityReplicationEndpoint(ReplicationEndpoint endpoint,
VisibilityLabelService visibilityLabelsService) |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitRunning()
Waits for the
ReplicationEndpoint to be up and running. |
void |
awaitRunning(long timeout,
TimeUnit unit)
Waits for the
ReplicationEndpoint to to be up and running for no more
than the given time. |
void |
awaitTerminated()
Waits for the
ReplicationEndpoint to reach the terminated (internal) state. |
void |
awaitTerminated(long timeout,
TimeUnit unit)
Waits for the
ReplicationEndpoint to reach a terminal state for no
more than the given time. |
boolean |
canReplicateToSameCluster()
Whether or not, the replication endpoint can replicate to it's source cluster with the same
UUID
|
Throwable |
failureCause()
Returns the
Throwable that caused this service to fail. |
UUID |
getPeerUUID()
Returns a UUID of the provided peer id.
|
WALEntryFilter |
getWALEntryfilter()
Returns a WALEntryFilter to use for filtering out WALEntries from the log.
|
void |
init(ReplicationEndpoint.Context context)
Initialize the replication endpoint with the given context.
|
boolean |
isRunning()
Returns
true if this service is RUNNING. |
boolean |
isStarting() |
void |
peerConfigUpdated(ReplicationPeerConfig rpc)
Callback method for when users update the ReplicationPeerConfig for this peer
|
boolean |
replicate(ReplicationEndpoint.ReplicateContext replicateContext)
Replicate the given set of entries (in the context) to the other cluster.
|
void |
start()
Initiates service startup and returns immediately.
|
void |
stop()
If the service is starting or running, this initiates service shutdown and returns immediately.
|
private static final org.slf4j.Logger LOG
private final ReplicationEndpoint delegator
private final VisibilityLabelService visibilityLabelsService
public VisibilityReplicationEndpoint(ReplicationEndpoint endpoint, VisibilityLabelService visibilityLabelsService)
public void init(ReplicationEndpoint.Context context) throws IOException
ReplicationEndpointinit in interface ReplicationEndpointcontext - replication contextIOExceptionpublic void peerConfigUpdated(ReplicationPeerConfig rpc)
ReplicationPeerConfigListenerpeerConfigUpdated in interface ReplicationPeerConfigListenerrpc - The updated ReplicationPeerConfigpublic boolean replicate(ReplicationEndpoint.ReplicateContext replicateContext)
ReplicationEndpointreplicate in interface ReplicationEndpointreplicateContext - a context where WAL entries and other
parameters can be obtained.public UUID getPeerUUID()
ReplicationEndpointgetPeerUUID in interface ReplicationEndpointpublic boolean canReplicateToSameCluster()
ReplicationEndpointcanReplicateToSameCluster in interface ReplicationEndpointpublic WALEntryFilter getWALEntryfilter()
ReplicationEndpointgetWALEntryfilter in interface ReplicationEndpointWALEntryFilter or null.public boolean isRunning()
ReplicationEndpointtrue if this service is RUNNING.isRunning in interface ReplicationEndpointpublic boolean isStarting()
isStarting in interface ReplicationEndpointtrue is this service is STARTING (but not yet RUNNING).public void start()
ReplicationEndpointstart in interface ReplicationEndpointpublic void awaitRunning()
ReplicationEndpointReplicationEndpoint to be up and running.awaitRunning in interface ReplicationEndpointpublic void awaitRunning(long timeout, TimeUnit unit) throws TimeoutException
ReplicationEndpointReplicationEndpoint to to be up and running for no more
than the given time.awaitRunning in interface ReplicationEndpointtimeout - the maximum time to waitunit - the time unit of the timeout argumentTimeoutException - if the service has not reached the given state within the deadlinepublic void stop()
ReplicationEndpointstop in interface ReplicationEndpointpublic void awaitTerminated()
ReplicationEndpointReplicationEndpoint to reach the terminated (internal) state.awaitTerminated in interface ReplicationEndpointpublic void awaitTerminated(long timeout, TimeUnit unit) throws TimeoutException
ReplicationEndpointReplicationEndpoint to reach a terminal state for no
more than the given time.awaitTerminated in interface ReplicationEndpointtimeout - the maximum time to waitunit - the time unit of the timeout argumentTimeoutException - if the service has not reached the given state within the deadlinepublic Throwable failureCause()
ReplicationEndpointThrowable that caused this service to fail.failureCause in interface ReplicationEndpointCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.