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
TransactionExecutorthat wraps allTransactionCallbackcalls 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 {Futurerepresenting the result of the operation.
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyTransactionExecutor(org.springframework.transaction.PlatformTransactionManager transactionManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Future<K>performTransactionAction(org.springframework.transaction.support.TransactionCallback action)Invokes the provided action within its own transaction context, and returns a Future representing the results of the invocation.
-
-
-
Method Detail
-
performTransactionAction
public Future<K> performTransactionAction(org.springframework.transaction.support.TransactionCallback action)
Description copied from interface:TransactionExecutorInvokes the provided action within its own transaction context, and returns a Future representing the results of the invocation.- Specified by:
performTransactionActionin interfaceTransactionExecutor<K>- Parameters:
action- to perform- Returns:
- the result of the action
-
-