org.apache.zookeeper.server
Class WatchManager

java.lang.Object
  extended by org.apache.zookeeper.server.WatchManager

public class WatchManager
extends Object

This class manages watches. It allows watches to be associated with a string and removes watchers and their watches in addition to managing triggers.


Constructor Summary
WatchManager()
           
 
Method Summary
 void addWatch(String path, Watcher watcher)
           
 void removeWatcher(Watcher watcher)
           
 int size()
           
 Set<Watcher> triggerWatch(String path, Watcher.Event.EventType type)
           
 Set<Watcher> triggerWatch(String path, Watcher.Event.EventType type, Set<Watcher> supress)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WatchManager

public WatchManager()
Method Detail

size

public int size()

addWatch

public void addWatch(String path,
                     Watcher watcher)

removeWatcher

public void removeWatcher(Watcher watcher)

triggerWatch

public Set<Watcher> triggerWatch(String path,
                                 Watcher.Event.EventType type)

triggerWatch

public Set<Watcher> triggerWatch(String path,
                                 Watcher.Event.EventType type,
                                 Set<Watcher> supress)