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, waitabort, begin, commit, transactionsSupportedpublic 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 TransactionHandlerpublic void execute(Runnable action)
action within a transaction. If it completes normally,
commit the transaction, otherwise abort the transaction.execute in interface TransactionHandlerpublic <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 TransactionHandlerLicenced under the Apache License, Version 2.0