Class TransactionWatcher
- java.lang.Object
-
- org.apache.accumulo.server.zookeeper.TransactionWatcher
-
public class TransactionWatcher extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TransactionWatcher.Arbitrator
static class
TransactionWatcher.ZooArbitrator
-
Constructor Summary
Constructors Constructor Description TransactionWatcher(ServerContext context)
TransactionWatcher(TransactionWatcher.Arbitrator arbitrator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isActive(long tid)
<T> T
run(String ztxBulk, long tid, Callable<T> callable)
void
runQuietly(String ztxBulk, long tid, Runnable task)
Run task only if transaction is still active in zookeeper.
-
-
-
Constructor Detail
-
TransactionWatcher
public TransactionWatcher(TransactionWatcher.Arbitrator arbitrator)
-
TransactionWatcher
public TransactionWatcher(ServerContext context)
-
-
Method Detail
-
runQuietly
public void runQuietly(String ztxBulk, long tid, Runnable task)
Run task only if transaction is still active in zookeeper. If the tx is no longer active then that task is not run and a debug message is logged indicating the task was ignored.
-
run
public <T> T run(String ztxBulk, long tid, Callable<T> callable) throws Exception
- Throws:
Exception
-
isActive
public boolean isActive(long tid)
-
-