public class ChildrenChangedOperation extends FutureEventDrivenOperation<List<String>>
ChildrenChangedOperation
is an watch driven operation.
It will wait for an watched event indicating that the children associated with a
given node have been modified before retrieving the changed list.connection, CONSTRUCTOR_ARGS, LOG, node, result, waitingThreads
Constructor and Description |
---|
ChildrenChangedOperation(org.apache.zookeeper.ZooKeeper connection,
String znode) |
ChildrenChangedOperation(org.apache.zookeeper.ZooKeeper connection,
String znode,
boolean getChangedListing) |
Modifier and Type | Method and Description |
---|---|
ZooKeeperOperation<?> |
createCopy() |
OperationResult<List<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, getNode, isCancelled, isDone, shouldProduceExchange
public ChildrenChangedOperation(org.apache.zookeeper.ZooKeeper connection, String znode)
public ChildrenChangedOperation(org.apache.zookeeper.ZooKeeper connection, String znode, boolean getChangedListing)
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<List<String>>
public OperationResult<List<String>> getResult()
ZooKeeperOperation
getResult
in class ZooKeeperOperation<List<String>>
public ZooKeeperOperation<?> createCopy() throws Exception
createCopy
in class ZooKeeperOperation<List<String>>
Exception
Apache Camel