Class TransactionHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.utils.transaction.TransactionHandlerImpl
-
- All Implemented Interfaces:
TransactionHandler
@Component public class TransactionHandlerImpl extends Object implements TransactionHandler
Implementation forTransactionHandler
-
-
Constructor Summary
Constructors Constructor Description TransactionHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize()<T> Pair<T,Boolean>run(TransactionLevel transactionLevel, TransactionCallback<T> callback)Runs the given transaction callback in the current thread, forcing there's no current transaction.voidsetShouldFlushTransaction(boolean shouldFlushTransaction)
-
-
-
Method Detail
-
initialize
@PostConstruct public void initialize()
-
run
public <T> Pair<T,Boolean> run(TransactionLevel transactionLevel, TransactionCallback<T> callback)
Description copied from interface:TransactionHandlerRuns the given transaction callback in the current thread, forcing there's no current transaction. The transaction will comply with the givenTransactionLevel.- Specified by:
runin interfaceTransactionHandler- Returns:
- a
Pairwith the callback's result and a boolean indicating if the transaction was committed or not.
-
setShouldFlushTransaction
public void setShouldFlushTransaction(boolean shouldFlushTransaction)
-
-