Package com.atlassian.confluence.core
Class ConfluenceSynchronizationManager
- java.lang.Object
-
- com.atlassian.confluence.core.ConfluenceSynchronizationManager
-
- All Implemented Interfaces:
SynchronizationManager
public class ConfluenceSynchronizationManager extends Object implements SynchronizationManager
Confluence transaction sycnhronization manager. Uses Spring for transaction management.
-
-
Constructor Summary
Constructors Constructor Description ConfluenceSynchronizationManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List
getSynchronizations()
Return an unmodifiable snapshot list of all registered synchronizations for the current thread.boolean
isTransactionActive()
void
registerSynchronization(org.springframework.transaction.support.TransactionSynchronization synchronization)
Registers a SpringTransactionSynchronization
on the current transaction.void
runOnSuccessfulCommit(Runnable task)
Register a task to be run once the current transaction is successfully committed.
-
-
-
Method Detail
-
runOnSuccessfulCommit
public void runOnSuccessfulCommit(Runnable task)
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:
SynchronizationManager.isTransactionActive()
-
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
public List 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:
TransactionSynchronization
-
-