Class AnyOfOperations
java.lang.Object
org.apache.camel.component.zookeeper.operations.ZooKeeperOperation
org.apache.camel.component.zookeeper.operations.AnyOfOperations
- All Implemented Interfaces:
WatchedEventProvider
AnyOfOperations is a composite operation of one or more sub operation, executing each in turn until any
one succeeds. If any execute successfully, this operation succeeds; if the sub operations are all executed without
success it fails.
It is mostly used for test and watch scenarios where a node is tested for existence, data or children, falling back to a corresponding watch operation if the test operation fails.
-
Field Summary
Fields inherited from class org.apache.camel.component.zookeeper.operations.ZooKeeperOperation
connection, CONSTRUCTOR_ARGS, LOG, node, result, waitingThreads -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()Gets the result of this zookeeper operation, i.e. some data and the associated node statsorg.apache.zookeeper.WatchedEventMethods inherited from class org.apache.camel.component.zookeeper.operations.ZooKeeperOperation
cancel, getNode, isCancelled, isDone, shouldProduceExchange
-
Constructor Details
-
AnyOfOperations
-
-
Method Details
-
get
- Overrides:
getin classZooKeeperOperation- Throws:
InterruptedExceptionExecutionException
-
get
public OperationResult get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Overrides:
getin classZooKeeperOperation- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
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
-
createCopy
- Overrides:
createCopyin classZooKeeperOperation- Throws:
Exception
-
getWatchedEvent
public org.apache.zookeeper.WatchedEvent getWatchedEvent()- Specified by:
getWatchedEventin interfaceWatchedEventProvider
-