# TransactionManager

interface TransactionManager

Represents the manager registered to a database, which is responsible for creating new transactions and storing data related to the database and its transactions.

#### Inheritors

ThreadLocalTransactionManager

## Types

Companion
Link copied to clipboard
object Companion

## Properties

defaultIsolationLevel
Link copied to clipboard
abstract var defaultIsolationLevel: Int

The default transaction isolation level. Unless specified, the database-specific level will be used.

defaultMaxAttempts
Link copied to clipboard
abstract var defaultMaxAttempts: Int

The default maximum amount of attempts that will be made to perform a transaction.

defaultMaxRepetitionDelay
Link copied to clipboard
abstract var defaultMaxRepetitionDelay: Long
defaultMaxRetryDelay
Link copied to clipboard
abstract var defaultMaxRetryDelay: Long

The default maximum number of milliseconds to wait before retrying a transaction if an exception is thrown.

defaultMinRepetitionDelay
Link copied to clipboard
abstract var defaultMinRepetitionDelay: Long
defaultMinRetryDelay
Link copied to clipboard
abstract var defaultMinRetryDelay: Long

The default minimum number of milliseconds to wait before retrying a transaction if an exception is thrown.

defaultReadOnly
Link copied to clipboard
abstract var defaultReadOnly: Boolean

Whether transactions should be performed in read-only mode. Unless specified, the database default will be used.

defaultRepetitionAttempts
Link copied to clipboard
abstract var defaultRepetitionAttempts: Int

## Functions

bindTransactionToThread
Link copied to clipboard
abstract fun bindTransactionToThread(transaction: Transaction?)

Sets the current thread's copy of the manager's thread-local variable to the specified transaction.

currentOrNull
Link copied to clipboard
abstract fun currentOrNull(): Transaction?

Returns the current Transaction, or `null` if none exists.

newTransaction
Link copied to clipboard
abstract fun newTransaction(isolation: Int = defaultIsolationLevel, readOnly: Boolean = defaultReadOnly, outerTransaction: Transaction? = null): Transaction

Returns a Transaction instance.