Interface TransactionCoordinatorOwner
-
- All Known Subinterfaces:
JdbcCoordinator
- All Known Implementing Classes:
JdbcCoordinatorImpl
public interface TransactionCoordinatorOwner
Models an owner of aTransactionCoordinator
. Mainly used in 2 ways:- First to allow the coordinator to determine if its owner is still active (open, etc).
- Second is to allow the coordinator to dispatch before and after completion events to the owner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
afterTransactionBegin()
A after-begin callback from the coordinator to its owner.void
afterTransactionCompletion(boolean successful, boolean delayed)
An after-completion callback from the coordinator to its owner.void
beforeTransactionCompletion()
A before-completion callback from the coordinator to its owner.void
flushBeforeTransactionCompletion()
JdbcSessionOwner
getJdbcSessionOwner()
boolean
isActive()
Is the TransactionCoordinator owner considered active?void
setTransactionTimeOut(int seconds)
Set the effective transaction timeout period for the current transaction, in seconds.default void
startTransactionBoundary()
Callback indicating recognition of entering into a transactional context whether that is explicitly via the HibernateTransaction
API or via registration of Hibernate's JTA Synchronization impl with a JTA Transaction
-
-
-
Method Detail
-
isActive
boolean isActive()
Is the TransactionCoordinator owner considered active?- Returns:
true
indicates the owner is still active;false
indicates it is not.
-
startTransactionBoundary
default void startTransactionBoundary()
Callback indicating recognition of entering into a transactional context whether that is explicitly via the HibernateTransaction
API or via registration of Hibernate's JTA Synchronization impl with a JTA Transaction
-
afterTransactionBegin
void afterTransactionBegin()
A after-begin callback from the coordinator to its owner.
-
beforeTransactionCompletion
void beforeTransactionCompletion()
A before-completion callback from the coordinator to its owner.
-
afterTransactionCompletion
void afterTransactionCompletion(boolean successful, boolean delayed)
An after-completion callback from the coordinator to its owner.- Parameters:
successful
- Was the transaction successful?delayed
- Is this delayed after transaction completion call (aka after a timeout)?
-
getJdbcSessionOwner
JdbcSessionOwner getJdbcSessionOwner()
-
setTransactionTimeOut
void setTransactionTimeOut(int seconds)
Set the effective transaction timeout period for the current transaction, in seconds.- Parameters:
seconds
- The number of seconds before a time out should occur.
-
flushBeforeTransactionCompletion
void flushBeforeTransactionCompletion()
-
-