Module storm.java

Interface TransactionBlock<R,E extends Exception>

Type Parameters:
R - the result type.
E - the checked exception type thrown by the block, if any.
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TransactionBlock<R,E extends Exception>
A transactional block executed by Transactions.transaction(st.orm.template.TransactionBlock<R, E>).

Checked exceptions thrown by the block propagate to the caller unchanged and trigger rollback.

Since:
1.13
  • Method Summary

    Modifier and Type
    Method
    Description
    execute(Transaction transaction)
    Executes the transactional logic.
  • Method Details

    • execute

      R execute(Transaction transaction) throws E
      Executes the transactional logic.
      Parameters:
      transaction - the handle to the transaction the block runs in.
      Returns:
      the result of the block.
      Throws:
      E