/** * Execute given operation within a transaction and return a result. A {@link Transaction} reference is provided to * perform <code>commit</code> and <code>rollback</code> operations. * @param <R> Operation result type * @param operation Operation to execute (not null) * @return The operation result */ default <R> R withTransaction(TransactionalOperation<R> operation) { return withTransaction(operation, TransactionConfiguration.getDefault()); }
/** * Execute given operation within a transaction and return a result. An {@link ReactiveTransaction} reference is * provided to perform <code>commit</code> and <code>rollback</code> operations. * @param <R> Operation result type * @param operation Operation to execute (not null) * @return A {@link Flux} which can be used to handle the asynchronous operation outcome and the operation results */ default <R> Flux<R> withTransaction(ReactiveTransactionalOperation<R> operation) { return withTransaction(operation, TransactionConfiguration.getDefault()); }
/** * Execute given operation within a transaction and return a result. An {@link AsyncTransaction} reference is * provided to perform <code>commit</code> and <code>rollback</code> operations. * @param <R> Operation result type * @param operation Operation to execute (not null) * @return A {@link CompletionStage} which can be used to handle the asynchronous operation outcome and the * operation result */ default <R> CompletionStage<R> withTransaction(AsyncTransactionalOperation<R> operation) { return withTransaction(operation, TransactionConfiguration.getDefault()); }
: TransactionConfiguration.getDefault();
: TransactionConfiguration.getDefault();