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
WatchedEvent s. |
get, get, getWatchedEvent, getWatchedForTypes, process
cancel, getNode, isCancelled, isDone, shouldProduceExchange
protected 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()
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<byte[]>
public OperationResult<byte[]> getResult()
ZooKeeperOperation
getResult
in class ZooKeeperOperation<byte[]>
public ZooKeeperOperation<?> createCopy() throws Exception
createCopy
in class ZooKeeperOperation<byte[]>
Exception
Apache Camel