Skip to content
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

None fluent API for TransactionalIndexedCollection #282

Open
sheinbergon opened this issue Apr 29, 2021 · 0 comments
Open

None fluent API for TransactionalIndexedCollection #282

sheinbergon opened this issue Apr 29, 2021 · 0 comments

Comments

@sheinbergon
Copy link

When using TransactionalIndexedCollection and running queries using retrieve(...), one needs to save the ResultSet in a temporary variable so we can close it later, otherwise the readLock remains held.

We can do try-with-resources to clean the code a bit, but as the returned result is already an iterable, most of the time we want to just call stream or do something else with the returned collection.

It'd be great if the API transforming the Iterable into a stream (i.e stream()) could read the elements and close the ResultSet, for the very least accept some flag to instruct him to do so.

That would allow for a much cleaner and usable API in the transnational case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant