Class SynchronizationRegistryStandardImpl
java.lang.Object
org.hibernate.resource.transaction.internal.SynchronizationRegistryStandardImpl
- All Implemented Interfaces:
Serializable,SynchronizationRegistry,SynchronizationRegistryImplementor
public class SynchronizationRegistryStandardImpl
extends Object
implements SynchronizationRegistryImplementor
The standard implementation of the
SynchronizationRegistry contract.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears all synchronizations from this registry.intIntended for test accessvoidnotifySynchronizationsAfterTransactionCompletion(int status) Delegates theSynchronization.afterCompletion(int)call to each registered Synchronization.voidDelegates theSynchronization.beforeCompletion()call to each registered SynchronizationvoidregisterSynchronization(Synchronization synchronization) Register aSynchronizationcallback for this transaction.
-
Constructor Details
-
SynchronizationRegistryStandardImpl
public SynchronizationRegistryStandardImpl()
-
-
Method Details
-
getNumberOfRegisteredSynchronizations
public int getNumberOfRegisteredSynchronizations()Intended for test access- Returns:
- The number of Synchronizations registered
-
registerSynchronization
Description copied from interface:SynchronizationRegistryRegister aSynchronizationcallback for this transaction.- Specified by:
registerSynchronizationin interfaceSynchronizationRegistry- Parameters:
synchronization- The synchronization callback to register.
-
notifySynchronizationsBeforeTransactionCompletion
public void notifySynchronizationsBeforeTransactionCompletion()Description copied from interface:SynchronizationRegistryImplementorDelegates theSynchronization.beforeCompletion()call to each registered Synchronization- Specified by:
notifySynchronizationsBeforeTransactionCompletionin interfaceSynchronizationRegistryImplementor
-
notifySynchronizationsAfterTransactionCompletion
public void notifySynchronizationsAfterTransactionCompletion(int status) Description copied from interface:SynchronizationRegistryImplementorDelegates theSynchronization.afterCompletion(int)call to each registered Synchronization. Will also clear the registeredSynchronizations after all have been notified.- Specified by:
notifySynchronizationsAfterTransactionCompletionin interfaceSynchronizationRegistryImplementor- Parameters:
status- The transaction status, perStatusconstants
-
clearSynchronizations
public void clearSynchronizations()Description copied from interface:SynchronizationRegistryImplementorClears all synchronizations from this registry. Note that synchronizations are automatically cleared during after-completion handling; seeSynchronizationRegistryImplementor.notifySynchronizationsAfterTransactionCompletion(int)- Specified by:
clearSynchronizationsin interfaceSynchronizationRegistryImplementor
-