public interface TransactionalRunnable
FunctionalInterface
that wraps transactional code.Modifier and Type | Method and Description |
---|---|
void |
run(Configuration configuration)
Run the transactional code.
|
void run(Configuration configuration) throws java.lang.Exception
If this method completes normally, and this is not a nested transaction,
then the transaction will be committed. If this method completes with an
exception, then the transaction is rolled back to the beginning of this
TransactionalRunnable
.
configuration
- The Configuration
in whose context the
transaction is run.java.lang.Exception
- Any exception that will cause a rollback of the code
contained in this transaction. If this is a nested
transaction, the rollback may be performed only to the state
before executing this TransactionalRunnable
.Copyright © 2014. All Rights Reserved.