@InterfaceAudience.Private public class VisibilityReplicationEndpoint extends Object implements ReplicationEndpoint
ReplicationEndpoint.Context, ReplicationEndpoint.ReplicateContext| 构造器和说明 |
|---|
VisibilityReplicationEndpoint(ReplicationEndpoint endpoint,
VisibilityLabelService visibilityLabelsService) |
| 限定符和类型 | 方法和说明 |
|---|---|
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) |
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.
|
public VisibilityReplicationEndpoint(ReplicationEndpoint endpoint, VisibilityLabelService visibilityLabelsService)
public void init(ReplicationEndpoint.Context context) throws IOException
ReplicationEndpointinit 在接口中 ReplicationEndpointcontext - replication contextIOException - error occur when initialize the endpoint.public void peerConfigUpdated(ReplicationPeerConfig rpc)
public boolean replicate(ReplicationEndpoint.ReplicateContext replicateContext)
ReplicationEndpointreplicate 在接口中 ReplicationEndpointreplicateContext - a context where WAL entries and other
parameters can be obtained.public UUID getPeerUUID()
ReplicationEndpointgetPeerUUID 在接口中 ReplicationEndpointpublic boolean canReplicateToSameCluster()
ReplicationEndpointcanReplicateToSameCluster 在接口中 ReplicationEndpointpublic WALEntryFilter getWALEntryfilter()
ReplicationEndpointgetWALEntryfilter 在接口中 ReplicationEndpointWALEntryFilter or null.public boolean isRunning()
ReplicationEndpointtrue if this service is RUNNING.isRunning 在接口中 ReplicationEndpointpublic boolean isStarting()
isStarting 在接口中 ReplicationEndpointtrue is this service is STARTING (but not yet RUNNING).public void start()
ReplicationEndpointstart 在接口中 ReplicationEndpointpublic void awaitRunning()
ReplicationEndpointReplicationEndpoint to be up and running.awaitRunning 在接口中 ReplicationEndpointpublic void awaitRunning(long timeout,
TimeUnit unit)
throws TimeoutException
ReplicationEndpointReplicationEndpoint to to be up and running for no more
than the given time.awaitRunning 在接口中 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 在接口中 ReplicationEndpointpublic void awaitTerminated()
ReplicationEndpointReplicationEndpoint to reach the terminated (internal) state.awaitTerminated 在接口中 ReplicationEndpointpublic void awaitTerminated(long timeout,
TimeUnit unit)
throws TimeoutException
ReplicationEndpointReplicationEndpoint to reach a terminal state for no
more than the given time.awaitTerminated 在接口中 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 在接口中 ReplicationEndpointCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.