com.atlassian.confluence.util.transaction
Class ReadOnlyTransactionExecutor<K>
java.lang.Object
com.atlassian.confluence.util.transaction.ReadOnlyTransactionExecutor<K>
- All Implemented Interfaces:
- TransactionExecutor<K>
public class ReadOnlyTransactionExecutor<K>
- extends Object
- implements TransactionExecutor<K>
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.
Method Summary |
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. |
void |
stopExecutor()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadOnlyTransactionExecutor
public ReadOnlyTransactionExecutor(org.springframework.transaction.PlatformTransactionManager transactionManager)
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
stopExecutor
@PreDestroy
public void stopExecutor()