public interface IWatchManager
Modifier and Type | Method and Description |
---|---|
boolean |
addWatch(String path,
Watcher watcher)
Add watch to specific path.
|
default boolean |
addWatch(String path,
Watcher watcher,
WatcherMode watcherMode)
Add watch to specific path.
|
boolean |
containsWatcher(String path,
Watcher watcher)
Checks the specified watcher exists for the given path.
|
void |
dumpWatches(PrintWriter pwriter,
boolean byPath)
String representation of watches.
|
default int |
getRecursiveWatchQty()
Return the current number of recursive watchers
|
WatchesReport |
getWatches()
Returns a watch report.
|
WatchesPathReport |
getWatchesByPath()
Returns a watch report by path.
|
WatchesSummary |
getWatchesSummary()
Returns a watch summary.
|
boolean |
removeWatcher(String path,
Watcher watcher)
Removes the specified watcher for the given path.
|
void |
removeWatcher(Watcher watcher)
The entry to remove the watcher when the cnxn is closed.
|
void |
shutdown()
Clean up the watch manager.
|
int |
size()
Get the size of watchers.
|
WatcherOrBitSet |
triggerWatch(String path,
Watcher.Event.EventType type)
Distribute the watch event for the given path.
|
WatcherOrBitSet |
triggerWatch(String path,
Watcher.Event.EventType type,
WatcherOrBitSet suppress)
Distribute the watch event for the given path, but ignore those
suppressed ones.
|
boolean addWatch(String path, Watcher watcher)
path
- znode pathwatcher
- watcher object referencedefault boolean addWatch(String path, Watcher watcher, WatcherMode watcherMode)
path
- znode pathwatcher
- watcher object referencewatcherMode
- the watcher mode to useboolean containsWatcher(String path, Watcher watcher)
path
- znode pathwatcher
- watcher object referenceboolean removeWatcher(String path, Watcher watcher)
path
- znode pathwatcher
- watcher object referencevoid removeWatcher(Watcher watcher)
watcher
- watcher object referenceWatcherOrBitSet triggerWatch(String path, Watcher.Event.EventType type)
path
- znode pathtype
- the watch event typeWatcherOrBitSet triggerWatch(String path, Watcher.Event.EventType type, WatcherOrBitSet suppress)
path
- znode pathtype
- the watch event typesuppress
- the suppressed watcher setint size()
void shutdown()
WatchesSummary getWatchesSummary()
WatchesSummary
WatchesReport getWatches()
WatchesReport
WatchesPathReport getWatchesByPath()
WatchesPathReport
void dumpWatches(PrintWriter pwriter, boolean byPath)
pwriter
- the writer to dump the watchesbyPath
- iff true output watches by paths, otw output
watches by connectiondefault int getRecursiveWatchQty()
Copyright © 2008–2020 The Apache Software Foundation. All rights reserved.