Package org.apache.zookeeper
Class WatchedEvent
- java.lang.Object
-
- org.apache.zookeeper.WatchedEvent
-
@Public public class WatchedEvent extends java.lang.Object
A WatchedEvent represents a change on the ZooKeeper that a Watcher is able to respond to. The WatchedEvent includes exactly what happened, the current state of the ZooKeeper, and the path of the znode that was involved in the event.
-
-
Constructor Summary
Constructors Constructor Description WatchedEvent(WatcherEvent eventMessage)
Convert a WatcherEvent sent over the wire into a full-fledged WatcherEventWatchedEvent(Watcher.Event.EventType eventType, Watcher.Event.KeeperState keeperState, java.lang.String path)
Create a WatchedEvent with specified type, state and path
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getPath()
Watcher.Event.KeeperState
getState()
Watcher.Event.EventType
getType()
WatcherEvent
getWrapper()
Convert WatchedEvent to type that can be sent over networkjava.lang.String
toString()
-
-
-
Constructor Detail
-
WatchedEvent
public WatchedEvent(Watcher.Event.EventType eventType, Watcher.Event.KeeperState keeperState, java.lang.String path)
Create a WatchedEvent with specified type, state and path
-
WatchedEvent
public WatchedEvent(WatcherEvent eventMessage)
Convert a WatcherEvent sent over the wire into a full-fledged WatcherEvent
-
-
Method Detail
-
getState
public Watcher.Event.KeeperState getState()
-
getType
public Watcher.Event.EventType getType()
-
getPath
public java.lang.String getPath()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getWrapper
public WatcherEvent getWrapper()
Convert WatchedEvent to type that can be sent over network
-
-