Package io.micronaut.transaction.support
Class AbstractDefaultTransactionOperations<C>
java.lang.Object
io.micronaut.transaction.support.AbstractPropagatedStatusTransactionOperations<T,C>
io.micronaut.transaction.support.AbstractTransactionOperations<DefaultTransactionStatus<C>,C>
io.micronaut.transaction.support.AbstractDefaultTransactionOperations<C>
- Type Parameters:
C
- The connection type
- All Implemented Interfaces:
SynchronousTransactionManager<C>
,TransactionManager
,TransactionOperations<C>
- Direct Known Subclasses:
DataSourceTransactionManager
,HibernateTransactionManager
@Internal
public abstract class AbstractDefaultTransactionOperations<C>
extends AbstractTransactionOperations<DefaultTransactionStatus<C>,C>
Abstract default transaction operations.
- Since:
- 4.0.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from class io.micronaut.transaction.support.AbstractTransactionOperations
connectionOperations, logger, synchronousConnectionManager
-
Constructor Summary
ConstructorDescriptionAbstractDefaultTransactionOperations
(ConnectionOperations<C> connectionOperations, SynchronousConnectionManager<C> synchronousConnectionManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected DefaultTransactionStatus<C>
createExistingTransactionStatus
(ConnectionStatus<C> connectionStatus, TransactionDefinition definition, DefaultTransactionStatus<C> existingTransaction) Create transaction status with existing transaction.protected DefaultTransactionStatus<C>
createNewTransactionStatus
(ConnectionStatus<C> connectionStatus, TransactionDefinition definition) Create transaction status with new transaction.protected DefaultTransactionStatus<C>
createNoTxTransactionStatus
(ConnectionStatus<C> connectionStatus, TransactionDefinition definition) Create transaction status without open transaction.Methods inherited from class io.micronaut.transaction.support.AbstractTransactionOperations
commit, determineTimeout, doBegin, doCommit, doExecute, doResume, doRollback, doSuspend, getConnectionDefinition, getTransaction, hasConnection, nested, rollback, suspend
Methods inherited from class io.micronaut.transaction.support.AbstractPropagatedStatusTransactionOperations
execute, extendCurrentPropagatedContext, findTransactionStatus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.transaction.TransactionOperations
execute, executeRead, executeWrite, findTransactionStatus, getConnection
-
Constructor Details
-
AbstractDefaultTransactionOperations
public AbstractDefaultTransactionOperations(ConnectionOperations<C> connectionOperations, SynchronousConnectionManager<C> synchronousConnectionManager)
-
-
Method Details
-
createNewTransactionStatus
protected DefaultTransactionStatus<C> createNewTransactionStatus(ConnectionStatus<C> connectionStatus, TransactionDefinition definition) Description copied from class:AbstractTransactionOperations
Create transaction status with new transaction.- Specified by:
createNewTransactionStatus
in classAbstractTransactionOperations<DefaultTransactionStatus<C>,
C> - Parameters:
connectionStatus
- The connection statusdefinition
- The transaction definition- Returns:
- new transaction status
-
createExistingTransactionStatus
protected DefaultTransactionStatus<C> createExistingTransactionStatus(ConnectionStatus<C> connectionStatus, TransactionDefinition definition, DefaultTransactionStatus<C> existingTransaction) Description copied from class:AbstractTransactionOperations
Create transaction status with existing transaction.- Specified by:
createExistingTransactionStatus
in classAbstractTransactionOperations<DefaultTransactionStatus<C>,
C> - Parameters:
connectionStatus
- The connection statusdefinition
- The transaction definitionexistingTransaction
- The existing transaction- Returns:
- new transaction status
-
createNoTxTransactionStatus
protected DefaultTransactionStatus<C> createNoTxTransactionStatus(ConnectionStatus<C> connectionStatus, TransactionDefinition definition) Description copied from class:AbstractTransactionOperations
Create transaction status without open transaction.- Specified by:
createNoTxTransactionStatus
in classAbstractTransactionOperations<DefaultTransactionStatus<C>,
C> - Parameters:
connectionStatus
- The connection statusdefinition
- The transaction definition- Returns:
- new transaction status
-