public class DataChangedOperation extends FutureEventDrivenOperation<byte[]>
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.| Modifier and Type | Field and Description |
|---|---|
protected static Class[] |
CONSTRUCTOR_ARGS |
connection, LOG, node, result, waitingThreads| Constructor and Description |
|---|
DataChangedOperation(org.apache.zookeeper.ZooKeeper connection,
String znode,
boolean getChangedData) |
DataChangedOperation(org.apache.zookeeper.ZooKeeper connection,
String znode,
boolean getChangedData,
boolean sendEmptyMessageOnDelete) |
| Modifier and Type | Method and Description |
|---|---|
ZooKeeperOperation<?> |
createCopy() |
OperationResult<byte[]> |
getResult()
Gets the result of this zookeeper operation, i.e.
|
protected void |
installWatch()
Install the watcher to receive
WatchedEvents. |
get, get, getWatchedEvent, getWatchedForTypes, processcancel, getNode, isCancelled, isDone, shouldProduceExchangeprotected static final Class[] CONSTRUCTOR_ARGS
public DataChangedOperation(org.apache.zookeeper.ZooKeeper connection,
String znode,
boolean getChangedData)
public DataChangedOperation(org.apache.zookeeper.ZooKeeper connection,
String znode,
boolean getChangedData,
boolean sendEmptyMessageOnDelete)
protected void installWatch()
FutureEventDrivenOperationWatchedEvents. 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<byte[]>public OperationResult<byte[]> getResult()
ZooKeeperOperationgetResult in class ZooKeeperOperation<byte[]>public ZooKeeperOperation<?> createCopy() throws Exception
createCopy in class ZooKeeperOperation<byte[]>ExceptionApache Camel