forked from valkey-io/valkey-glide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Java: Add HSCAN command (valkey-io#1706)
* Java: Add `SSCAN` command (#394) * Add ScanOptions base class for scan-family options. * Expose the cursor as a String to support unsigned 64-bit cursor values. Co-authored-by: James Duong <[email protected]> * Java: Add `ZSCAN` command (#397) --------- Co-authored-by: James Duong <[email protected]> * WIP TODO: support transactions, docs, and more IT * Added more tests * Added tests and javadocs * Improved examples and tests * Correct use of SScanOptions instead of ScanOptions for SScan * Remove plumbing for SCAN command * Sleep after sadd() calls before sscan() calls Due to eventual consistency * Change sscan cursor to be a String Also fix bug in SharedCommandTests * WIP with todos # Conflicts: # glide-core/src/protobuf/redis_request.proto # glide-core/src/request_type.rs # java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java * Add ZScan to TransactionTestUtilities * Spotless cleanup * Test fixes * Cleanup test code * Apply IntelliJ suggestions * Use String.valueOf() instead of concatenating empty string * Added better error info for set comparison failures * More logging for test failures * Add sleeps after zadd() calls To help make sure data is consistent without WAIT * Longer sleeps * Reduce wait time * Experiment with unsigned 64-bit cursors * Fix rebase error * WIP TODO: support transactions, docs, and more IT * Added more tests * Added tests and javadocs * Improved examples and tests * Sleep after sadd() calls before sscan() calls Due to eventual consistency * Change sscan cursor to be a String Also fix bug in SharedCommandTests * Fix rebase conflicts * Fix another rebase conflict * Spotless * HScan * Flakey test * Add HScan transaction unit test * Rename ScanOptions to BaseScanOptions * Fix merge issues * Fix module-info ordering * Tidy up docs * PR comments Fix up merge duplication and use HScanOptions constants. --------- Co-authored-by: Guian Gumpac <[email protected]>
- Loading branch information
Showing
13 changed files
with
422 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,6 +240,7 @@ enum RequestType { | |
XGroupSetId = 199; | ||
SScan = 200; | ||
ZScan = 201; | ||
HScan = 202; | ||
} | ||
|
||
message Command { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
java/client/src/main/java/glide/api/models/commands/scan/HScanOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0 */ | ||
package glide.api.models.commands.scan; | ||
|
||
import glide.api.commands.HashBaseCommands; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
/** | ||
* Optional arguments for {@link HashBaseCommands#hscan(String, String, HScanOptions)}. | ||
* | ||
* @see <a href="https://valkey.io/commands/hscan/">valkey.io</a> | ||
*/ | ||
@SuperBuilder | ||
public class HScanOptions extends BaseScanOptions {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.