Package com.atlassian.confluence.core
Class ConfluenceSynchronizationManager
java.lang.Object
com.atlassian.confluence.core.ConfluenceSynchronizationManager
- All Implemented Interfaces:
SynchronizationManager
Confluence transaction sycnhronization manager. Uses Spring for transaction management.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn an unmodifiable snapshot list of all registered synchronizations for the current thread.boolean
void
registerSynchronization
(org.springframework.transaction.support.TransactionSynchronization synchronization) Registers a SpringTransactionSynchronization
on the current transaction.void
Register a task to be run once the current transaction is successfully committed.
-
Constructor Details
-
ConfluenceSynchronizationManager
public ConfluenceSynchronizationManager()
-
-
Method Details
-
runOnSuccessfulCommit
Register a task to be run once the current transaction is successfully committed. If no transaction exists the task is run immediately. All tasks are run on the thread which registered them.
If a task produces an exception it is logged and swallowed.
- Specified by:
runOnSuccessfulCommit
in interfaceSynchronizationManager
- See Also:
-
isTransactionActive
public boolean isTransactionActive()- Specified by:
isTransactionActive
in interfaceSynchronizationManager
- Returns:
- true if there is an active Spring transaction which accepts synchronizations, otherwise false.
-
registerSynchronization
public void registerSynchronization(org.springframework.transaction.support.TransactionSynchronization synchronization) Description copied from interface:SynchronizationManager
Registers a SpringTransactionSynchronization
on the current transaction.- Specified by:
registerSynchronization
in interfaceSynchronizationManager
-
getSynchronizations
Description copied from interface:SynchronizationManager
Return an unmodifiable snapshot list of all registered synchronizations for the current thread.- Specified by:
getSynchronizations
in interfaceSynchronizationManager
- Returns:
- unmodifiable List of TransactionSynchronization instances
- See Also:
-