@FunctionalInterface public interface TransactionFunction<R> extends java.util.function.Function<Transaction,R>
Connection's
runTransaction. This can neatly be done inline using a lambda expression.| Modifier and Type | Method and Description |
|---|---|
R |
apply(Transaction txn)
The callback invoked (potentially several times) to run your transaction.
|
R apply(Transaction txn)
apply in interface java.util.function.Function<Transaction,R>txn - The API through which your transaction can navigate and interact with the
object-graph stored by GoshawkDB.java.lang.Exception - your callback may throw an exception, for example to indicate you wish the
transaction to be aborted.