Interface Watcher
- All Known Subinterfaces:
ServerWatcher
- All Known Implementing Classes:
ControllableConnection, DumbWatcher, InstanceContainer, InstanceManager, NettyServerCnxn, NIOServerCnxn, ServerCnxn, SimpleClient, SimpleSysTest, ZooInspectorManagerImpl.NodeWatcher
This interface specifies the public interface an event handler class must
implement. A ZooKeeper client will get various events from the ZooKeeper
server it connects to. An application using such a client handles these
events by registering a callback object with the client. The callback object
is expected to be an instance of a class that implements Watcher interface.
When
process(WatchedEvent) is triggered by a watch firing, such as
Watcher.Event.EventType.NodeDataChanged, WatchedEvent.getZxid() will
return the zxid of the transaction that caused said watch to fire. If
-1L is returned then the server must be updated to
support this feature.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThis interface defines the possible states an Event may representstatic enumEnumeration of types of watchers -
Method Summary
-
Method Details
-
process
-