Interface TransactionCoordinatorOwner
-
- All Known Subinterfaces:
JdbcCoordinator
public interface TransactionCoordinatorOwnerModels an owner of a TransactionCoordinator. 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 voidafterTransactionBegin()A after-begin callback from the coordinator to its owner.voidafterTransactionCompletion(boolean successful, boolean delayed)An after-completion callback from the coordinator to its owner.voidbeforeTransactionCompletion()A before-completion callback from the coordinator to its owner.voidflushBeforeTransactionCompletion()JdbcSessionOwnergetJdbcSessionOwner()booleanisActive()Is the TransactionCoordinator owner considered active?voidsetTransactionTimeOut(int seconds)Set the effective transaction timeout period for the current transaction, in seconds.default voidstartTransactionBoundary()Callback indicating recognition of entering into a transactional context whether that is explicitly via the HibernateTransactionAPI 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:
trueindicates the owner is still active;falseindicates it is not.
-
startTransactionBoundary
default void startTransactionBoundary()
Callback indicating recognition of entering into a transactional context whether that is explicitly via the HibernateTransactionAPI 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()
-
-