com.atlassian.sal.api.transaction
Interface TransactionCallback<T>
public interface TransactionCallback<T>
A simple callback that needs to be provided with an action to run in the doInTransaction method.
It is assumed that if anything goes wrong, doInTransaction will throw a RuntimeException if anything goes
wrong, and the calling transactionTemplate will roll back the transaction.
- Since:
- 2.0
Method Summary |
T |
doInTransaction()
Runs an action in a transaction and returns a optional value. |
doInTransaction
T doInTransaction()
- Runs an action in a transaction and returns a optional value.
- Returns:
- Optional result of the operation. May be null
- Throws:
RuntimeException
- if anything went wrong. The caller will be responsible for rolling back.
Copyright © 2010 Atlassian. All Rights Reserved.