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

Java: Add the XGROUP CREATE and XGROUP DESTROY commands #1557

Conversation

acarbonetto
Copy link
Contributor

Issue #, if available:

Description of changes:

Adds the following commands:
https://valkey.io/commands/xgroup-create/
https://valkey.io/commands/xgroup-destroy/

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

* JAVA: Add the XGROUP CREATE and DESTROY command

Signed-off-by: Andrew Carbonetto <[email protected]>

* Fix XGROUP DESTROY

Signed-off-by: Andrew Carbonetto <[email protected]>

* Clean up for self-review

Signed-off-by: Andrew Carbonetto <[email protected]>

* cargo fmt

Signed-off-by: Andrew Carbonetto <[email protected]>

* Change builder to use constructors

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add optional javadocs

Signed-off-by: Andrew Carbonetto <[email protected]>

---------

Signed-off-by: Andrew Carbonetto <[email protected]>
@acarbonetto acarbonetto requested a review from a team as a code owner June 12, 2024 22:19
@Yury-Fridlyand Yury-Fridlyand added the java issues and fixes related to the java client label Jun 12, 2024
Signed-off-by: Andrew Carbonetto <[email protected]>
Copy link
Collaborator

@GumpacG GumpacG left a comment

Choose a reason for hiding this comment

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

I think it just needs Spotless. LGTM

Signed-off-by: Andrew Carbonetto <[email protected]>
*/
@Builder.Default private boolean mkStream = false;

public static class StreamGroupOptionsBuilder {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do you need 2 builders? lines 30 and 15

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will be the same builder. We're writing this infrastructure to add the makeStream() signature (without boolean).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this means we can do StreamGroupOptions.builder().makeStream().build();

Copy link
Collaborator

Choose a reason for hiding this comment

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

It is confusing, but "It is not silly if it works" ©

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lombok is the best

Signed-off-by: Andrew Carbonetto <[email protected]>
@acarbonetto acarbonetto merged commit fe82f1b into valkey-io:main Jun 17, 2024
46 checks passed
@acarbonetto acarbonetto deleted the java/integ_acarbo_add_xgroup_create_destroy branch June 18, 2024 06:02
cyip10 pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 19, 2024
…o#1557)

* Java: Add the `XGROUP CREATE` and `XGROUP DESTROY` commands (#359)

* JAVA: Add the XGROUP CREATE and DESTROY command

Signed-off-by: Andrew Carbonetto <[email protected]>

* Fix XGROUP DESTROY

Signed-off-by: Andrew Carbonetto <[email protected]>

* Clean up for self-review

Signed-off-by: Andrew Carbonetto <[email protected]>

* cargo fmt

Signed-off-by: Andrew Carbonetto <[email protected]>

* Change builder to use constructors

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add optional javadocs

Signed-off-by: Andrew Carbonetto <[email protected]>

---------

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update options to use builder

Signed-off-by: Andrew Carbonetto <[email protected]>

* SPOTLESS

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update doc

Signed-off-by: Andrew Carbonetto <[email protected]>

---------

Signed-off-by: Andrew Carbonetto <[email protected]>
cyip10 pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 24, 2024
…o#1557)

* Java: Add the `XGROUP CREATE` and `XGROUP DESTROY` commands (#359)

* JAVA: Add the XGROUP CREATE and DESTROY command

Signed-off-by: Andrew Carbonetto <[email protected]>

* Fix XGROUP DESTROY

Signed-off-by: Andrew Carbonetto <[email protected]>

* Clean up for self-review

Signed-off-by: Andrew Carbonetto <[email protected]>

* cargo fmt

Signed-off-by: Andrew Carbonetto <[email protected]>

* Change builder to use constructors

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add optional javadocs

Signed-off-by: Andrew Carbonetto <[email protected]>

---------

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update options to use builder

Signed-off-by: Andrew Carbonetto <[email protected]>

* SPOTLESS

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update doc

Signed-off-by: Andrew Carbonetto <[email protected]>

---------

Signed-off-by: Andrew Carbonetto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java issues and fixes related to the java client
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

5 participants