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

Adds saveObjectAsync with a CompletableFuture return for databases #1308

Merged
merged 6 commits into from
Apr 25, 2020

Conversation

tastybento
Copy link
Member

Async saving to the database should return a completable future so that code can be written to run after the value has absolutely been saved to the database. This PR adds the method to the database classes to enable this. It retains but deprecates the original saveObject method. That method's return value was useless since we moved to async saving. It has to be kept though to support backwards runtime compatibility for addons that use saveObject.

I recommend all addons move to use saveObjectAsync after this PR is merged.

@tastybento tastybento requested review from Poslovitch and BONNe April 25, 2020 16:56
@tastybento tastybento added Type: API relating to the BentoBox API Type: Enhancement Improvement or modification which is usually a new feature. labels Apr 25, 2020
@Poslovitch Poslovitch added the Status: Need review Waiting for a review to be made on this Pull Request label Apr 25, 2020
@Poslovitch Poslovitch added this to the 1.13.0 milestone Apr 25, 2020
@Poslovitch Poslovitch added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: Need review Waiting for a review to be made on this Pull Request labels Apr 25, 2020
@Poslovitch Poslovitch removed the request for review from BONNe April 25, 2020 23:00
@Poslovitch Poslovitch changed the title Adds saveObjectAsync with a CompletableFuture return Adds saveObjectAsync with a CompletableFuture return for databases Apr 25, 2020
@Poslovitch Poslovitch merged commit fe58159 into develop Apr 25, 2020
@Poslovitch Poslovitch deleted the completable_future_database_saves branch April 25, 2020 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: API relating to the BentoBox API Type: Enhancement Improvement or modification which is usually a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants