public class PersistentWatcher extends Object implements Closeable
Constructor and Description |
---|
PersistentWatcher(org.apache.curator.framework.CuratorFramework client,
String basePath,
boolean recursive) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Remove the watcher
|
org.apache.curator.framework.listen.Listenable<org.apache.zookeeper.Watcher> |
getListenable()
Container for setting listeners
|
org.apache.curator.framework.listen.Listenable<Runnable> |
getResetListenable()
Listeners are called when the persistent watcher has been successfully registered
or re-registered after a connection disruption
|
void |
start()
Start watching
|
public PersistentWatcher(org.apache.curator.framework.CuratorFramework client, String basePath, boolean recursive)
client
- clientbasePath
- path to set the watch onrecursive
- ZooKeeper persistent watches can optionally be recursivepublic void start()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public org.apache.curator.framework.listen.Listenable<org.apache.zookeeper.Watcher> getListenable()
public org.apache.curator.framework.listen.Listenable<Runnable> getResetListenable()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.