-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce new managed transaction methods and deprecate existing ones #1196
Conversation
dd182f9
to
61b4371
Compare
670d8fa
to
d22493c
Compare
This update introduces new methods for managed transactions, also known as transaction functions. Furthermore, it deprecates the existing methods. The new methods are: - `executeRead` (synchronous and reactive), `executeReadAsync` (asynchronous) - `executeWrite` (synchronous and reactive), `executeWriteAsync` (asynchronous) - `executeWriteWithoutResult` (synchronous) There are overloaded options that take transaction configuration. The new methods do not permit explicit management (commit, rollback, close) of managed transaction. The driver will attempt committing the transaction as long as the provided unit of work completes successfully.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A nice simplification of the tx function API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great change to the surface of the driver, thank you for that!
I went in detail through all the JavaDoc. I appreciate the information about the semantics, it should go in a doc, too.
I annotated the blocking session with a couple of suggestions. Please apply them to the standard session and do the same for async and reactive.
Thank you.
This update introduces new methods for managed transactions, also known as transaction functions. Furthermore, it deprecates the existing methods.
The new methods are:
executeRead
(synchronous and reactive),executeReadAsync
(asynchronous)executeWrite
(synchronous and reactive),executeWriteAsync
(asynchronous)executeWriteWithoutResult
(synchronous)There are overloaded options that take transaction configuration.
The new methods do not permit explicit management (commit, rollback, close) of managed transaction. The driver will attempt committing the transaction as long as the provided unit of work completes successfully.