com.atlassian.sal.api.transaction
Interface TransactionCallback


public interface TransactionCallback

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
 java.lang.Object doInTransaction()
          Runs an action in a transaction and returns a optional value.
 

Method Detail

doInTransaction

java.lang.Object doInTransaction()
Runs an action in a transaction and returns a optional value.

Returns:
Optional result of the operation. May be null
Throws:
java.lang.RuntimeException - if anything went wrong. The caller will be responsible for rolling back.


Copyright © 2009 Atlassian. All Rights Reserved.