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 TypeMethodDescriptionvoid
Clears all synchronizations from this registry.int
Intended for test accessvoid
notifySynchronizationsAfterTransactionCompletion
(int status) Delegates theSynchronization.afterCompletion(int)
call to each registered Synchronization.void
Delegates theSynchronization.beforeCompletion()
call to each registered Synchronizationvoid
registerSynchronization
(Synchronization synchronization) Register aSynchronization
callback 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:SynchronizationRegistry
Register aSynchronization
callback for this transaction.- Specified by:
registerSynchronization
in interfaceSynchronizationRegistry
- Parameters:
synchronization
- The synchronization callback to register.
-
notifySynchronizationsBeforeTransactionCompletion
public void notifySynchronizationsBeforeTransactionCompletion()Description copied from interface:SynchronizationRegistryImplementor
Delegates theSynchronization.beforeCompletion()
call to each registered Synchronization- Specified by:
notifySynchronizationsBeforeTransactionCompletion
in interfaceSynchronizationRegistryImplementor
-
notifySynchronizationsAfterTransactionCompletion
public void notifySynchronizationsAfterTransactionCompletion(int status) Description copied from interface:SynchronizationRegistryImplementor
Delegates theSynchronization.afterCompletion(int)
call to each registered Synchronization. Will also clear the registeredSynchronization
s after all have been notified.- Specified by:
notifySynchronizationsAfterTransactionCompletion
in interfaceSynchronizationRegistryImplementor
- Parameters:
status
- The transaction status, perStatus
constants
-
clearSynchronizations
public void clearSynchronizations()Description copied from interface:SynchronizationRegistryImplementor
Clears all synchronizations from this registry. Note that synchronizations are automatically cleared during after-completion handling; seeSynchronizationRegistryImplementor.notifySynchronizationsAfterTransactionCompletion(int)
- Specified by:
clearSynchronizations
in interfaceSynchronizationRegistryImplementor
-