-
Notifications
You must be signed in to change notification settings - Fork 59
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 XRANGE command #1501
Java: Add the XRANGE command #1501
Conversation
* Java: Add the XRANGE command Signed-off-by: Andrew Carbonetto <[email protected]> * CARGO FMT Signed-off-by: Andrew Carbonetto <[email protected]> * Clean documentation Signed-off-by: Andrew Carbonetto <[email protected]> * Add empty test Signed-off-by: Andrew Carbonetto <[email protected]> * Add empty test Signed-off-by: Andrew Carbonetto <[email protected]> * Update XRANGE for self-review Signed-off-by: Andrew Carbonetto <[email protected]> * Use XRANGE bounding objects Signed-off-by: Andrew Carbonetto <[email protected]> * Add StreamRange documentation Signed-off-by: Andrew Carbonetto <[email protected]> * SPOTLESS Signed-off-by: Andrew Carbonetto <[email protected]> * Fix transaction tests Signed-off-by: Andrew Carbonetto <[email protected]> * SPOTLESS Signed-off-by: Andrew Carbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]>
* @return A <code>Map</code> of key to stream entry data, where entry data is an array with pairs | ||
* of item, data. |
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.
* @return A <code>Map</code> of key to stream entry data, where entry data is an array with pairs | |
* of item, data. | |
* @return A <code>Map</code> of entry ID to entry data. |
We don't have pairs there - I mean we don't return data as pairs. I'd like to say that the data is usually flat pairs, but I don't know how.
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.
I could say "pairings" to distinguish from the Pair object.
java/client/src/main/java/glide/api/commands/StreamBaseCommands.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Andrew Carbonetto <[email protected]>
@@ -2659,12 +2661,55 @@ public T xlen(@NonNull String key) { | |||
* less than the number of entries in <code>ids</code>, if the specified <code>ids</code> | |||
* don't exist in the stream. | |||
*/ | |||
public T xdel(String key, String[] ids) { | |||
public T xdel(@NonNull String key, @NonNull String[] ids) { |
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.
probably small enough to sneak in but was this intentional? changes on another command?
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.
Yes. This was an intentionally sneaky move...
java/client/src/main/java/glide/api/models/BaseTransaction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Andrew Carbonetto <[email protected]>
* Java: Add the XRANGE command (#325) * Java: Add the XRANGE command Signed-off-by: Andrew Carbonetto <[email protected]> * CARGO FMT Signed-off-by: Andrew Carbonetto <[email protected]> * Clean documentation Signed-off-by: Andrew Carbonetto <[email protected]> * Add empty test Signed-off-by: Andrew Carbonetto <[email protected]> * Add empty test Signed-off-by: Andrew Carbonetto <[email protected]> * Update XRANGE for self-review Signed-off-by: Andrew Carbonetto <[email protected]> * Use XRANGE bounding objects Signed-off-by: Andrew Carbonetto <[email protected]> * Add StreamRange documentation Signed-off-by: Andrew Carbonetto <[email protected]> * SPOTLESS Signed-off-by: Andrew Carbonetto <[email protected]> * Fix transaction tests Signed-off-by: Andrew Carbonetto <[email protected]> * SPOTLESS Signed-off-by: Andrew Carbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> * XRANGE udpates for review Signed-off-by: Andrew Carbonetto <[email protected]> * SPOTLESS Signed-off-by: Andrew Carbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]>
Issue #, if available:
Description of changes:
Adds the XRANGE cmd for the Java client
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.