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
Modifier and TypeFieldDescriptionprotected org.apache.zookeeper.ZooKeeper
protected static final Class<?>[]
protected static final org.slf4j.Logger
protected String
protected OperationResult<ResultType>
-
Constructor Summary
ConstructorDescriptionZooKeeperOperation
(org.apache.zookeeper.ZooKeeper connection, String node) ZooKeeperOperation
(org.apache.zookeeper.ZooKeeper connection, String node, boolean producesExchange) -
Method Summary
Modifier and TypeMethodDescriptionboolean
cancel
(boolean mayInterruptIfRunning) get()
getNode()
abstract OperationResult<ResultType>
Gets the result of this zookeeper operation, i.e.boolean
boolean
isDone()
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
-