public interface TxnHelper
| Modifier and Type | Interface and Description |
|---|---|
static interface |
TxnHelper.TransactionOperations<V> |
| Modifier and Type | Method and Description |
|---|---|
SEnvironment |
getEnvironment()
Return the environment used to create transactions.
|
default <V> V |
runInSingleTxn(STransaction userTxn,
java.util.function.Function<STransaction,V> operations)
Run multiple operations in the context of a single transaction.
|
default <V> V |
runInSingleTxnWithIOException(STransaction userTxn,
TxnHelper.TransactionOperations<V> operations)
Run multiple operations in the context of a single transaction.
|
SEnvironment getEnvironment()
default <V> V runInSingleTxn(STransaction userTxn, java.util.function.Function<STransaction,V> operations) throws SDatabaseException
V - the type of the resultuserTxn - the user-specified transaction, may be nulloperations - the operationsSDatabaseException - on errordefault <V> V runInSingleTxnWithIOException(STransaction userTxn, TxnHelper.TransactionOperations<V> operations) throws java.io.IOException, SDatabaseException
This method allows operations to throw IOException.
V - the type of the resultuserTxn - the user-specified transaction, may be nulloperations - the operationsjava.io.IOException - on I/O errorSDatabaseException - on errorCopyright (c) 2016, 2019 Oracle and/or its affiliates. All rights reserved.