public interface TransactionRunnable
Transaction. Use this interface in conjunction with the
Transaction.run(com.persistit.TransactionRunnable) method.| Modifier and Type | Method and Description |
|---|---|
void |
runTransaction()
Interface for application logic that is to be run within the scope of a
Transaction. |
void runTransaction()
throws PersistitException,
RollbackException
Interface for application logic that is to be run within the scope of a
Transaction. The Transaction.run(com.persistit.TransactionRunnable) method accepts a
TransactionRunnable and runs it in a transactional context.
The implementation of this method generally should never invoke methods
of the enclosing transaction, (which is not supplied). The
implementation's application logic may throw a
RollbackException if rollback is necessary due to conditions
detected by the application itself. Persistit operations such as
Exchange.fetch() and Exchange.store(com.persistit.Key, com.persistit.Value) may also throw
RollbackExceptions when executed within a transaction; the
application logic implementing this method should generally not catch
PersistitException, including RollbackException
. The the calling code in Transaction is designed to handle
them.
PersistitExceptionRollbackExceptionCopyright © 2025 Open Identity Platform Community. All rights reserved.