| Constructor and Description |
|---|
NodeWatcher(String quorum,
org.apache.zookeeper.AsyncCallback.DataCallback callback,
String path)
Construct a new NodeWatcher.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
process(org.apache.zookeeper.WatchedEvent watchedEvent) |
void |
run() |
public NodeWatcher(String quorum, org.apache.zookeeper.AsyncCallback.DataCallback callback, String path)
quorum - Comma-separated list of addresses for the Zookeeper quorum.callback - Callback method called upon changes in the node.path - Path of the znode monitored.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void process(org.apache.zookeeper.WatchedEvent watchedEvent)
process in interface org.apache.zookeeper.WatcherCopyright © 2015 Lable. All rights reserved.