org.apache.hadoop.hbase.replication
Class BaseReplicationEndpoint

java.lang.Object
  extended by com.google.common.util.concurrent.AbstractService
      extended by org.apache.hadoop.hbase.replication.BaseReplicationEndpoint
All Implemented Interfaces:
com.google.common.util.concurrent.Service, ReplicationEndpoint
Direct Known Subclasses:
HBaseReplicationEndpoint

@InterfaceAudience.LimitedPrivate(value="Replication")
public abstract class BaseReplicationEndpoint
extends com.google.common.util.concurrent.AbstractService
implements ReplicationEndpoint

A Base implementation for ReplicationEndpoints. Users should consider extending this class rather than implementing ReplicationEndpoint directly for better backwards compatibility.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.replication.ReplicationEndpoint
ReplicationEndpoint.Context, ReplicationEndpoint.ReplicateContext
 
Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service
com.google.common.util.concurrent.Service.State
 
Field Summary
protected  ReplicationEndpoint.Context ctx
           
 
Constructor Summary
BaseReplicationEndpoint()
           
 
Method Summary
 boolean canReplicateToSameCluster()
          Whether or not, the replication endpoint can replicate to it's source cluster with the same UUID
protected  WALEntryFilter getScopeWALEntryFilter()
          Returns a WALEntryFilter for checking the scope.
protected  WALEntryFilter getTableCfWALEntryFilter()
          Returns a WALEntryFilter for checking replication per table and CF.
 WALEntryFilter getWALEntryfilter()
          Returns a default set of filters
 void init(ReplicationEndpoint.Context context)
          Initialize the replication endpoint with the given context.
 
Methods inherited from class com.google.common.util.concurrent.AbstractService
doStart, doStop, isRunning, notifyFailed, notifyStarted, notifyStopped, start, startAndWait, state, stop, stopAndWait, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.hbase.replication.ReplicationEndpoint
getPeerUUID, replicate
 
Methods inherited from interface com.google.common.util.concurrent.Service
isRunning, start, startAndWait, state, stop, stopAndWait
 

Field Detail

ctx

protected ReplicationEndpoint.Context ctx
Constructor Detail

BaseReplicationEndpoint

public BaseReplicationEndpoint()
Method Detail

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

getWALEntryfilter

public WALEntryFilter getWALEntryfilter()
Returns a default set of filters

Specified by:
getWALEntryfilter in interface ReplicationEndpoint
Returns:
a WALEntryFilter or null.

getScopeWALEntryFilter

protected WALEntryFilter getScopeWALEntryFilter()
Returns a WALEntryFilter for checking the scope. Subclasses can return null if they don't want this filter


getTableCfWALEntryFilter

protected WALEntryFilter getTableCfWALEntryFilter()
Returns a WALEntryFilter for checking replication per table and CF. Subclasses can return null if they don't want this filter


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


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.