public class ExistenceChangedOperation extends FutureEventDrivenOperation<String>
DataChangedOperation
is an watch driven operation. It will wait
for an watched event indicating that a given node has been created or
deleted.connection, CONSTRUCTOR_ARGS, LOG, node, result, waitingThreads
Constructor and Description |
---|
ExistenceChangedOperation(org.apache.zookeeper.ZooKeeper connection,
String znode) |
Modifier and Type | Method and Description |
---|---|
OperationResult<String> |
getResult()
Gets the result of this zookeeper operation, i.e.
|
protected void |
installWatch()
Install the watcher to receive
WatchedEvent s. |
get, get, getWatchedEvent, getWatchedForTypes, process
cancel, createCopy, getNode, isCancelled, isDone, shouldProduceExchange
public ExistenceChangedOperation(org.apache.zookeeper.ZooKeeper connection, String znode)
protected void installWatch()
FutureEventDrivenOperation
WatchedEvent
s. It should use the
appropriate asynchronous ZooKeeper call to do this so as not to block the
route from starting. Once one of the watched for types of event is
received a call is made to getResult, which can use the appropriate
synchronous call to retrieve the actual data.installWatch
in class FutureEventDrivenOperation<String>
public OperationResult<String> getResult()
ZooKeeperOperation
getResult
in class ZooKeeperOperation<String>
Apache Camel