org.apache.hadoop.hbase.zookeeper
Class DeletionListener
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
org.apache.hadoop.hbase.zookeeper.DeletionListener
@InterfaceAudience.Private
public class DeletionListener
- extends ZooKeeperListener
A ZooKeeper watcher meant to detect deletions of ZNodes.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeletionListener
public DeletionListener(ZooKeeperWatcher zkWatcher,
String pathToWatch,
CountDownLatch deletedLatch)
- Create a new instance of the deletion watcher.
- Parameters:
zkWatcher - ZookeeperWatcher instancepathToWatch - (Fully qualified) ZNode path that we are waiting to
be deleted.deletedLatch - Count down on this latch when deletion has occured.
hasException
public boolean hasException()
- Check if an exception has occurred when re-setting the watch.
- Returns:
- True if we were unable to re-set a watch on a ZNode due to
an exception.
getException
public Throwable getException()
- Get the last exception which has occurred when re-setting the watch.
Use hasException() to check whether or not an exception has occurred.
- Returns:
- The last exception observed when re-setting the watch.
nodeDataChanged
public void nodeDataChanged(String path)
- Overrides:
nodeDataChanged in class ZooKeeperListener
nodeDeleted
public void nodeDeleted(String path)
- Overrides:
nodeDeleted in class ZooKeeperListener
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.