@InterfaceAudience.Private public class DeletionListener extends ZooKeeperListener
watcher
Constructor and Description |
---|
DeletionListener(ZooKeeperWatcher zkWatcher,
java.lang.String pathToWatch,
java.util.concurrent.CountDownLatch deletedLatch)
Create a new instance of the deletion watcher.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
getException()
Get the last exception which has occurred when re-setting the watch.
|
boolean |
hasException()
Check if an exception has occurred when re-setting the watch.
|
void |
nodeDataChanged(java.lang.String path)
Called when an existing node has changed data.
|
void |
nodeDeleted(java.lang.String path)
Called when a node has been deleted
|
getWatcher, nodeChildrenChanged, nodeCreated
public DeletionListener(ZooKeeperWatcher zkWatcher, java.lang.String pathToWatch, java.util.concurrent.CountDownLatch deletedLatch)
zkWatcher
- ZookeeperWatcher instancepathToWatch
- (Fully qualified) ZNode path that we are waiting to
be deleted.deletedLatch
- Count down on this latch when deletion has occured.public boolean hasException()
public java.lang.Throwable getException()
public void nodeDataChanged(java.lang.String path)
ZooKeeperListener
nodeDataChanged
in class ZooKeeperListener
path
- full path of the updated nodepublic void nodeDeleted(java.lang.String path)
ZooKeeperListener
nodeDeleted
in class ZooKeeperListener
path
- full path of the deleted node