org.apache.zookeeper.server
Class WatchManager

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

public class WatchManager
extends java.lang.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(java.lang.String path, Watcher watcher)
           
 void dumpWatches(java.io.PrintWriter pwriter, boolean byPath)
          String representation of watches.
 void removeWatcher(Watcher watcher)
           
 int size()
           
 java.lang.String toString()
          Brief description of this object.
 java.util.Set<Watcher> triggerWatch(java.lang.String path, Watcher.Event.EventType type)
           
 java.util.Set<Watcher> triggerWatch(java.lang.String path, Watcher.Event.EventType type, java.util.Set<Watcher> supress)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WatchManager

public WatchManager()
Method Detail

size

public int size()

addWatch

public void addWatch(java.lang.String path,
                     Watcher watcher)

removeWatcher

public void removeWatcher(Watcher watcher)

triggerWatch

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

triggerWatch

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

toString

public java.lang.String toString()
Brief description of this object.

Overrides:
toString in class java.lang.Object

dumpWatches

public void dumpWatches(java.io.PrintWriter pwriter,
                        boolean byPath)
String representation of watches. Warning, may be large!

Parameters:
byPath - iff true output watches by paths, otw output watches by connection


Copyright © 2012 The Apache Software Foundation