- All Superinterfaces:
ReactiveQueryRunner
- All Known Implementing Classes:
InternalReactiveTransaction
Same as
Transaction
except this reactive transaction exposes a reactive API.- Since:
- 5.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionclose()
Close the transaction.<T> Flow.Publisher<T>
commit()
Commits the transaction.isOpen()
Determine if transaction is open.<T> Flow.Publisher<T>
rollback()
Rolls back the transaction.
-
Method Details
-
commit
Commits the transaction. It completes without publishing anything if transaction is committed successfully. Otherwise, errors when there is any error to commit.- Type Parameters:
T
- makes it easier to be chained after other publishers.- Returns:
- an empty publisher.
-
rollback
Rolls back the transaction. It completes without publishing anything if transaction is rolled back successfully. Otherwise, errors when there is any error to roll back.- Type Parameters:
T
- makes it easier to be chained after other publishers.- Returns:
- an empty publisher.
-
close
Flow.Publisher<Void> close()Close the transaction. If the transaction has beencommitted
orrolled back
, the close is optional and no operation is performed. Otherwise, the transaction will be rolled back by default by this method.- Returns:
- new
Flow.Publisher
that gets completed when close is successful, otherwise an error is signalled.
-
isOpen
Flow.Publisher<Boolean> isOpen()Determine if transaction is open.- Returns:
- a publisher emitting
true
if transaction is open andfalse
otherwise.
-