Class ReadOnlyTransactionExecutor<K>

java.lang.Object
com.atlassian.confluence.util.transaction.ReadOnlyTransactionExecutor<K>
All Implemented Interfaces:
TransactionExecutor<K>, org.springframework.beans.factory.DisposableBean

public class ReadOnlyTransactionExecutor<K> extends Object implements TransactionExecutor<K>, org.springframework.beans.factory.DisposableBean
TransactionExecutor that wraps all TransactionCallback calls within a read only transaction. Only one callback will be executed at a time (subsequent calls to wrapTransactionCallback will result in the queueing of the provided actions). This implementation will perform the transaction in a separate thread, and return a {Future representing the result of the operation.
  • Constructor Details

    • ReadOnlyTransactionExecutor

      public ReadOnlyTransactionExecutor(org.springframework.transaction.PlatformTransactionManager transactionManager)
  • Method Details

    • performTransactionAction

      public Future<K> performTransactionAction(org.springframework.transaction.support.TransactionCallback action)
      Description copied from interface: TransactionExecutor
      Invokes the provided action within its own transaction context, and returns a Future representing the results of the invocation.
      Specified by:
      performTransactionAction in interface TransactionExecutor<K>
      Parameters:
      action - to perform
      Returns:
      the result of the action
    • destroy

      public void destroy() throws Exception
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
      Throws:
      Exception