private static class SplitOrMergeTracker.SwitchStateTracker extends ZKNodeTracker
abortable, LOG, node
watcher
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, toString
getWatcher, nodeChildrenChanged
public 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
DeserializationException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.