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

feat: Add StorageClient #2275

Merged
merged 3 commits into from
Mar 10, 2025
Merged

feat: Add StorageClient #2275

merged 3 commits into from
Mar 10, 2025

Conversation

mykola-mokhnach
Copy link
Contributor

Change list

Java client for the storage-plugin

Types of changes

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

var wsInfo = (Map<String, Object>) value.get("ws");
var streamWsPathname = (String) wsInfo.get("stream");
var eventWsPathname = (String) wsInfo.get("events");
final var completion = new CountDownLatch(1);
Copy link
Member

@KazuCocoa KazuCocoa Mar 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could CompletableFuture be good for modern Java instead of CountDownLatch? I don't have much experience this in Java, but I saw CompletableFuture usage for async before. (entire implementation itself looks good to me)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say everything is good that does its job well, and is not deprecated, and is readable :)

The concept of CompletableFuture does not make java code async, it just hides the threading complexity under another abstraction layer.
If you have a proposal on how to make the same implementation shorter/better understable via CompletableFuture use then I would be happy to apply it

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

Successfully merging this pull request may close these issues.

4 participants