@InterfaceAudience.Private public class MasterMaintenanceModeTracker extends ZKListener
Modifier and Type | Field and Description |
---|---|
private boolean |
hasChildren |
watcher
Constructor and Description |
---|
MasterMaintenanceModeTracker(ZKWatcher watcher) |
Modifier and Type | Method and Description |
---|---|
boolean |
isInMaintenanceMode() |
void |
nodeChildrenChanged(String path)
Called when an existing node has a child node added or removed.
|
void |
nodeCreated(String path)
Called when a new node has been created.
|
void |
nodeDeleted(String path)
Called when a node has been deleted
|
void |
start()
Starts the tracking of whether master is in Maintenance Mode.
|
private void |
update() |
private void |
update(String path) |
getWatcher, nodeDataChanged
private boolean hasChildren
public MasterMaintenanceModeTracker(ZKWatcher watcher)
public boolean isInMaintenanceMode()
private void update()
public void start()
public void nodeCreated(String path)
ZKListener
nodeCreated
in class ZKListener
path
- full path of the new nodepublic void nodeDeleted(String path)
ZKListener
nodeDeleted
in class ZKListener
path
- full path of the deleted nodepublic void nodeChildrenChanged(String path)
ZKListener
nodeChildrenChanged
in class ZKListener
path
- full path of the node whose children have changedCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.