|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.zookeeper.ZooKeeperListener
@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class ZooKeeperListener
Base class for internal listeners of ZooKeeper events.
The ZooKeeperWatcher for a process will execute the appropriate
methods of implementations of this class. In order to receive events from
the watcher, every listener must register itself via ZooKeeperWatcher.registerListener(org.apache.hadoop.hbase.zookeeper.ZooKeeperListener).
Subclasses need only override those methods in which they are interested.
Note that the watcher will be blocked when invoking methods in listeners so
they must not be long-running.
| Field Summary | |
|---|---|
protected ZooKeeperWatcher |
watcher
|
| Constructor Summary | |
|---|---|
ZooKeeperListener(ZooKeeperWatcher watcher)
Construct a ZooKeeper event listener. |
|
| Method Summary | |
|---|---|
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 |
nodeDataChanged(String path)
Called when an existing node has changed data. |
void |
nodeDeleted(String path)
Called when a node has been deleted |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ZooKeeperWatcher watcher
| Constructor Detail |
|---|
public ZooKeeperListener(ZooKeeperWatcher watcher)
| Method Detail |
|---|
public void nodeCreated(String path)
path - full path of the new nodepublic void nodeDeleted(String path)
path - full path of the deleted nodepublic void nodeDataChanged(String path)
path - full path of the updated nodepublic void nodeChildrenChanged(String path)
path - full path of the node whose children have changed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||