Package io.ebeaninternal.api
Interface SpiTransactionManager
-
- All Known Implementing Classes:
DocStoreTransactionManager
,TransactionManager
public interface SpiTransactionManager
Service provider interface for the transaction manager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ScopedTransaction
externalBeginTransaction(SpiTransaction transaction, TxScope txScope)
Push an externally managed transaction into scope (e.g.void
externalRemoveTransaction()
Called when an externally managed transaction has completed.SpiTransaction
getActive()
Return the currently active transaction (can be null).DataSource
getDataSource()
Return the main DataSource.Connection
getQueryPlanConnection()
Return a connection used for query plan collection.DataSource
getReadOnlyDataSource()
Return the read only DataSource (if defined).void
notifyOfCommit(SpiTransaction transaction)
Notify of a transaction commit.void
notifyOfQueryOnly(SpiTransaction transaction)
Notify of a query only transaction commit.void
notifyOfRollback(SpiTransaction transaction, Throwable cause)
Notify of a transaction rollback.TransactionScopeManager
scope()
Return the scope manager for this server.
-
-
-
Method Detail
-
scope
TransactionScopeManager scope()
Return the scope manager for this server.
-
getDataSource
DataSource getDataSource()
Return the main DataSource.
-
getReadOnlyDataSource
DataSource getReadOnlyDataSource()
Return the read only DataSource (if defined).
-
getActive
SpiTransaction getActive()
Return the currently active transaction (can be null).
-
externalBeginTransaction
ScopedTransaction externalBeginTransaction(SpiTransaction transaction, TxScope txScope)
Push an externally managed transaction into scope (e.g. Spring managed transaction).
-
externalRemoveTransaction
void externalRemoveTransaction()
Called when an externally managed transaction has completed.
-
notifyOfCommit
void notifyOfCommit(SpiTransaction transaction)
Notify of a transaction commit.
-
notifyOfRollback
void notifyOfRollback(SpiTransaction transaction, Throwable cause)
Notify of a transaction rollback.
-
notifyOfQueryOnly
void notifyOfQueryOnly(SpiTransaction transaction)
Notify of a query only transaction commit.
-
getQueryPlanConnection
Connection getQueryPlanConnection() throws SQLException
Return a connection used for query plan collection.- Throws:
SQLException
-
-