Class ExistenceChangedOperation
java.lang.Object
org.apache.camel.component.zookeeper.operations.ZooKeeperOperation<String>
org.apache.camel.component.zookeeper.operations.FutureEventDrivenOperation<String>
org.apache.camel.component.zookeeper.operations.ExistenceChangedOperation
- All Implemented Interfaces:
WatchedEventProvider,org.apache.zookeeper.Watcher
DataChangedOperation is an watch driven operation. It will wait for an watched event indicating that a
given node has been created or deleted.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher
org.apache.zookeeper.Watcher.Event, org.apache.zookeeper.Watcher.WatcherType -
Field Summary
Fields inherited from class org.apache.camel.component.zookeeper.operations.ZooKeeperOperation
connection, CONSTRUCTOR_ARGS, LOG, node, result, waitingThreads -
Constructor Summary
ConstructorsConstructorDescriptionExistenceChangedOperation(org.apache.zookeeper.ZooKeeper connection, String znode) -
Method Summary
Modifier and TypeMethodDescriptionGets the result of this zookeeper operation, i.e. some data and the associated node statsprotected voidInstall the watcher to receiveWatchedEvents.Methods inherited from class org.apache.camel.component.zookeeper.operations.FutureEventDrivenOperation
get, get, getWatchedEvent, getWatchedForTypes, processMethods inherited from class org.apache.camel.component.zookeeper.operations.ZooKeeperOperation
cancel, createCopy, getNode, isCancelled, isDone, shouldProduceExchange
-
Constructor Details
-
ExistenceChangedOperation
-
-
Method Details
-
installWatch
protected void installWatch()Description copied from class:FutureEventDrivenOperationInstall the watcher to receiveWatchedEvents. 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.- Specified by:
installWatchin classFutureEventDrivenOperation<String>
-
getResult
Description copied from class:ZooKeeperOperationGets the result of this zookeeper operation, i.e. some data and the associated node stats- Specified by:
getResultin classZooKeeperOperation<String>
-