org.apache.hadoop.hbase.replication
Class ReplicationStateImpl
java.lang.Object
org.apache.hadoop.hbase.replication.ReplicationStateImpl
- All Implemented Interfaces:
- Closeable, ReplicationStateInterface
public class ReplicationStateImpl
- extends Object
- implements ReplicationStateInterface
ReplicationStateImpl is responsible for maintaining the replication state
znode.
Method Summary |
void |
close()
|
boolean |
getState()
Get the current state of replication (i.e. |
void |
setState(boolean newState)
Set the state of replication. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReplicationStateImpl
public ReplicationStateImpl(ZooKeeperWatcher zk,
String stateZnode,
Abortable abortable,
AtomicBoolean replicating)
getState
public boolean getState()
throws org.apache.zookeeper.KeeperException
- Description copied from interface:
ReplicationStateInterface
- Get the current state of replication (i.e. ENABLED or DISABLED).
- Specified by:
getState
in interface ReplicationStateInterface
- Returns:
- true if replication is enabled, false otherwise
- Throws:
org.apache.zookeeper.KeeperException
setState
public void setState(boolean newState)
throws org.apache.zookeeper.KeeperException
- Description copied from interface:
ReplicationStateInterface
- Set the state of replication.
- Specified by:
setState
in interface ReplicationStateInterface
- Throws:
org.apache.zookeeper.KeeperException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Throws:
IOException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.