public abstract class TransactionHandlerBase extends Object implements TransactionHandler
Constructor and Description |
---|
TransactionHandlerBase() |
Modifier and Type | Method and Description |
---|---|
<T> T |
calculate(Supplier<T> action)
Execute the supplier
action within a transaction. |
void |
execute(Runnable action)
Execute the runnable
action within a transaction. |
Object |
executeInTransaction(Command c)
Execute the command
c within a transaction. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
abort, begin, commit, transactionsSupported
public Object executeInTransaction(Command c)
c
within a transaction. If it completes normally,
commit the transaction and return the result. Otherwise abort the transaction.executeInTransaction
in interface TransactionHandler
public void execute(Runnable action)
action
within a transaction. If it completes normally,
commit the transaction, otherwise abort the transaction.execute
in interface TransactionHandler
public <T> T calculate(Supplier<T> action)
action
within a transaction. If it completes normally,
commit the transaction and return the result, otherwise abort the transaction.calculate
in interface TransactionHandler
Licenced under the Apache License, Version 2.0