Class DataChangedOperation
java.lang.Object
org.apache.camel.component.zookeeper.operations.ZooKeeperOperation<byte[]>
org.apache.camel.component.zookeeper.operations.FutureEventDrivenOperation<byte[]>
org.apache.camel.component.zookeeper.operations.DataChangedOperation
- All Implemented Interfaces:
WatchedEventProvider
,org.apache.zookeeper.Watcher
DataChangedOperation
is an watch driven operation. It will wait for an watched event indicating that the
data contained in a given node has changed before optionally retrieving the changed data.-
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
FieldsFields inherited from class org.apache.camel.component.zookeeper.operations.ZooKeeperOperation
connection, LOG, node, result, waitingThreads
-
Constructor Summary
ConstructorsConstructorDescriptionDataChangedOperation
(org.apache.zookeeper.ZooKeeper connection, String znode, boolean getChangedData) DataChangedOperation
(org.apache.zookeeper.ZooKeeper connection, String znode, boolean getChangedData, boolean sendEmptyMessageOnDelete) -
Method Summary
Modifier and TypeMethodDescriptionOperationResult
<byte[]> Gets the result of this zookeeper operation, i.e. some data and the associated node statsprotected void
Install the watcher to receiveWatchedEvent
s.Methods inherited from class org.apache.camel.component.zookeeper.operations.FutureEventDrivenOperation
get, get, getWatchedEvent, getWatchedForTypes, process
Methods inherited from class org.apache.camel.component.zookeeper.operations.ZooKeeperOperation
cancel, getNode, isCancelled, isDone, shouldProduceExchange
-
Field Details
-
CONSTRUCTOR_ARGS
-
-
Constructor Details
-
Method Details
-
installWatch
protected void installWatch()Description copied from class:FutureEventDrivenOperation
Install the watcher to receiveWatchedEvent
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.- Specified by:
installWatch
in classFutureEventDrivenOperation<byte[]>
-
getResult
Description copied from class:ZooKeeperOperation
Gets the result of this zookeeper operation, i.e. some data and the associated node stats- Specified by:
getResult
in classZooKeeperOperation<byte[]>
-
createCopy
- Overrides:
createCopy
in classZooKeeperOperation<byte[]>
- Throws:
Exception
-