Package io.micronaut.transaction.support
Class AbstractReactorTransactionOperations.DefaultReactiveTransactionStatus<C>
java.lang.Object
io.micronaut.transaction.support.AbstractReactorTransactionOperations.DefaultReactiveTransactionStatus<C>
- Type Parameters:
- C- The connection type
- All Implemented Interfaces:
- ReactiveTransactionStatus<C>,- TransactionExecution
- Enclosing class:
- AbstractReactorTransactionOperations<C>
protected static final class AbstractReactorTransactionOperations.DefaultReactiveTransactionStatus<C>
extends Object
implements ReactiveTransactionStatus<C>
Represents the current reactive transaction status.
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultReactiveTransactionStatus(ConnectionStatus<C> connectionStatus, boolean isNew, TransactionDefinition transactionDefinition) 
- 
Method SummaryModifier and TypeMethodDescriptionThe transaction definition.booleanReturn whether this transaction is completed, that is, whether it has already been committed or rolled back.booleanReturn whether the present transaction is new; otherwise participating in an existing transaction, or potentially not running in an actual transaction in the first place.booleanReturn whether the transaction has been marked as rollback-only (either by the application or by the transaction infrastructure).voidSet the transaction rollback-only.
- 
Constructor Details- 
DefaultReactiveTransactionStatuspublic DefaultReactiveTransactionStatus(ConnectionStatus<C> connectionStatus, boolean isNew, TransactionDefinition transactionDefinition) 
 
- 
- 
Method Details- 
getConnectionStatus- Specified by:
- getConnectionStatusin interface- ReactiveTransactionStatus<C>
- Returns:
- The connection status.
 
- 
getTransactionDefinitionDescription copied from interface:TransactionExecutionThe transaction definition.- Specified by:
- getTransactionDefinitionin interface- TransactionExecution
- Returns:
- the transaction definition
 
- 
getConnection- Specified by:
- getConnectionin interface- ReactiveTransactionStatus<C>
- Returns:
- The current connection.
 
- 
isNewTransactionpublic boolean isNewTransaction()Description copied from interface:TransactionExecutionReturn whether the present transaction is new; otherwise participating in an existing transaction, or potentially not running in an actual transaction in the first place.- Specified by:
- isNewTransactionin interface- TransactionExecution
- Returns:
- Whether the execution is a new transaction
 
- 
setRollbackOnlypublic void setRollbackOnly()Description copied from interface:TransactionExecutionSet the transaction rollback-only. This instructs the transaction manager that the only possible outcome of the transaction may be a rollback, as alternative to throwing an exception which would in turn trigger a rollback.- Specified by:
- setRollbackOnlyin interface- TransactionExecution
 
- 
isRollbackOnlypublic boolean isRollbackOnly()Description copied from interface:TransactionExecutionReturn whether the transaction has been marked as rollback-only (either by the application or by the transaction infrastructure).- Specified by:
- isRollbackOnlyin interface- TransactionExecution
- Returns:
- Whether the execution has been marked to rollback
 
- 
isCompletedpublic boolean isCompleted()Description copied from interface:TransactionExecutionReturn whether this transaction is completed, that is, whether it has already been committed or rolled back.- Specified by:
- isCompletedin interface- TransactionExecution
- Returns:
- Whether the execution has completed
 
 
-