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 Details

    • ConfluenceSynchronizationManager

      public ConfluenceSynchronizationManager()
  • Method Details

    • 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 interface SynchronizationManager
      See Also:
    • isTransactionActive

      public boolean isTransactionActive()
      Specified by:
      isTransactionActive in interface SynchronizationManager
      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 Spring TransactionSynchronization on the current transaction.
      Specified by:
      registerSynchronization in interface SynchronizationManager
    • 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 interface SynchronizationManager
      Returns:
      unmodifiable List of TransactionSynchronization instances
      See Also:
      • TransactionSynchronization