类 JtaTransactionCoordinatorImpl
- java.lang.Object
-
- org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl
-
public class JtaTransactionCoordinatorImpl extends Object implements TransactionCoordinator, SynchronizationCallbackTarget
An implementation of TransactionCoordinator based on managing a transaction through the JTA API (either TM or UT)- 作者:
- Steve Ebersole
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 classJtaTransactionCoordinatorImpl.TransactionDriverControlImplImplementation of the LocalInflow for this TransactionCoordinator.-
从接口继承的嵌套类/接口 org.hibernate.resource.transaction.spi.TransactionCoordinator
TransactionCoordinator.TransactionDriver
-
-
构造器概要
构造器 构造器 说明 JtaTransactionCoordinatorImpl(TransactionCoordinatorBuilder transactionCoordinatorBuilder, TransactionCoordinatorOwner owner, boolean autoJoinTransactions, JtaPlatform jtaPlatform, boolean preferUserTransactions, boolean performJtaThreadTracking, TransactionObserver... observers)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddObserver(TransactionObserver observer)Adds an observer to the coordinator.voidafterCompletion(boolean successful, boolean delayed)Callback of after-completion.voidbeforeCompletion()Callback of before-completion.IsolationDelegatecreateIsolationDelegate()Retrieve an isolation delegate appropriate for this transaction strategy.voidexplicitJoin()Indicates an explicit request to join a transaction.JpaCompliancegetJpaCompliance()SynchronizationRegistrygetLocalSynchronizations()Get access to the local registry of Synchronization instancesSynchronizationCallbackCoordinatorgetSynchronizationCallbackCoordinator()intgetTimeOut()TransactionCoordinatorBuildergetTransactionCoordinatorBuilder()Access to the builder that generated this coordinatorTransactionCoordinatorOwnergetTransactionCoordinatorOwner()TransactionCoordinator.TransactionDrivergetTransactionDriverControl()Get the delegate used by the local transaction driver to control the underlying transactionvoidinvalidate()booleanisActive()Is this transaction still active?booleanisJoined()Determine if there is an active transaction that this coordinator is already joined to.booleanisJtaTransactionCurrentlyActive()booleanisSynchronizationRegistered()Is the RegisteredSynchronization used by Hibernate for unified JTA Synchronization callbacks registered for this coordinator?voidpulse()Used by owner of the JdbcSession as a means to indicate that implicit joining should be done if needed.voidremoveObserver(TransactionObserver observer)Removed an observer from the coordinator.voidsetTimeOut(int seconds)-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.resource.transaction.spi.TransactionCoordinator
isTransactionActive, isTransactionActive
-
-
-
-
构造器详细资料
-
JtaTransactionCoordinatorImpl
public JtaTransactionCoordinatorImpl(TransactionCoordinatorBuilder transactionCoordinatorBuilder, TransactionCoordinatorOwner owner, boolean autoJoinTransactions, JtaPlatform jtaPlatform, boolean preferUserTransactions, boolean performJtaThreadTracking, TransactionObserver... observers)
-
-
方法详细资料
-
getSynchronizationCallbackCoordinator
public SynchronizationCallbackCoordinator getSynchronizationCallbackCoordinator()
-
pulse
public void pulse()
从接口复制的说明:TransactionCoordinatorUsed by owner of the JdbcSession as a means to indicate that implicit joining should be done if needed.- 指定者:
pulse在接口中TransactionCoordinator
-
explicitJoin
public void explicitJoin()
从接口复制的说明:TransactionCoordinatorIndicates an explicit request to join a transaction. This is mainly intended to handle the JPA requirement aroundEntityManager.joinTransaction(), and generally speaking only has an impact in JTA environments- 指定者:
explicitJoin在接口中TransactionCoordinator
-
isJoined
public boolean isJoined()
从接口复制的说明:TransactionCoordinatorDetermine if there is an active transaction that this coordinator is already joined to.- 指定者:
isJoined在接口中TransactionCoordinator- 返回:
trueif there is an active transaction this coordinator is already joined to;falseotherwise.
-
isSynchronizationRegistered
public boolean isSynchronizationRegistered()
Is the RegisteredSynchronization used by Hibernate for unified JTA Synchronization callbacks registered for this coordinator?- 返回:
trueindicates that a RegisteredSynchronization is currently registered for this coordinator;falseindicates it is not (yet) registered.
-
getTransactionCoordinatorOwner
public TransactionCoordinatorOwner getTransactionCoordinatorOwner()
-
getJpaCompliance
public JpaCompliance getJpaCompliance()
- 指定者:
getJpaCompliance在接口中TransactionCoordinator
-
getTransactionDriverControl
public TransactionCoordinator.TransactionDriver getTransactionDriverControl()
从接口复制的说明:TransactionCoordinatorGet the delegate used by the local transaction driver to control the underlying transaction- 指定者:
getTransactionDriverControl在接口中TransactionCoordinator- 返回:
- The control delegate.
-
getLocalSynchronizations
public SynchronizationRegistry getLocalSynchronizations()
从接口复制的说明:TransactionCoordinatorGet access to the local registry of Synchronization instances- 指定者:
getLocalSynchronizations在接口中TransactionCoordinator- 返回:
- The local Synchronization registry
-
isActive
public boolean isActive()
从接口复制的说明:TransactionCoordinatorIs this transaction still active? Answers on a best effort basis. For example, in the case of JDBC based transactions we cannot know that a transaction is active when it is initiated directly through the JDBCConnection, only when it is initiated from here.- 指定者:
isActive在接口中SynchronizationCallbackTarget- 指定者:
isActive在接口中TransactionCoordinator- 返回:
trueif the transaction is still active;falseotherwise.
-
isJtaTransactionCurrentlyActive
public boolean isJtaTransactionCurrentlyActive()
-
createIsolationDelegate
public IsolationDelegate createIsolationDelegate()
从接口复制的说明:TransactionCoordinatorRetrieve an isolation delegate appropriate for this transaction strategy.- 指定者:
createIsolationDelegate在接口中TransactionCoordinator- 返回:
- An isolation delegate.
-
getTransactionCoordinatorBuilder
public TransactionCoordinatorBuilder getTransactionCoordinatorBuilder()
从接口复制的说明:TransactionCoordinatorAccess to the builder that generated this coordinator
-
setTimeOut
public void setTimeOut(int seconds)
- 指定者:
setTimeOut在接口中TransactionCoordinator
-
getTimeOut
public int getTimeOut()
- 指定者:
getTimeOut在接口中TransactionCoordinator
-
invalidate
public void invalidate()
- 指定者:
invalidate在接口中TransactionCoordinator
-
beforeCompletion
public void beforeCompletion()
从接口复制的说明:SynchronizationCallbackTargetCallback of before-completion.- 指定者:
beforeCompletion在接口中SynchronizationCallbackTarget- 另请参阅:
Synchronization.beforeCompletion()
-
afterCompletion
public void afterCompletion(boolean successful, boolean delayed)从接口复制的说明:SynchronizationCallbackTargetCallback of after-completion.- 指定者:
afterCompletion在接口中SynchronizationCallbackTarget- 参数:
successful- Was the transaction successful?- 另请参阅:
Synchronization.afterCompletion(int)
-
addObserver
public void addObserver(TransactionObserver observer)
从接口复制的说明:TransactionCoordinatorAdds an observer to the coordinator. observers are not to be cleared on transaction completion.- 指定者:
addObserver在接口中TransactionCoordinator- 参数:
observer- The observer to add.
-
removeObserver
public void removeObserver(TransactionObserver observer)
从接口复制的说明:TransactionCoordinatorRemoved an observer from the coordinator.- 指定者:
removeObserver在接口中TransactionCoordinator- 参数:
observer- The observer to remove.
-
-