接口 TransactionCoordinatorOwner
-
- 所有已知子接口:
JdbcCoordinator
- 所有已知实现类:
JdbcCoordinatorImpl
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
- 作者:
- Steve Ebersole
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 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
-
-
-
方法详细资料
-
isActive
boolean isActive()
Is the TransactionCoordinator owner considered active?- 返回:
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.- 参数:
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.- 参数:
seconds- The number of seconds before a time out should occur.
-
flushBeforeTransactionCompletion
void flushBeforeTransactionCompletion()
-
-