org.apache.camel.component.zookeeper.operations
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
public abstract class ZooKeeperOperation<ResultType>
- extends Object
ZooKeeperOperation
is the base class for wrapping various
ZooKeeper API instructions and callbacks into callable and composable operation
objects.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.slf4j.Logger LOG
CONSTRUCTOR_ARGS
protected static final Class<?>[] CONSTRUCTOR_ARGS
node
protected String node
connection
protected org.apache.zookeeper.ZooKeeper connection
waitingThreads
protected Set<Thread> waitingThreads
result
protected OperationResult<ResultType> result
ZooKeeperOperation
public ZooKeeperOperation(org.apache.zookeeper.ZooKeeper connection,
String node)
ZooKeeperOperation
public ZooKeeperOperation(org.apache.zookeeper.ZooKeeper connection,
String node,
boolean producesExchange)
getResult
public abstract OperationResult<ResultType> getResult()
- Gets the result of this zookeeper operation, i.e. some data and the
associated node stats
get
public OperationResult<ResultType> get()
throws InterruptedException,
ExecutionException
- Throws:
InterruptedException
ExecutionException
get
public OperationResult<ResultType> get(long timeout,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
- Throws:
InterruptedException
ExecutionException
TimeoutException
cancel
public boolean cancel(boolean mayInterruptIfRunning)
isCancelled
public boolean isCancelled()
isDone
public boolean isDone()
getNode
public String getNode()
shouldProduceExchange
public boolean shouldProduceExchange()
createCopy
public ZooKeeperOperation<?> createCopy()
throws Exception
- Throws:
Exception
Apache Camel