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 allTransactionCallback
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 Summary
Constructors Constructor Description ReadOnlyTransactionExecutor(org.springframework.transaction.PlatformTransactionManager transactionManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
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:TransactionExecutor
Invokes the provided action within its own transaction context, and returns a Future representing the results of the invocation.- Specified by:
performTransactionAction
in interfaceTransactionExecutor<K>
- Parameters:
action
- to perform- Returns:
- the result of the action
-
-