org.apache.hadoop.hbase.security.visibility
Class VisibilityReplicationEndpoint
java.lang.Object
org.apache.hadoop.hbase.security.visibility.VisibilityReplicationEndpoint
- All Implemented Interfaces:
- com.google.common.util.concurrent.Service, ReplicationEndpoint
@InterfaceAudience.Private
public class VisibilityReplicationEndpoint
- extends Object
- implements ReplicationEndpoint
Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service |
com.google.common.util.concurrent.Service.State |
Method Summary |
boolean |
canReplicateToSameCluster()
Whether or not, the replication endpoint can replicate to it's source cluster with the same
UUID |
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()
|
boolean |
replicate(ReplicationEndpoint.ReplicateContext replicateContext)
Replicate the given set of entries (in the context) to the other cluster. |
com.google.common.util.concurrent.ListenableFuture<com.google.common.util.concurrent.Service.State> |
start()
|
com.google.common.util.concurrent.Service.State |
startAndWait()
|
com.google.common.util.concurrent.Service.State |
state()
|
com.google.common.util.concurrent.ListenableFuture<com.google.common.util.concurrent.Service.State> |
stop()
|
com.google.common.util.concurrent.Service.State |
stopAndWait()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VisibilityReplicationEndpoint
public VisibilityReplicationEndpoint(ReplicationEndpoint endpoint,
VisibilityLabelService visibilityLabelsService)
init
public void init(ReplicationEndpoint.Context context)
throws IOException
- Description copied from interface:
ReplicationEndpoint
- Initialize the replication endpoint with the given context.
- Specified by:
init
in interface ReplicationEndpoint
- Parameters:
context
- replication context
- Throws:
IOException
replicate
public boolean replicate(ReplicationEndpoint.ReplicateContext replicateContext)
- Description copied from interface:
ReplicationEndpoint
- Replicate the given set of entries (in the context) to the other cluster.
Can block until all the given entries are replicated. Upon this method is returned,
all entries that were passed in the context are assumed to be persisted in the
target cluster.
- Specified by:
replicate
in interface ReplicationEndpoint
- Parameters:
replicateContext
- a context where WAL entries and other
parameters can be obtained.
getPeerUUID
public UUID getPeerUUID()
- Description copied from interface:
ReplicationEndpoint
- Returns a UUID of the provided peer id. Every HBase cluster instance has a persisted
associated UUID. If the replication is not performed to an actual HBase cluster (but
some other system), the UUID returned has to uniquely identify the connected target system.
- Specified by:
getPeerUUID
in interface ReplicationEndpoint
- Returns:
- a UUID or null if the peer cluster does not exist or is not connected.
canReplicateToSameCluster
public boolean canReplicateToSameCluster()
- Description copied from interface:
ReplicationEndpoint
- Whether or not, the replication endpoint can replicate to it's source cluster with the same
UUID
- Specified by:
canReplicateToSameCluster
in interface ReplicationEndpoint
getWALEntryfilter
public WALEntryFilter getWALEntryfilter()
- Description copied from interface:
ReplicationEndpoint
- Returns a WALEntryFilter to use for filtering out WALEntries from the log. Replication
infrastructure will call this filter before sending the edits to shipEdits().
- Specified by:
getWALEntryfilter
in interface ReplicationEndpoint
- Returns:
- a
WALEntryFilter
or null.
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interface com.google.common.util.concurrent.Service
start
public com.google.common.util.concurrent.ListenableFuture<com.google.common.util.concurrent.Service.State> start()
- Specified by:
start
in interface com.google.common.util.concurrent.Service
startAndWait
public com.google.common.util.concurrent.Service.State startAndWait()
- Specified by:
startAndWait
in interface com.google.common.util.concurrent.Service
state
public com.google.common.util.concurrent.Service.State state()
- Specified by:
state
in interface com.google.common.util.concurrent.Service
stop
public com.google.common.util.concurrent.ListenableFuture<com.google.common.util.concurrent.Service.State> stop()
- Specified by:
stop
in interface com.google.common.util.concurrent.Service
stopAndWait
public com.google.common.util.concurrent.Service.State stopAndWait()
- Specified by:
stopAndWait
in interface com.google.common.util.concurrent.Service
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.