Class ZooKeeperOperation<ResultType>
java.lang.Object
org.apache.camel.component.zookeeper.operations.ZooKeeperOperation<ResultType>
- Direct Known Subclasses:
AnyOfOperations,CreateOperation,DeleteOperation,ExistsOperation,FutureEventDrivenOperation,GetChildrenOperation,GetDataOperation,SetDataOperation
ZooKeeperOperation is the base class for wrapping various ZooKeeper API instructions and callbacks into
callable and composable operation objects.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.zookeeper.ZooKeeperprotected static final Class<?>[]protected static final org.slf4j.Loggerprotected Stringprotected OperationResult<ResultType> -
Constructor Summary
ConstructorsConstructorDescriptionZooKeeperOperation(org.apache.zookeeper.ZooKeeper connection, String node) ZooKeeperOperation(org.apache.zookeeper.ZooKeeper connection, String node, boolean producesExchange) -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel(boolean mayInterruptIfRunning) get()getNode()abstract OperationResult<ResultType> Gets the result of this zookeeper operation, i.e. some data and the associated node statsbooleanbooleanisDone()boolean
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG -
CONSTRUCTOR_ARGS
-
node
-
connection
protected org.apache.zookeeper.ZooKeeper connection -
waitingThreads
-
result
-
-
Constructor Details
-
ZooKeeperOperation
-
ZooKeeperOperation
public ZooKeeperOperation(org.apache.zookeeper.ZooKeeper connection, String node, boolean producesExchange)
-
-
Method Details
-
getResult
Gets the result of this zookeeper operation, i.e. some data and the associated node stats -
get
-
get
public OperationResult<ResultType> get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException -
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
isCancelled
public boolean isCancelled() -
isDone
public boolean isDone() -
getNode
-
shouldProduceExchange
public boolean shouldProduceExchange() -
createCopy
- Throws:
Exception
-