Interface IWatchManager
- 
- All Known Implementing Classes:
- WatchManager,- WatchManagerOptimized
 
 public interface IWatchManager
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanaddWatch(String path, Watcher watcher)Add watch to specific path.default booleanaddWatch(String path, Watcher watcher, WatcherMode watcherMode)Add watch to specific path.booleancontainsWatcher(String path, Watcher watcher)Checks the specified watcher exists for the given path.voiddumpWatches(PrintWriter pwriter, boolean byPath)String representation of watches.default intgetRecursiveWatchQty()Return the current number of recursive watchersWatchesReportgetWatches()Returns a watch report.WatchesPathReportgetWatchesByPath()Returns a watch report by path.WatchesSummarygetWatchesSummary()Returns a watch summary.booleanremoveWatcher(String path, Watcher watcher)Removes the specified watcher for the given path.voidremoveWatcher(Watcher watcher)The entry to remove the watcher when the cnxn is closed.voidshutdown()Clean up the watch manager.intsize()Get the size of watchers.WatcherOrBitSettriggerWatch(String path, Watcher.Event.EventType type, List<ACL> acl)Distribute the watch event for the given path.WatcherOrBitSettriggerWatch(String path, Watcher.Event.EventType type, List<ACL> acl, WatcherOrBitSet suppress)Distribute the watch event for the given path, but ignore those suppressed ones.
 
- 
- 
- 
Method Detail- 
addWatchboolean addWatch(String path, Watcher watcher) Add watch to specific path.- Parameters:
- path- znode path
- watcher- watcher object reference
- Returns:
- true if the watcher added is not already present
 
 - 
addWatchdefault boolean addWatch(String path, Watcher watcher, WatcherMode watcherMode) Add watch to specific path.- Parameters:
- path- znode path
- watcher- watcher object reference
- watcherMode- the watcher mode to use
- Returns:
- true if the watcher added is not already present
 
 - 
containsWatcherboolean containsWatcher(String path, Watcher watcher) Checks the specified watcher exists for the given path.- Parameters:
- path- znode path
- watcher- watcher object reference
- Returns:
- true if the watcher exists, false otherwise
 
 - 
removeWatcherboolean removeWatcher(String path, Watcher watcher) Removes the specified watcher for the given path.- Parameters:
- path- znode path
- watcher- watcher object reference
- Returns:
- true if the watcher successfully removed, false otherwise
 
 - 
removeWatchervoid removeWatcher(Watcher watcher) The entry to remove the watcher when the cnxn is closed.- Parameters:
- watcher- watcher object reference
 
 - 
triggerWatchWatcherOrBitSet triggerWatch(String path, Watcher.Event.EventType type, List<ACL> acl) Distribute the watch event for the given path.- Parameters:
- path- znode path
- type- the watch event type
- acl- ACL of the znode in path
- Returns:
- the watchers have been notified
 
 - 
triggerWatchWatcherOrBitSet triggerWatch(String path, Watcher.Event.EventType type, List<ACL> acl, WatcherOrBitSet suppress) Distribute the watch event for the given path, but ignore those suppressed ones.- Parameters:
- path- znode path
- type- the watch event type
- suppress- the suppressed watcher set
- Returns:
- the watchers have been notified
 
 - 
sizeint size() Get the size of watchers.- Returns:
- the watchers number managed in this class.
 
 - 
shutdownvoid shutdown() Clean up the watch manager.
 - 
getWatchesSummaryWatchesSummary getWatchesSummary() Returns a watch summary.- Returns:
- watch summary
- See Also:
- WatchesSummary
 
 - 
getWatchesWatchesReport getWatches() Returns a watch report.- Returns:
- watch report
- See Also:
- WatchesReport
 
 - 
getWatchesByPathWatchesPathReport getWatchesByPath() Returns a watch report by path.- Returns:
- watch report
- See Also:
- WatchesPathReport
 
 - 
dumpWatchesvoid dumpWatches(PrintWriter pwriter, boolean byPath) String representation of watches. Warning, may be large!- Parameters:
- pwriter- the writer to dump the watches
- byPath- iff true output watches by paths, otw output watches by connection
 
 - 
getRecursiveWatchQtydefault int getRecursiveWatchQty() Return the current number of recursive watchers- Returns:
- qty
 
 
- 
 
-