Package io.micronaut.transaction
@NullMarked
package io.micronaut.transaction
Micronaut transaction management API.
A transaction is started, joined, suspended, committed or rolled back by a transaction manager according to a
TransactionDefinition, which describes its propagation, isolation level, timeout
and read-only flag. Code usually demarcates transactions declaratively with @Transactional, or
programmatically with TransactionOperations.execute(TransactionDefinition, TransactionCallback). The state of a running
transaction is exposed as a TransactionStatus, which also accepts
TransactionSynchronization callbacks for its commit and completion.
Parts of this API are derived from the Spring Framework's transaction abstraction (Apache License 2.0).
-
ClassDescriptionInterface that specifies an API to programmatically manage transaction savepoints in a generic fashion.A transaction manager for blocking code that lets the caller control the transaction boundaries explicitly:
SynchronousTransactionManager.getTransaction(TransactionDefinition)starts a new transaction or joins the current one according to the definition's propagation, andSynchronousTransactionManager.commit(TransactionStatus)orSynchronousTransactionManager.rollback(TransactionStatus)completes it.TransactionCallback<T, R extends @Nullable Object>A functional interface for running code that runs within the context of a transaction.Describes how a unit of work should run with respect to transactions.Isolation levels.Defines what happens when a transactional unit of work starts while a transaction is, or is not, already active in the current context.Common representation of the current state of a transaction.Marker interface implemented by every transaction manager, whether it manages transactions for blocking code (SynchronousTransactionManager) or for reactive code.Generic transaction operations interface.The registry of various transactional operations managers.The transaction status.