private static class SplitOrMergeTracker.SwitchStateTracker extends ZKNodeTracker
abortable, LOG, nodewatcher| Constructor and Description | 
|---|
| SwitchStateTracker(ZKWatcher watcher,
                  String node,
                  Abortable abortable) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | isSwitchEnabled()Return true if the switch is on, false otherwise | 
| private org.apache.hadoop.hbase.shaded.protobuf.generated.ZooKeeperProtos.SwitchState | parseFrom(byte[] bytes) | 
| void | setSwitchEnabled(boolean enabled)Set the switch on/off | 
| private byte[] | toByteArray(boolean enabled) | 
blockUntilAvailable, blockUntilAvailable, checkIfBaseNodeAvailable, getData, getNode, nodeCreated, nodeDataChanged, nodeDeleted, start, stop, toStringgetWatcher, nodeChildrenChangedpublic SwitchStateTracker(ZKWatcher watcher, String node, Abortable abortable)
public boolean isSwitchEnabled()
public void setSwitchEnabled(boolean enabled) throws org.apache.zookeeper.KeeperException
enabled - switch enabled or not?org.apache.zookeeper.KeeperException - keepException will be thrown outprivate byte[] toByteArray(boolean enabled)
private org.apache.hadoop.hbase.shaded.protobuf.generated.ZooKeeperProtos.SwitchState parseFrom(byte[] bytes) throws DeserializationException
DeserializationExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.