Interface Transaction
- 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 Transaction
An Exonum transaction.
- See Also:
- Exonum Transactions, Exonum Services
-
Method Summary
Modifier and Type Method Description void
execute(TransactionContext context)
Execute the transaction, possibly modifying the blockchain state.
-
Method Details
-
execute
Execute the transaction, possibly modifying the blockchain state.- Parameters:
context
- a transaction execution context, which allows to access the information about this transaction and modify the blockchain state through the included database fork- Throws:
TransactionExecutionException
- if the transaction cannot be executed normally and has to be rolled back. The transaction will be committed as failed (error kind SERVICE), the error code with the optional description will be saved into the storage. The client can request the error code to know the reason of the failureRuntimeException
- if an unexpected error occurs. A correct transaction implementation must not throw such exceptions. The transaction will be committed as failed (status "panic")
-