public class PersistentWatcher extends Object implements Closeable
Constructor and Description |
---|
PersistentWatcher(CuratorFramework client,
String basePath,
boolean recursive) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Remove the watcher
|
Listenable<org.apache.zookeeper.Watcher> |
getListenable()
Container for setting listeners
|
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(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 Listenable<org.apache.zookeeper.Watcher> getListenable()
public Listenable<Runnable> getResetListenable()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.