From 6d73d6ea63c383dcbd0013ec432a260d166e3ed4 Mon Sep 17 00:00:00 2001 From: Yury-Fridlyand Date: Fri, 5 Jul 2024 19:52:56 -0700 Subject: [PATCH] Java: Groom transaction docs and add some tests. (#1820) --- .../src/main/java/glide/api/BaseClient.java | 2 +- .../src/main/java/glide/api/RedisClient.java | 5 +- .../java/glide/api/RedisClusterClient.java | 6 +- .../glide/api/models/BaseTransaction.java | 1721 ++++++++--------- .../glide/api/models/ClusterTransaction.java | 59 +- .../java/glide/api/models/Transaction.java | 53 +- .../{api/models => utils}/ArgsBuilder.java | 3 +- .../test/java/glide/api/RedisClientTest.java | 2 +- .../cluster/ClusterTransactionTests.java | 25 +- .../glide/standalone/TransactionTests.java | 42 +- 10 files changed, 976 insertions(+), 942 deletions(-) rename java/client/src/main/java/glide/{api/models => utils}/ArgsBuilder.java (96%) diff --git a/java/client/src/main/java/glide/api/BaseClient.java b/java/client/src/main/java/glide/api/BaseClient.java index 51db4a580d..cccf184a3e 100644 --- a/java/client/src/main/java/glide/api/BaseClient.java +++ b/java/client/src/main/java/glide/api/BaseClient.java @@ -201,7 +201,6 @@ import glide.api.commands.StreamBaseCommands; import glide.api.commands.StringBaseCommands; import glide.api.commands.TransactionsBaseCommands; -import glide.api.models.ArgsBuilder; import glide.api.models.GlideString; import glide.api.models.PubSubMessage; import glide.api.models.Script; @@ -266,6 +265,7 @@ import glide.managers.BaseResponseResolver; import glide.managers.CommandManager; import glide.managers.ConnectionManager; +import glide.utils.ArgsBuilder; import java.util.Arrays; import java.util.EnumSet; import java.util.HashMap; diff --git a/java/client/src/main/java/glide/api/RedisClient.java b/java/client/src/main/java/glide/api/RedisClient.java index bf503c51ad..593ca46b54 100644 --- a/java/client/src/main/java/glide/api/RedisClient.java +++ b/java/client/src/main/java/glide/api/RedisClient.java @@ -3,7 +3,6 @@ import static glide.api.models.GlideString.gs; import static glide.api.models.commands.SortBaseOptions.STORE_COMMAND_STRING; -import static glide.api.models.commands.SortOptions.STORE_COMMAND_STRING; import static glide.api.models.commands.function.FunctionListOptions.LIBRARY_NAME_REDIS_API; import static glide.api.models.commands.function.FunctionListOptions.WITH_CODE_REDIS_API; import static glide.api.models.commands.function.FunctionLoadOptions.REPLACE; @@ -48,7 +47,6 @@ import glide.api.commands.ScriptingAndFunctionsCommands; import glide.api.commands.ServerManagementCommands; import glide.api.commands.TransactionsCommands; -import glide.api.models.ArgsBuilder; import glide.api.models.GlideString; import glide.api.models.Transaction; import glide.api.models.commands.FlushMode; @@ -58,6 +56,7 @@ import glide.api.models.commands.function.FunctionRestorePolicy; import glide.api.models.commands.scan.ScanOptions; import glide.api.models.configuration.RedisClientConfiguration; +import glide.utils.ArgsBuilder; import java.util.Arrays; import java.util.Map; import java.util.concurrent.CompletableFuture; @@ -100,7 +99,7 @@ public CompletableFuture customCommand(@NonNull String[] args) { @Override public CompletableFuture exec(@NonNull Transaction transaction) { - if (transaction.isBinarySafeOutput()) { + if (transaction.isBinaryOutput()) { return commandManager.submitNewTransaction( transaction, this::handleArrayOrNullResponseBinary); } else { diff --git a/java/client/src/main/java/glide/api/RedisClusterClient.java b/java/client/src/main/java/glide/api/RedisClusterClient.java index 6806a3226d..049dff3ee6 100644 --- a/java/client/src/main/java/glide/api/RedisClusterClient.java +++ b/java/client/src/main/java/glide/api/RedisClusterClient.java @@ -50,7 +50,6 @@ import glide.api.commands.ServerManagementClusterCommands; import glide.api.commands.TransactionsClusterCommands; import glide.api.logging.Logger; -import glide.api.models.ArgsBuilder; import glide.api.models.ClusterTransaction; import glide.api.models.ClusterValue; import glide.api.models.GlideString; @@ -65,6 +64,7 @@ import glide.api.models.configuration.RequestRoutingConfiguration.SingleNodeRoute; import glide.ffi.resolvers.ClusterScanCursorResolver; import glide.managers.CommandManager; +import glide.utils.ArgsBuilder; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -128,7 +128,7 @@ protected ClusterValue handleCustomCommandResponse(Route route, Response @Override public CompletableFuture exec(@NonNull ClusterTransaction transaction) { - if (transaction.isBinarySafeOutput()) { + if (transaction.isBinaryOutput()) { return commandManager.submitNewTransaction( transaction, Optional.empty(), this::handleArrayOrNullResponseBinary); } else { @@ -140,7 +140,7 @@ public CompletableFuture exec(@NonNull ClusterTransaction transaction) @Override public CompletableFuture exec( @NonNull ClusterTransaction transaction, @NonNull SingleNodeRoute route) { - if (transaction.isBinarySafeOutput()) { + if (transaction.isBinaryOutput()) { return commandManager.submitNewTransaction( transaction, Optional.of(route), this::handleArrayOrNullResponseBinary); } else { diff --git a/java/client/src/main/java/glide/api/models/BaseTransaction.java b/java/client/src/main/java/glide/api/models/BaseTransaction.java index c7e5f20be7..bdff1e42ae 100644 --- a/java/client/src/main/java/glide/api/models/BaseTransaction.java +++ b/java/client/src/main/java/glide/api/models/BaseTransaction.java @@ -20,6 +20,7 @@ import static glide.api.models.commands.function.FunctionListOptions.WITH_CODE_REDIS_API; import static glide.api.models.commands.function.FunctionLoadOptions.REPLACE; import static glide.api.models.commands.stream.StreamClaimOptions.JUST_ID_REDIS_API; +import static glide.api.models.commands.stream.StreamGroupOptions.ENTRIES_READ_VALKEY_API; import static glide.api.models.commands.stream.StreamReadOptions.READ_COUNT_REDIS_API; import static glide.api.models.commands.stream.XInfoStreamOptions.COUNT; import static glide.api.models.commands.stream.XInfoStreamOptions.FULL; @@ -263,7 +264,9 @@ import glide.api.models.commands.function.FunctionRestorePolicy; import glide.api.models.commands.geospatial.GeoAddOptions; import glide.api.models.commands.geospatial.GeoSearchOptions; -import glide.api.models.commands.geospatial.GeoSearchOrigin; +import glide.api.models.commands.geospatial.GeoSearchOrigin.CoordOrigin; +import glide.api.models.commands.geospatial.GeoSearchOrigin.MemberOrigin; +import glide.api.models.commands.geospatial.GeoSearchOrigin.SearchOrigin; import glide.api.models.commands.geospatial.GeoSearchResultOptions; import glide.api.models.commands.geospatial.GeoSearchShape; import glide.api.models.commands.geospatial.GeoSearchStoreOptions; @@ -285,6 +288,7 @@ import glide.api.models.commands.stream.StreamTrimOptions; import glide.api.models.configuration.ReadFrom; import glide.managers.CommandManager; +import glide.utils.ArgsBuilder; import java.util.Map; import lombok.Getter; import lombok.NonNull; @@ -294,56 +298,47 @@ import redis_request.RedisRequestOuterClass.Transaction; /** - * Base class encompassing shared commands for both standalone and cluster mode implementations in a - * transaction. Transactions allow the execution of a group of commands in a single step. + * Base class encompassing shared commands for both standalone and cluster server installations. + * Transactions allow the execution of a group of commands in a single step. * - *

Command Response: An array of command responses is returned by the client exec command, in the - * order they were given. Each element in the array represents a command given to the transaction. - * The response for each command depends on the executed Redis command. Specific response types are - * documented alongside each method. + *

Transaction Response: An array of command responses is returned by the client + * exec command, in the order they were given. Each element in the array represents a + * command given to the transaction. The response for each command depends on the executed Valkey + * command. Specific response types are documented alongside each method. * - * @param child typing for chaining method calls + * @param child typing for chaining method calls. */ @Getter public abstract class BaseTransaction> { /** Command class to send a single request to Redis. */ protected final Transaction.Builder protobufTransaction = Transaction.newBuilder(); - protected boolean binarySafeOutput = false; - - protected abstract T getThis(); + /** + * Flag whether transaction commands may return binary data.
+ * If set to true, all commands in this transaction return {@link GlideString} + * instead of {@link String}. + */ + protected boolean binaryOutput = false; - /** Enable binary output */ - public T withBinarySafeOutput() { - binarySafeOutput = true; + /** Sets {@link #binaryOutput} to true. */ + public T withBinaryOutput() { + binaryOutput = true; return getThis(); } - /** - * Return true if the output array from this transaction should handle strings as valid UTF-8 - * strings or use GlideString - */ - public boolean isBinarySafeOutput() { - return this.binarySafeOutput; - } + protected abstract T getThis(); /** * Executes a single command, without checking inputs. Every part of the command, including * subcommands, should be added as a separate value in args. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @apiNote See Glide - * for Redis Wiki for details on the restrictions and limitations of the custom command - * API. + * Wiki for details on the restrictions and limitations of the custom command API. * @param args Arguments for the custom command. - * @return A response from Redis with an Object. - * @example Returns a list of all pub/sub clients: - *

{@code
-     * Object result = client.customCommand(new String[]{ "CLIENT", "LIST",
-     * "TYPE", "PUBSUB" }).get();
-     * }
+ * @return Command Response - A response from the server with an Object. */ public T customCommand(ArgType[] args) { checkTypeOrThrow(args); @@ -354,9 +349,9 @@ public T customCommand(ArgType[] args) { /** * Echoes the provided message back. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException - * @see valkey.io for details. * @param message The message to be echoed back. * @return Command Response - The provided message. */ @@ -367,10 +362,10 @@ public T echo(@NonNull ArgType message) { } /** - * Pings the Redis server. + * Pings the server. * * @see valkey.io for details. - * @return Command Response - A response from Redis with a String. + * @return Command Response - A response from the server with a String. */ public T ping() { protobufTransaction.addCommands(buildCommand(Ping)); @@ -378,13 +373,13 @@ public T ping() { } /** - * Pings the Redis server. + * Pings the server. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param msg The ping argument that will be returned. - * @return Command Response - A response from Redis with a String. + * @return Command Response - A response from the server with a String. */ public T ping(@NonNull ArgType msg) { checkTypeOrThrow(msg); @@ -393,8 +388,7 @@ public T ping(@NonNull ArgType msg) { } /** - * Gets information and statistics about the Redis server using the {@link Section#DEFAULT} - * option. + * Gets information and statistics about the server using the {@link Section#DEFAULT} option. * * @see valkey.io for details. * @return Command Response - A String with server info. @@ -405,7 +399,7 @@ public T info() { } /** - * Gets information and statistics about the Redis server. + * Gets information and statistics about the server. * * @see valkey.io for details. * @param options A list of {@link Section} values specifying which sections of information to @@ -421,8 +415,8 @@ public T info(@NonNull InfoOptions options) { * Removes the specified keys from the database. A key is ignored if it does not * exist. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param keys The keys we wanted to remove. * @return Command Response - The number of keys that were removed. @@ -434,10 +428,10 @@ public T del(@NonNull ArgType[] keys) { } /** - * Gets the value associated with the given key, or null if no such value exists. + * Gets the value associated with the given key, or null if no such value exists. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to retrieve from the database. * @return Command Response - If key exists, returns the value of @@ -452,8 +446,8 @@ public T get(@NonNull ArgType key) { /** * Gets a string value associated with the given key and deletes the key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to retrieve from the database. * @return Command Response - If key exists, returns the value of @@ -468,9 +462,9 @@ public T getdel(@NonNull ArgType key) { /** * Gets the value associated with the given key. * - * @since Redis 6.2.0. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2.0. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to retrieve from the database. * @return Command Response - If key exists, return the value of the @@ -485,9 +479,9 @@ public T getex(@NonNull ArgType key) { /** * Gets the value associated with the given key. * - * @since Redis 6.2.0. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2.0. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to retrieve from the database. * @param options The {@link GetExOptions} options. @@ -504,12 +498,12 @@ public T getex(@NonNull ArgType key, @NonNull GetExOptions options) { /** * Sets the given key with the given value. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to store. * @param value The value to store with the given key. - * @return Command Response - A response from Redis. + * @return Command Response - OK. */ public T set(@NonNull ArgType key, @NonNull ArgType value) { checkTypeOrThrow(key); @@ -521,8 +515,8 @@ public T set(@NonNull ArgType key, @NonNull ArgType value) { * Sets the given key with the given value. Return value is dependent on the passed options. * * @see valkey.io for details. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @param key The key to store. * @param value The value to store with the given key. * @param options The Set options. @@ -542,12 +536,12 @@ public T set( /** * Appends a value to a key. If key does not exist it is - * created and set as an empty string, so APPEND will be similar to {@see #set} in + * created and set as an empty string, so APPEND will be similar to {@link #set} in * this special case. * * @see valkey.io for details. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @param key The key of the string. * @param value The value to append. * @return Command Response - The length of the string after appending the value. @@ -562,11 +556,11 @@ public T append(@NonNull ArgType key, @NonNull ArgType value) { * Retrieves the values of multiple keys. * * @see valkey.io for details. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @param keys A list of keys to retrieve values for. - * @return Command Response - An array of values corresponding to the provided keys. - *
+ * @return Command Response - An array of values corresponding to the provided + * keys.
* If a keyis not found, its corresponding value in the list will be null * . */ @@ -609,8 +603,8 @@ public T msetnx(@NonNull Map keyValueMap) { * is set to 0 before performing the operation. * * @see valkey.io for details. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @param key The key to increment its value. * @return Command Response - The value of key after the increment. */ @@ -625,8 +619,8 @@ public T incr(@NonNull ArgType key) { * does not exist, it is set to 0 before performing the operation. * * @see valkey.io for details. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @param key The key to increment its value. * @param amount The amount to increment. * @return Command Response - The value of key after the increment. @@ -644,8 +638,8 @@ public T incrBy(@NonNull ArgType key, long amount) { * performing the operation. * * @see valkey.io for details. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @param key The key to increment its value. * @param amount The amount to increment. * @return Command Response - The value of key after the increment. @@ -662,8 +656,8 @@ public T incrByFloat(@NonNull ArgType key, double amount) { * is set to 0 before performing the operation. * * @see valkey.io for details. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @param key The key to decrement its value. * @return Command Response - The value of key after the decrement. */ @@ -678,8 +672,8 @@ public T decr(@NonNull ArgType key) { * does not exist, it is set to 0 before performing the operation. * * @see valkey.io for details. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @param key The key to decrement its value. * @param amount The amount to decrement. * @return Command Response - The value of key after the decrement. @@ -693,8 +687,8 @@ public T decrBy(@NonNull ArgType key, long amount) { /** * Returns the length of the string value stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to check its length. * @return Command Response - The length of the string value stored at key.
@@ -714,8 +708,8 @@ public T strlen(@NonNull ArgType key) { * the string is padded with zero bytes to make offset fit. Creates the key * if it doesn't exist. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the string to update. * @param offset The position in the string where value should be written. @@ -736,8 +730,8 @@ public T setrange(@NonNull ArgType key, int offset, @NonNull ArgType v * order to provide an offset starting from the end of the string. So -1 means the * last character, -2 the penultimate and so forth. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the string. * @param start The starting offset. @@ -754,8 +748,8 @@ public T getrange(@NonNull ArgType key, int start, int end) { /** * Retrieves the value associated with field in the hash stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param field The field in the hash stored at key to retrieve from the database. @@ -771,8 +765,8 @@ public T hget(@NonNull ArgType key, @NonNull ArgType field) { /** * Sets the specified fields to their respective values in the hash stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param fieldValueMap A field-value map consisting of fields and their corresponding values to @@ -793,8 +787,8 @@ public T hset(@NonNull ArgType key, @NonNull Map fie * If key does not exist, a new key holding a hash is created.
* If field already exists, this operation has no effect. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param field The field to set the value for. @@ -813,8 +807,8 @@ public T hsetnx(@NonNull ArgType key, @NonNull ArgType field, @NonNull * Removes the specified fields from the hash stored at key. Specified fields that do * not exist within this hash are ignored. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param fields The fields to remove from the hash stored at key. @@ -831,8 +825,8 @@ public T hdel(@NonNull ArgType key, @NonNull ArgType[] fields) { /** * Returns the number of fields contained in the hash stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @return Command Response - The number of fields in the hash, or 0 when the key @@ -848,8 +842,8 @@ public T hlen(@NonNull ArgType key) { /** * Returns all values in the hash stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @return Command Response - An array of values in the hash, or an empty array @@ -864,16 +858,16 @@ public T hvals(@NonNull ArgType key) { /** * Returns the values associated with the specified fields in the hash stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param fields The fields in the hash stored at key to retrieve from the database. * @return Command Response - An array of values associated with the given fields, in the same * order as they are requested.
- * For every field that does not exist in the hash, a null value is returned.
+ * For every field that does not exist in the hash, a null value is returned.
* If key does not exist, it is treated as an empty hash, and it returns an array - * of null values.
+ * of null values.
*/ public T hmget(@NonNull ArgType key, @NonNull ArgType[] fields) { checkTypeOrThrow(key); @@ -884,13 +878,13 @@ public T hmget(@NonNull ArgType key, @NonNull ArgType[] fields) { /** * Returns if field is an existing field in the hash stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param field The field to check in the hash stored at key. - * @return Command Response - True if the hash contains the specified field. If the - * hash does not contain the field, or if the key does not exist, it returns False + * @return Command Response - true if the hash contains the specified field. If the + * hash does not contain the field, or if the key does not exist, it returns false * . */ public T hexists(@NonNull ArgType key, @NonNull ArgType field) { @@ -902,8 +896,8 @@ public T hexists(@NonNull ArgType key, @NonNull ArgType field) { /** * Returns all fields and values of the hash stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @return Command Response - A Map of fields and their values stored in the hash. @@ -922,8 +916,8 @@ public T hgetall(@NonNull ArgType key) { * hash stored at key is decremented. If field or key does * not exist, it is set to 0 before performing the operation. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param field The field in the hash stored at key to increment or decrement its @@ -947,8 +941,8 @@ public T hincrBy(@NonNull ArgType key, @NonNull ArgType field, long am * field or key does not exist, it is set to 0 before performing the * operation. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param field The field in the hash stored at key to increment or decrement its @@ -968,8 +962,8 @@ public T hincrByFloat(@NonNull ArgType key, @NonNull ArgType field, do /** * Returns all field names in the hash stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details * @param key The key of the hash. * @return Command Response - An array of field names in the hash, or an @@ -985,8 +979,8 @@ public T hkeys(@NonNull ArgType key) { * Returns the string length of the value associated with field in the hash stored at * key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param field The field in the hash. @@ -1002,9 +996,9 @@ public T hstrlen(@NonNull ArgType key, @NonNull ArgType field) { /** * Returns a random field name from the hash value stored at key. * - * @since Redis 6.2 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @return Command Response - A random field name from the hash stored at key, or @@ -1020,9 +1014,9 @@ public T hrandfield(@NonNull ArgType key) { * Retrieves up to count random field names from the hash value stored at key * . * - * @since Redis 6.2 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param count The number of field names to return.
@@ -1041,9 +1035,9 @@ public T hrandfieldWithCount(@NonNull ArgType key, long count) { * Retrieves up to count random field names along with their values from the hash * value stored at key. * - * @since Redis 6.2 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param count The number of field names to return.
@@ -1067,8 +1061,8 @@ public T hrandfieldWithCountWithValues(@NonNull ArgType key, long coun * element to the rightmost element. If key does not exist, it is created as an empty * list before performing the push operations. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @param elements The elements to insert at the head of the list stored at key. @@ -1084,12 +1078,12 @@ public T lpush(@NonNull ArgType key, @NonNull ArgType[] elements) { * Removes and returns the first elements of the list stored at key. The command pops * a single element from the beginning of the list. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @return Command Response - The value of the first element.
- * If key does not exist, null will be returned. + * If key does not exist, null will be returned. */ public T lpop(@NonNull ArgType key) { checkTypeOrThrow(key); @@ -1101,9 +1095,9 @@ public T lpop(@NonNull ArgType key) { * Returns the index of the first occurrence of element inside the list specified by * key. If no match is found, null is returned. * - * @since Redis 6.0.6. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.0.6. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The name of the list. * @param element The value to search for within the list. @@ -1120,9 +1114,9 @@ public T lpos(@NonNull ArgType key, @NonNull ArgType element) { * Returns the index of an occurrence of element within a list based on the given * options. If no match is found, null is returned. * - * @since Redis 6.0.6. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.0.6. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The name of the list. * @param element The value to search for within the list. @@ -1141,9 +1135,9 @@ public T lpos( /** * Returns an array of indices of matching elements within a list. * - * @since Redis 6.0.6. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.0.6. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The name of the list. * @param element The value to search for within the list. @@ -1162,9 +1156,9 @@ public T lposCount(@NonNull ArgType key, @NonNull ArgType element, lon * Returns an array of indices of matching elements within a list based on the given * options. If no match is found, an empty arrayis returned. * - * @since Redis 6.0.6. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.0.6. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The name of the list. * @param element The value to search for within the list. @@ -1192,14 +1186,14 @@ public T lposCount( * Removes and returns up to count elements of the list stored at key, * depending on the list's length. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @param count The count of the elements to pop from the list. * @return Command Response - An array of the popped elements will be returned depending on the * list's length.
- * If key does not exist, null will be returned. + * If key does not exist, null will be returned. */ public T lpopCount(@NonNull ArgType key, long count) { checkTypeOrThrow(key); @@ -1215,8 +1209,8 @@ public T lpopCount(@NonNull ArgType key, long count) { * -1 being the last element of the list, -2 being the penultimate, and * so on. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @param start The starting point of the range. @@ -1242,8 +1236,8 @@ public T lrange(@NonNull ArgType key, long start, long end) { * the list. Here, -1 means the last element, -2 means the penultimate * and so forth. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @param index The index of the element in the list to retrieve. @@ -1267,8 +1261,8 @@ public T lindex(@NonNull ArgType key, long index) { * with -1 being the last element of the list, -2 being the penultimate, * and so on. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @param start The starting point of the range. @@ -1290,8 +1284,8 @@ public T ltrim(@NonNull ArgType key, long start, long end) { /** * Returns the length of the list stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @return Command Response - The length of the list at key.
@@ -1314,8 +1308,8 @@ public T llen(@NonNull ArgType key) { * If count is 0 or count is greater than the occurrences of elements * equal to element, it removes all elements equal to element. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @param count The count of the occurrences of elements equal to element to remove. @@ -1336,8 +1330,8 @@ public T lrem(@NonNull ArgType key, long count, @NonNull ArgType eleme * leftmost element to the rightmost element. If key does not exist, it is created as * an empty list before performing the push operations. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @param elements The elements to insert at the tail of the list stored at key. @@ -1353,8 +1347,8 @@ public T rpush(@NonNull ArgType key, @NonNull ArgType[] elements) { * Removes and returns the last elements of the list stored at key.
* The command pops a single element from the end of the list. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @return Command Response - The value of the last element.
@@ -1370,8 +1364,8 @@ public T rpop(@NonNull ArgType key) { * Removes and returns up to count elements from the list stored at key, * depending on the list's length. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param count The count of the elements to pop from the list. * @return Command Response - An array of popped elements will be returned depending on the list's @@ -1388,8 +1382,8 @@ public T rpopCount(@NonNull ArgType key, long count) { * Adds specified members to the set stored at key. Specified members that are * already a member of this set are ignored. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key where members will be added to its set. * @param members A list of members to add to the set stored at key. @@ -1407,8 +1401,8 @@ public T sadd(@NonNull ArgType key, @NonNull ArgType[] members) { /** * Returns if member is a member of the set stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the set. * @param member The member to check for existence in the set. @@ -1426,8 +1420,8 @@ public T sismember(@NonNull ArgType key, @NonNull ArgType member) { * Removes specified members from the set stored at key. Specified members that are * not a member of this set are ignored. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key from which members will be removed. * @param members A list of members to remove from the set stored at key. @@ -1445,8 +1439,8 @@ public T srem(@NonNull ArgType key, @NonNull ArgType[] members) { /** * Retrieves all the members of the set value stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key from which to retrieve the set members. * @return Command Response - A Set of all members of the set. @@ -1461,8 +1455,8 @@ public T smembers(@NonNull ArgType key) { /** * Retrieves the set cardinality (number of elements) of the set stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key from which to retrieve the number of set members. * @return Command Response - The cardinality (number of elements) of the set, or 0 if the key @@ -1477,8 +1471,8 @@ public T scard(@NonNull ArgType key) { /** * Computes the difference between the first set and all the successive sets in keys. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param keys The keys of the sets to diff. * @return Command Response - A Set of elements representing the difference between @@ -1494,8 +1488,8 @@ public T sdiff(@NonNull ArgType[] keys) { /** * Checks whether each member is contained in the members of the set stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the set to check. * @param members A list of members to check for existence in the set. @@ -1513,8 +1507,8 @@ public T smismember(@NonNull ArgType key, @NonNull ArgType[] members) * Stores the difference between the first set and all the successive sets in keys * into a new set at destination. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param destination The key of the destination set. * @param keys The keys of the sets to diff. @@ -1532,8 +1526,8 @@ public T sdiffstore(@NonNull ArgType destination, @NonNull ArgType[] k *
, removing it from the source set. Creates a new destination set if needed. The * operation is atomic. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param source The key of the set to remove the element from. * @param destination The key of the set to add the element to. @@ -1552,8 +1546,8 @@ public T smove( /** * Gets the intersection of all the given sets. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param keys The keys of the sets. * @return Command Response - A Set of members which are present in all given sets. @@ -1570,8 +1564,8 @@ public T sinter(@NonNull ArgType[] keys) { * Stores the members of the intersection of all given sets specified by keys into a * new set at destination. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param destination The key of the destination set. * @param keys The keys from which to retrieve the set members. @@ -1587,9 +1581,9 @@ public T sinterstore(@NonNull ArgType destination, @NonNull ArgType[] /** * Gets the cardinality of the intersection of all the given sets. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param keys The keys of the sets. * @return Command Response - The cardinality of the intersection result. If one or more sets do @@ -1605,9 +1599,9 @@ public T sintercard(@NonNull ArgType[] keys) { /** * Gets the cardinality of the intersection of all the given sets. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param keys The keys of the sets. * @param limit The limit for the intersection cardinality value. @@ -1628,8 +1622,8 @@ public T sintercard(@NonNull ArgType[] keys, long limit) { * Stores the members of the union of all given sets specified by keys into a new set * at destination. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param destination The key of the destination set. * @param keys The keys from which to retrieve the set members. @@ -1643,10 +1637,10 @@ public T sunionstore(@NonNull ArgType destination, @NonNull ArgType[] } /** - * Reads the configuration parameters of a running Redis server. + * Reads the configuration parameters of the running server. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param parameters An array of configuration parameter names to retrieve values * for. @@ -1662,15 +1656,15 @@ public T configGet(@NonNull ArgType[] parameters) { /** * Sets configuration parameters to the specified values. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param parameters A map consisting of configuration parameters and their * respective values to set. * @return Command response - OK if all configurations have been successfully set. * Otherwise, the transaction fails with an error. */ - public T configSet(@NonNull Map parameters) { + public T configSet(@NonNull Map parameters) { protobufTransaction.addCommands( buildCommand(ConfigSet, newArgsBuilder().add(flattenMapToGlideStringArray(parameters)))); return getThis(); @@ -1679,8 +1673,8 @@ public T configSet(@NonNull Map parameters) { /** * Returns the number of keys in keys that exist in the database. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param keys The keys list to check. * @return Command Response - The number of keys that exist. If the same existing key is mentioned @@ -1698,8 +1692,8 @@ public T exists(@NonNull ArgType[] keys) { * However, this command does not block the server, while DEL does. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param keys The list of keys to unlink. * @return Command Response - The number of keys that were unlinked. @@ -1720,8 +1714,8 @@ public T unlink(@NonNull ArgType[] keys) { * The timeout will only be cleared by commands that delete or overwrite the contents of key * . * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to set timeout on it. * @param seconds The timeout in seconds. @@ -1744,8 +1738,8 @@ public T expire(@NonNull ArgType key, long seconds) { * The timeout will only be cleared by commands that delete or overwrite the contents of key * . * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to set timeout on it. * @param seconds The timeout in seconds. @@ -1772,8 +1766,8 @@ public T expire( * The timeout will only be cleared by commands that delete or overwrite the contents of key * . * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to set timeout on it. * @param unixSeconds The timeout in an absolute Unix timestamp. @@ -1797,8 +1791,8 @@ public T expireAt(@NonNull ArgType key, long unixSeconds) { * The timeout will only be cleared by commands that delete or overwrite the contents of key * . * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to set timeout on it. * @param unixSeconds The timeout in an absolute Unix timestamp. @@ -1826,8 +1820,8 @@ public T expireAt( * The timeout will only be cleared by commands that delete or overwrite the contents of key * . * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to set timeout on it. * @param milliseconds The timeout in milliseconds. @@ -1851,8 +1845,8 @@ public T pexpire(@NonNull ArgType key, long milliseconds) { * The timeout will only be cleared by commands that delete or overwrite the contents of key * . * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to set timeout on it. * @param milliseconds The timeout in milliseconds. @@ -1880,8 +1874,8 @@ public T pexpire( * The timeout will only be cleared by commands that delete or overwrite the contents of key * . * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to set timeout on it. * @param unixMilliseconds The timeout in an absolute Unix timestamp. @@ -1905,8 +1899,8 @@ public T pexpireAt(@NonNull ArgType key, long unixMilliseconds) { * The timeout will only be cleared by commands that delete or overwrite the contents of key * . * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to set timeout on it. * @param unixMilliseconds The timeout in an absolute Unix timestamp. @@ -1928,8 +1922,8 @@ public T pexpireAt( /** * Returns the remaining time to live of key that has a timeout. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to return its timeout. * @return Command response - TTL in seconds, -2 if key does not exist, @@ -1944,11 +1938,11 @@ public T ttl(@NonNull ArgType key) { /** * Returns the absolute Unix timestamp (since January 1, 1970) at which the given key * will expire, in seconds.
- * To get the expiration with millisecond precision, use {@link #pexpiretime(String)}. + * To get the expiration with millisecond precision, use {@link #pexpiretime(ArgType)}. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to determine the expiration value of. * @return Command response - The expiration Unix timestamp in seconds, -2 if @@ -1965,9 +1959,9 @@ public T expiretime(@NonNull ArgType key) { * Returns the absolute Unix timestamp (since January 1, 1970) at which the given key * will expire, in milliseconds. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to determine the expiration value of. * @return Command response - The expiration Unix timestamp in milliseconds, -2 if @@ -2008,8 +2002,8 @@ public T clientGetName() { * Rewrites the configuration file with the current configuration. * * @see valkey.io for details. - * @return OK is returned when the configuration was rewritten properly. Otherwise, - * the transaction fails with an error. + * @return Command Response - OK is returned when the configuration was rewritten + * properly. Otherwise, the transaction fails with an error. */ public T configRewrite() { protobufTransaction.addCommands(buildCommand(ConfigRewrite)); @@ -2017,12 +2011,13 @@ public T configRewrite() { } /** - * Resets the statistics reported by Redis using the INFO and LATENCY HISTOGRAM commands. * * @see valkey.io for details. - * @return OK to confirm that the statistics were successfully reset. + * @return Command Response - OK to confirm that the statistics were successfully + * reset. */ public T configResetStat() { protobufTransaction.addCommands(buildCommand(ConfigResetStat)); @@ -2033,8 +2028,8 @@ public T configResetStat() { * Adds members with their scores to the sorted set stored at key.
* If a member is already a part of the sorted set, its score is updated. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param membersScoresMap A Map of members to their corresponding scores. @@ -2064,8 +2059,8 @@ public T zadd( * Adds members with their scores to the sorted set stored at key.
* If a member is already a part of the sorted set, its score is updated. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param membersScoresMap A Map of members to their corresponding scores. @@ -2083,8 +2078,8 @@ public T zadd( * Adds members with their scores to the sorted set stored at key.
* If a member is already a part of the sorted set, its score is updated. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param membersScoresMap A Map of members to their corresponding scores. @@ -2102,8 +2097,8 @@ public T zadd( * Adds members with their scores to the sorted set stored at key.
* If a member is already a part of the sorted set, its score is updated. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param membersScoresMap A Map of members to their corresponding scores. @@ -2120,10 +2115,10 @@ public T zadd(@NonNull ArgType key, @NonNull Map memb *
as its score (as if its previous score was 0.0).
* If key does not exist, a new sorted set with the specified member as its sole * member is created.
- * zaddIncr with empty option acts as {@link #zincrby(String, double, String)}. + * zaddIncr with empty option acts as {@link #zincrby(ArgType, double, ArgType)}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param member A member in the sorted set to increment. @@ -2159,8 +2154,8 @@ public T zaddIncr( * If key does not exist, a new sorted set with the specified member as its sole * member is created. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param member A member in the sorted set to increment. @@ -2175,8 +2170,8 @@ public T zaddIncr(@NonNull ArgType key, @NonNull ArgType member, doubl * Removes the specified members from the sorted set stored at key.
* Specified members that are not a member of this set are ignored. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param members An array of members to remove from the sorted set. @@ -2194,8 +2189,8 @@ public T zrem(@NonNull ArgType key, @NonNull ArgType[] members) { /** * Returns the cardinality (number of elements) of the sorted set stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @return Command Response - The number of elements in the sorted set.
@@ -2212,8 +2207,8 @@ public T zcard(@NonNull ArgType key) { * Removes and returns up to count members with the lowest scores from the sorted set * stored at the specified key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param count Specifies the quantity of members to pop.
@@ -2234,8 +2229,8 @@ public T zpopmin(@NonNull ArgType key, long count) { * Removes and returns the member with the lowest score from the sorted set stored at the * specified key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @return Command Response - A map containing the removed member and its corresponding score.
@@ -2251,8 +2246,8 @@ public T zpopmin(@NonNull ArgType key) { /** * Returns a random element from the sorted set stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @return Command Response - A String representing a random element from the sorted @@ -2268,8 +2263,8 @@ public T zrandmember(@NonNull ArgType key) { /** * Retrieves random elements from the sorted set stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param count The number of elements to return.
@@ -2290,8 +2285,8 @@ public T zrandmemberWithCount(@NonNull ArgType key, long count) { * Retrieves random elements along with their scores from the sorted set stored at key * . * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param count The number of elements to return.
@@ -2317,8 +2312,8 @@ public T zrandmemberWithCountWithScores(ArgType key, long count) { *
as its score. If key does not exist, a new sorted set with the specified * member as its sole member is created. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param increment The score increment. @@ -2336,10 +2331,10 @@ public T zincrby(@NonNull ArgType key, double increment, @NonNull ArgT * Blocks the connection until it removes and returns a member with the lowest score from the * sorted sets stored at the specified keys. The sorted sets are checked in the order * they are provided.
- * BZPOPMIN is the blocking variant of {@link #zpopmin(String)}.
+ * BZPOPMIN is the blocking variant of {@link #zpopmin(ArgType)}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @apiNote BZPOPMIN is a client blocking command, see Blocking @@ -2363,8 +2358,8 @@ public T bzpopmin(@NonNull ArgType[] keys, double timeout) { * Removes and returns up to count members with the highest scores from the sorted * set stored at the specified key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param count Specifies the quantity of members to pop.
@@ -2385,8 +2380,8 @@ public T zpopmax(@NonNull ArgType key, long count) { * Removes and returns the member with the highest score from the sorted set stored at the * specified key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @return Command Response - A map containing the removed member and its corresponding score.
@@ -2403,10 +2398,10 @@ public T zpopmax(@NonNull ArgType key) { * Blocks the connection until it removes and returns a member with the highest score from the * sorted sets stored at the specified keys. The sorted sets are checked in the order * they are provided.
- * BZPOPMAX is the blocking variant of {@link #zpopmax(String)}.
+ * BZPOPMAX is the blocking variant of {@link #zpopmax(ArgType)}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @apiNote BZPOPMAX is a client blocking command, see Blocking @@ -2429,8 +2424,8 @@ public T bzpopmax(@NonNull ArgType[] keys, double timeout) { /** * Returns the score of member in the sorted set stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param member The member whose score is to be retrieved. @@ -2449,12 +2444,12 @@ public T zscore(@NonNull ArgType key, @NonNull ArgType member) { * scores ordered from low to high, starting from 0.
* To get the rank of member with its score, see {@link #zrankWithScore}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param member The member whose rank is to be retrieved. - * @return The rank of member in the sorted set.
+ * @return Command Response - The rank of member in the sorted set.
* If key doesn't exist, or if member is not present in the set, * null will be returned. */ @@ -2466,15 +2461,15 @@ public T zrank(@NonNull ArgType key, @NonNull ArgType member) { /** * Returns the rank of member in the sorted set stored at key with its - * score, where scores are ordered from the lowest to highest, starting from 0.
+ * score, where scores are ordered from the lowest to highest, starting from 0. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param member The member whose rank is to be retrieved. - * @return An array containing the rank (as Long) and score (as - * Double) of member in the sorted set.
+ * @return Command Response - An array containing the rank (as Long) and + * score (as Double) of member in the sorted set.
* If key doesn't exist, or if member is not present in the set, * null will be returned. */ @@ -2490,8 +2485,8 @@ public T zrankWithScore(@NonNull ArgType key, @NonNull ArgType member) * scores are ordered from the highest to lowest, starting from 0.
* To get the rank of member with its score, see {@link #zrevrankWithScore}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param member The member whose rank is to be retrieved. @@ -2510,8 +2505,8 @@ public T zrevrank(@NonNull ArgType key, @NonNull ArgType member) { * Returns the rank of member in the sorted set stored at key with its * score, where scores are ordered from the highest to lowest, starting from 0. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param member The member whose rank is to be retrieved. @@ -2532,8 +2527,8 @@ public T zrevrankWithScore(@NonNull ArgType key, @NonNull ArgType memb * Returns the scores associated with the specified members in the sorted set stored * at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param members An array of members in the sorted set. @@ -2551,9 +2546,9 @@ public T zmscore(@NonNull ArgType key, @NonNull ArgType[] members) { * Returns the difference between the first sorted set and all the successive sorted sets.
* To get the elements with their scores, see {@link #zdiffWithScores}. * - * @since Redis 6.2 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param keys The keys of the sorted sets. * @return Command Response - An array of elements representing the difference @@ -2571,9 +2566,9 @@ public T zdiff(@NonNull ArgType[] keys) { /** * Returns the difference between the first sorted set and all the successive sorted sets. * - * @since Redis 6.2 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param keys The keys of the sorted sets. * @return Command Response - A Map of elements and their scores representing the @@ -2594,9 +2589,9 @@ public T zdiffWithScores(@NonNull ArgType[] keys) { * keys and stores the difference as a sorted set to destination, * overwriting it if it already exists. Non-existent keys are treated as empty sets. * - * @since Redis 6.2 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param destination The key for the resulting sorted set. * @param keys The keys of the sorted sets to compare. @@ -2614,8 +2609,8 @@ public T zdiffstore(@NonNull ArgType destination, @NonNull ArgType[] k * Returns the number of members in the sorted set stored at key with scores between * minScore and maxScore. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param minScore The minimum score to count from. Can be an implementation of {@link @@ -2644,8 +2639,8 @@ public T zcount( * indexes with 0 being the element with the lowest score. These indexes can be * negative numbers, where they indicate offsets starting at the element with the highest score. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param start The starting point of the range. @@ -2667,10 +2662,10 @@ public T zremrangebyrank(@NonNull ArgType key, long start, long end) { /** * Stores a specified range of elements from the sorted set at source, into a new * sorted set at destination. If destination doesn't exist, a new sorted - * set is created; if it exists, it's overwritten.
+ * set is created; if it exists, it's overwritten. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param destination The key for the destination sorted set. * @param source The key of the source sorted set. @@ -2704,10 +2699,10 @@ public T zrangestore( /** * Stores a specified range of elements from the sorted set at source, into a new * sorted set at destination. If destination doesn't exist, a new sorted - * set is created; if it exists, it's overwritten.
+ * set is created; if it exists, it's overwritten. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param destination The key for the destination sorted set. * @param source The key of the source sorted set. @@ -2730,8 +2725,8 @@ public T zrangestore( * Removes all elements in the sorted set stored at key with a lexicographical order * between minLex and maxLex. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param minLex The minimum bound of the lexicographical range. Can be an implementation of @@ -2758,8 +2753,8 @@ public T zremrangebylex( * Removes all elements in the sorted set stored at key with a score between * minScore and maxScore. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param minScore The minimum score to remove from. Can be an implementation of {@link @@ -2787,8 +2782,8 @@ public T zremrangebyscore( * Returns the number of members in the sorted set stored at key with scores between * minLex and maxLex. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param minLex The minimum lex to count from. Can be an implementation of {@link InfLexBound} @@ -2816,8 +2811,8 @@ public T zlexcount( * stores the result in destination. If destination already exists, it * is overwritten. Otherwise, a new sorted set will be created. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param destination The key of the destination sorted set. * @param keysOrWeightedKeys The keys of the sorted sets with possible formats: @@ -2852,8 +2847,8 @@ public T zunionstore( * stores the result in destination. If destination already exists, it * is overwritten. Otherwise, a new sorted set will be created. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param destination The key of the destination sorted set. * @param keysOrWeightedKeys The keys of the sorted sets with possible formats: @@ -2879,8 +2874,8 @@ public T zunionstore( * , and stores the result in destination. If destination already * exists, it is overwritten. Otherwise, a new sorted set will be created. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param destination The key of the destination sorted set. * @param keysOrWeightedKeys The keys of the sorted sets with possible formats: @@ -2913,9 +2908,9 @@ public T zinterstore( /** * Returns the cardinality of the intersection of the sorted sets specified by keys. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param keys The keys of the sorted sets to intersect. * @return Command Response - The cardinality of the intersection of the given sorted sets. @@ -2932,9 +2927,9 @@ public T zintercard(@NonNull ArgType[] keys) { * If the intersection cardinality reaches limit partway through the computation, the * algorithm will exit early and yield limit as the cardinality. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param keys The keys of the sorted sets to intersect. * @param limit Specifies a maximum number for the intersection cardinality. If limit is set to @@ -2956,7 +2951,7 @@ public T zintercard(@NonNull ArgType[] keys, long limit) { * , and stores the result in destination. If destination already * exists, it is overwritten. Otherwise, a new sorted set will be created.
* To perform a zinterstore operation while specifying aggregation settings, use - * {@link #zinterstore(String, KeysOrWeightedKeys, Aggregate)} + * {@link #zinterstore(Object, KeysOrWeightedKeys, Aggregate)}. * * @see valkey.io for more details. * @param destination The key of the destination sorted set. @@ -2982,7 +2977,7 @@ public T zinterstore( * , and stores the result in destination. If destination already * exists, it is overwritten. Otherwise, a new sorted set will be created.
* To perform a zinterstore operation while specifying aggregation settings, use - * {@link #zinterstore(String, KeysOrWeightedKeys, Aggregate)} + * {@link #zinterstore(Object, KeysOrWeightedKeys, Aggregate)}. * * @see valkey.io for more details. * @param destination The key of the destination sorted set. @@ -3007,7 +3002,7 @@ public T zinterstore( * Returns the union of members from sorted sets specified by the given keys.
* To get the elements with their scores, see {@link #zunionWithScores}. * - * @since Redis 6.2 and above. + * @since Valkey 6.2 and above. * @see valkey.io for more details. * @param keys The keys of the sorted sets. * @return Command Response - The resulting sorted set from the union. @@ -3021,7 +3016,7 @@ public T zunion(@NonNull KeyArray keys) { * Returns the union of members from sorted sets specified by the given keys.
* To get the elements with their scores, see {@link #zunionWithScores}. * - * @since Redis 6.2 and above. + * @since Valkey 6.2 and above. * @see valkey.io for more details. * @param keys The keys of the sorted sets. * @return Command Response - The resulting sorted set from the union. @@ -3035,7 +3030,7 @@ public T zunion(@NonNull KeyArrayBinary keys) { * Returns the union of members and their scores from sorted sets specified by the given * keysOrWeightedKeys. * - * @since Redis 6.2 and above. + * @since Valkey 6.2 and above. * @see valkey.io for more details. * @param keysOrWeightedKeys The keys of the sorted sets with possible formats: *
    @@ -3063,7 +3058,7 @@ public T zunionWithScores( * Returns the union of members and their scores from sorted sets specified by the given * keysOrWeightedKeys. * - * @since Redis 6.2 and above. + * @since Valkey 6.2 and above. * @see valkey.io for more details. * @param keysOrWeightedKeys The keys of the sorted sets with possible formats: *
      @@ -3093,7 +3088,7 @@ public T zunionWithScores( * To perform a zunion operation while specifying aggregation settings, use {@link * #zunionWithScores(KeysOrWeightedKeys, Aggregate)}. * - * @since Redis 6.2 and above. + * @since Valkey 6.2 and above. * @see valkey.io for more details. * @param keysOrWeightedKeys The keys of the sorted sets with possible formats: *
        @@ -3116,7 +3111,7 @@ public T zunionWithScores(@NonNull KeysOrWeightedKeys keysOrWeightedKeys) { * To perform a zunion operation while specifying aggregation settings, use {@link * #zunionWithScores(KeysOrWeightedKeys, Aggregate)}. * - * @since Redis 6.2 and above. + * @since Valkey 6.2 and above. * @see valkey.io for more details. * @param keysOrWeightedKeys The keys of the sorted sets with possible formats: *
          @@ -3138,7 +3133,7 @@ public T zunionWithScores(@NonNull KeysOrWeightedKeysBinary keysOrWeightedKeys) *
          * To get the elements with their scores, see {@link #zinterWithScores}. * - * @since Redis 6.2 and above. + * @since Valkey 6.2 and above. * @see valkey.io for more details. * @param keys The keys of the sorted sets. * @return Command Response - The resulting sorted set from the intersection. @@ -3153,7 +3148,7 @@ public T zinter(@NonNull KeyArray keys) { *
          * To get the elements with their scores, see {@link #zinterWithScores}. * - * @since Redis 6.2 and above. + * @since Valkey 6.2 and above. * @see valkey.io for more details. * @param keys The keys of the sorted sets. * @return Command Response - The resulting sorted set from the intersection. @@ -3168,7 +3163,7 @@ public T zinter(@NonNull KeyArrayBinary keys) { * keysOrWeightedKeys. To perform a zinter operation while specifying * aggregation settings, use {@link #zinterWithScores(KeysOrWeightedKeys, Aggregate)}. * - * @since Redis 6.2 and above. + * @since Valkey 6.2 and above. * @see valkey.io for more details. * @param keysOrWeightedKeys The keys of the sorted sets with possible formats: *
            @@ -3190,7 +3185,7 @@ public T zinterWithScores(@NonNull KeysOrWeightedKeys keysOrWeightedKeys) { * keysOrWeightedKeys. To perform a zinter operation while specifying * aggregation settings, use {@link #zinterWithScores(KeysOrWeightedKeys, Aggregate)}. * - * @since Redis 6.2 and above. + * @since Valkey 6.2 and above. * @see valkey.io for more details. * @param keysOrWeightedKeys The keys of the sorted sets with possible formats: *
              @@ -3211,7 +3206,7 @@ public T zinterWithScores(@NonNull KeysOrWeightedKeysBinary keysOrWeightedKeys) * Returns the intersection of members and their scores from sorted sets specified by the given * keysOrWeightedKeys. * - * @since Redis 6.2 and above. + * @since Valkey 6.2 and above. * @see valkey.io for more details. * @param keysOrWeightedKeys The keys of the sorted sets with possible formats: *
                @@ -3239,7 +3234,7 @@ public T zinterWithScores( * Returns the intersection of members and their scores from sorted sets specified by the given * keysOrWeightedKeys. * - * @since Redis 6.2 and above. + * @since Valkey 6.2 and above. * @see valkey.io for more details. * @param keysOrWeightedKeys The keys of the sorted sets with possible formats: *
                  @@ -3267,8 +3262,8 @@ public T zinterWithScores( * Adds an entry to the specified stream stored at key.
                  * If the key doesn't exist, the stream is created. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param values Field-value pairs to be added to the entry. @@ -3282,8 +3277,8 @@ public T xadd(@NonNull ArgType key, @NonNull Map val * Adds an entry to the specified stream stored at key.
                  * If the key doesn't exist, the stream is created. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param values Field-value pairs to be added to the entry. @@ -3310,16 +3305,16 @@ public T xadd( /** * Reads entries from the given streams. * - * @implNote ArgType is limited to String or GlideString, any other type will - * throw IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. - * @param keysAndIds An array of Pairs of keys and entry ids to - * read from. A pair is composed of a stream's key and the - * id of the entry after which the stream will be read. + * @param keysAndIds An array of Pairs of keys and entry ids to read from. A + * pair is composed of a stream's key and the id of the entry after which the stream + * will be read. * @return Command Response - A {@literal Map>} with stream keys, to Map of - * stream-ids, to an array of pairings with format [[field, entry], - * [field, entry], ...]. + * String[][]>>} with stream keys, to Map of stream-ids, to an array of + * pairings with format [[field, entry], + * [field, entry], ...]. */ public T xread(@NonNull Map keysAndIds) { return xread(keysAndIds, StreamReadOptions.builder().build()); @@ -3328,18 +3323,17 @@ public T xread(@NonNull Map keysAndIds) { /** * Reads entries from the given streams. * - * @implNote ArgType is limited to String or GlideString, any other type will - * throw IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. - * @param keysAndIds An array of Pairs of keys and entry ids to - * read from. A pair is composed of a stream's key and the - * id of the entry after which the stream will be read. - * @param options options detailing how to read the stream {@link - * StreamReadOptions}. + * @param keysAndIds An array of Pairs of keys and entry ids to read from. A + * pair is composed of a stream's key and the id of the entry after which the stream + * will be read. + * @param options options detailing how to read the stream {@link StreamReadOptions}. * @return Command Response - A {@literal Map>} with stream keys, to Map of - * stream-ids, to an array of pairings with format [[field, entry], - * [field, entry], ...]. + * String[][]>>} with stream keys, to Map of stream-ids, to an array of + * pairings with format [[field, entry], + * [field, entry], ...]. */ public T xread( @NonNull Map keysAndIds, @NonNull StreamReadOptions options) { @@ -3356,8 +3350,8 @@ public T xread( /** * Trims the stream by evicting older entries. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param options Stream trim options {@link StreamTrimOptions}. @@ -3373,8 +3367,8 @@ public T xtrim(@NonNull ArgType key, @NonNull StreamTrimOptions option /** * Returns the number of entries in the stream stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @return Command Response - The number of entries in the stream. If key does not @@ -3389,8 +3383,8 @@ public T xlen(@NonNull ArgType key) { /** * Removes the specified entries by id from a stream, and returns the number of entries deleted. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param ids An array of entry ids. @@ -3407,30 +3401,29 @@ public T xdel(@NonNull ArgType key, @NonNull ArgType[] ids) { /** * Returns stream entries matching a given range of IDs. * - * @implNote ArgType is limited to String or GlideString, any other type will - * throw IllegalArgumentException - * @see valkey.io for - * details. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. * @param key The key of the stream. * @param start Starting stream ID bound for range. *
                    *
                  • Use {@link StreamRange.IdBound#of} to specify a stream ID. - *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an - * exclusive bounded stream ID.
                  • Use {@link StreamRange.InfRangeBound#MIN} - * to start with the minimum available ID. + *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an exclusive bounded stream + * ID. + *
                  • Use {@link StreamRange.InfRangeBound#MIN} to start with the minimum available ID. *
                  * * @param end Ending stream ID bound for range. *
                    *
                  • Use {@link StreamRange.IdBound#of} to specify a stream ID. - *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an - * exclusive bounded stream ID.
                  • Use {@link StreamRange.InfRangeBound#MAX} - * to end with the maximum available ID. + *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an exclusive bounded stream + * ID. + *
                  • Use {@link StreamRange.InfRangeBound#MAX} to end with the maximum available ID. *
                  * - * @return Command Response - A Map of key to stream entry data, - * where entry data is an array of pairings with format [[field, - * entry], [field, entry], ...]. + * @return Command Response - A Map of key to stream entry data, where entry data is + * an array of pairings with format [[field, + * entry], [field, entry], ...]. */ public T xrange( @NonNull ArgType key, @NonNull StreamRange start, @NonNull StreamRange end) { @@ -3443,31 +3436,30 @@ public T xrange( /** * Returns stream entries matching a given range of IDs. * - * @implNote ArgType is limited to String or GlideString, any other type will - * throw IllegalArgumentException - * @see valkey.io for - * details. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. * @param key The key of the stream. * @param start Starting stream ID bound for range. *
                    *
                  • Use {@link StreamRange.IdBound#of} to specify a stream ID. - *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an - * exclusive bounded stream ID.
                  • Use {@link StreamRange.InfRangeBound#MIN} - * to start with the minimum available ID. + *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an exclusive bounded stream + * ID. + *
                  • Use {@link StreamRange.InfRangeBound#MIN} to start with the minimum available ID. *
                  * * @param end Ending stream ID bound for range. *
                    *
                  • Use {@link StreamRange.IdBound#of} to specify a stream ID. - *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an - * exclusive bounded stream ID.
                  • Use {@link StreamRange.InfRangeBound#MAX} - * to end with the maximum available ID. + *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an exclusive bounded stream + * ID. + *
                  • Use {@link StreamRange.InfRangeBound#MAX} to end with the maximum available ID. *
                  * * @param count Maximum count of stream entries to return. - * @return Command Response - A Map of key to stream entry data, - * where entry data is an array of pairings with format [[field, - * entry], [field, entry], ...]. + * @return Command Response - A Map of key to stream entry data, where entry data is + * an array of pairings with format [[field, + * entry], [field, entry], ...]. */ public T xrange( @NonNull ArgType key, @NonNull StreamRange start, @NonNull StreamRange end, long count) { @@ -3479,33 +3471,32 @@ public T xrange( /** * Returns stream entries matching a given range of IDs in reverse order.
                  - * Equivalent to {@link #xrange(String, StreamRange, StreamRange)} but returns - * the entries in reverse order. + * Equivalent to {@link #xrange(ArgType, StreamRange, StreamRange)} but returns the entries in + * reverse order. * - * @implNote ArgType is limited to String or GlideString, any other type will - * throw IllegalArgumentException - * @see valkey.io for - * details. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. * @param key The key of the stream. * @param end Ending stream ID bound for range. *
                    *
                  • Use {@link StreamRange.IdBound#of} to specify a stream ID. - *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an - * exclusive bounded stream ID.
                  • Use {@link StreamRange.InfRangeBound#MAX} - * to end with the maximum available ID. + *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an exclusive bounded stream + * ID. + *
                  • Use {@link StreamRange.InfRangeBound#MAX} to end with the maximum available ID. *
                  * * @param start Starting stream ID bound for range. *
                    *
                  • Use {@link StreamRange.IdBound#of} to specify a stream ID. - *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an - * exclusive bounded stream ID.
                  • Use {@link StreamRange.InfRangeBound#MIN} - * to start with the minimum available ID. + *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an exclusive bounded stream + * ID. + *
                  • Use {@link StreamRange.InfRangeBound#MIN} to start with the minimum available ID. *
                  * - * @return Command Response - A Map of key to stream entry data, - * where entry data is an array of pairings with format [[field, - * entry], [field, entry], ...]. + * @return Command Response - A Map of key to stream entry data, where entry data is + * an array of pairings with format [[field, + * entry], [field, entry], ...]. */ public T xrevrange( @NonNull ArgType key, @NonNull StreamRange end, @NonNull StreamRange start) { @@ -3517,34 +3508,32 @@ public T xrevrange( /** * Returns stream entries matching a given range of IDs in reverse order.
                  - * Equivalent to {@link #xrange(String, StreamRange, StreamRange, long)} but - * returns the entries in reverse order. + * Equivalent to {@link #xrange(ArgType, StreamRange, StreamRange, long)} but returns the entries + * in reverse order. * - * @implNote ArgType is limited to String or GlideString, any other type will - * throw IllegalArgumentException - * @see valkey.io for - * details. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. * @param key The key of the stream. * @param start Starting stream ID bound for range. *
                    *
                  • Use {@link StreamRange.IdBound#of} to specify a stream ID. - *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an - * exclusive bounded stream ID.
                  • Use {@link StreamRange.InfRangeBound#MIN} - * to start with the minimum available ID. + *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an exclusive bounded stream + * ID. + *
                  • Use {@link StreamRange.InfRangeBound#MIN} to start with the minimum available ID. *
                  * * @param end Ending stream ID bound for range. *
                    *
                  • Use {@link StreamRange.IdBound#of} to specify a stream ID. - *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an - * exclusive bounded stream ID.
                  • Use {@link StreamRange.InfRangeBound#MAX} - * to end with the maximum available ID. + *
                  • Use {@link StreamRange.IdBound#ofExclusive} to specify an exclusive bounded stream + * ID. + *
                  • Use {@link StreamRange.InfRangeBound#MAX} to end with the maximum available ID. *
                  * * @param count Maximum count of stream entries to return. - * @return Command Response - A Map of key to stream entry data, - * where entry data is an array of pairings with format [[field, - * entry], [field, entry], ...]. + * @return Command Response - A Map of key to stream entry data, where entry data is + * an array of pairings with format [[field, entry], [field, entry], ...]. */ public T xrevrange( @NonNull ArgType key, @NonNull StreamRange end, @NonNull StreamRange start, long count) { @@ -3559,8 +3548,8 @@ public T xrevrange( * Creates a new consumer group uniquely identified by groupname for the stream * stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param groupName The newly created consumer group name. @@ -3581,8 +3570,8 @@ public T xgroupCreate( * Creates a new consumer group uniquely identified by groupname for the stream * stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param groupName The newly created consumer group name. @@ -3605,20 +3594,20 @@ public T xgroupCreate( } /** - * Destroys the consumer group groupname for the stream stored at key. + * Destroys the consumer group groupName for the stream stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. - * @param groupname The newly created consumer group name. + * @param groupName The newly created consumer group name. * @return Command Response - true if the consumer group is destroyed. Otherwise, * false. */ - public T xgroupDestroy(@NonNull ArgType key, @NonNull ArgType groupname) { + public T xgroupDestroy(@NonNull ArgType key, @NonNull ArgType groupName) { checkTypeOrThrow(key); protobufTransaction.addCommands( - buildCommand(XGroupDestroy, newArgsBuilder().add(key).add(groupname))); + buildCommand(XGroupDestroy, newArgsBuilder().add(key).add(groupName))); return getThis(); } @@ -3626,8 +3615,8 @@ public T xgroupDestroy(@NonNull ArgType key, @NonNull ArgType groupnam * Creates a consumer named consumer in the consumer group group for the * stream stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param group The consumer group name. @@ -3646,8 +3635,8 @@ public T xgroupCreateConsumer( /** * Deletes a consumer named consumer in the consumer group group. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param group The consumer group name. @@ -3666,8 +3655,8 @@ public T xgroupDelConsumer( /** * Sets the last delivered ID for a consumer group. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param groupName The consumer group name. @@ -3686,9 +3675,9 @@ public T xgroupSetId( /** * Sets the last delivered ID for a consumer group. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException - * @since Redis 7.0 and above + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @since Valkey 7.0 and above * @see valkey.io for details. * @param key The key of the stream. * @param groupName The consumer group name. @@ -3703,32 +3692,32 @@ public T xgroupSetId( protobufTransaction.addCommands( buildCommand( XGroupSetId, - newArgsBuilder().add(key).add(groupName).add(id).add("ENTRIESREAD").add(entriesRead))); + newArgsBuilder() + .add(key) + .add(groupName) + .add(id) + .add(ENTRIES_READ_VALKEY_API) + .add(entriesRead))); return getThis(); } /** * Reads entries from the given streams owned by a consumer group. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException - * @apiNote When in cluster mode, all keys in keysAndIds must map - * to the same hash slot. - * @see valkey.io for - * details. - * @param keysAndIds A Map of keys and entry ids to read from. - * The Map is composed of a stream's key and the id of the - * entry after which the stream will be read. Use the special id of - * {@literal Map>} + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. + * @param keysAndIds A Map of keys and entry ids to read from. The Map + * is composed of a stream's key and the id of the entry after which the stream will be read. + * Use the special id of {@literal Map>} * to receive only new messages. * @param group The consumer group name. * @param consumer The newly created consumer. - * @return Command Response - A {@literal Map>} with stream keys, to Map of - * stream-ids, to an array of pairings with format - * [[field, entry], [field, entry], ...]. - * Returns null if the consumer group does not exist. Returns - * a Map with a value of code>null if the stream is empty. + * @return Command Response - A {@literal Map>} with + * stream keys, to Map of stream-ids, to an array of pairings with format + * [[field, entry], [field, entry], ...]. Returns null if the consumer + * group does not exist. Returns a Map with a value of code>null if the + * stream is empty. */ public T xreadgroup( @NonNull Map keysAndIds, @@ -3741,27 +3730,21 @@ public T xreadgroup( /** * Reads entries from the given streams owned by a consumer group. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException - * @apiNote When in cluster mode, all keys in keysAndIds must map - * to the same hash slot. - * @see valkey.io for - * details. - * @param keysAndIds A Map of keys and entry ids to read from. - * The Map is composed of a stream's key and the id of the - * entry after which the stream will be read. Use the special id of - * {@literal Map>} - * to receive only new messages. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. + * @param keysAndIds A Map of keys and entry ids to read from. The Map + * is composed of a stream's key and the id of the entry after which the stream will be read. + * Use the special id of {@literal Map>} to + * receive only new messages. * @param group The consumer group name. * @param consumer The newly created consumer. - * @param options Options detailing how to read the stream {@link - * StreamReadGroupOptions}. - * @return Command Response - A {@literal Map>} with stream keys, to Map of - * stream-ids, to an array of pairings with format - * [[field, entry], [field, entry], ...]. - * Returns null if the consumer group does not exist. Returns - * a Map with a value of code>null if the stream is empty. + * @param options Options detailing how to read the stream {@link StreamReadGroupOptions}. + * @return Command Response - A {@literal Map>} with + * stream keys, to Map of stream-ids, to an array of pairings with format + * [[field, entry], [field, entry], ...]. Returns null if the consumer + * group does not exist. Returns a Map with a value of code>null if the + * stream is empty. */ public T xreadgroup( @NonNull Map keysAndIds, @@ -3783,8 +3766,8 @@ public T xreadgroup( * of a stream. This command should be called on a pending message so that such message does not * get processed again. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @param key The key of the stream. * @param group The consumer group name. * @param ids Stream entry ID to acknowledge and purge messages. @@ -3800,14 +3783,14 @@ public T xack(@NonNull ArgType key, @NonNull ArgType group, @NonNull A /** * Returns stream message summary information for pending messages matching a given range of IDs. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param group The consumer group name. * @return Command Response - A 2D-array that includes the summary of pending - * messages, with the format [NumOfMessages, - * StartId, EndId, [[Consumer, NumOfMessages], ...], where: + * messages, with the format + * [NumOfMessages, StartId, EndId, [[Consumer, NumOfMessages], ...], where: *
                    *
                  • NumOfMessages: The total number of pending messages for this consumer * group. @@ -3828,8 +3811,8 @@ public T xpending(@NonNull ArgType key, @NonNull ArgType group) { * Returns an extended form of stream message information for pending messages matching a given * range of IDs. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param group The consumer group name. @@ -3849,8 +3832,7 @@ public T xpending(@NonNull ArgType key, @NonNull ArgType group) { * * @param count Limits the number of messages returned. * @return Command Response - A 2D-array of 4-tuples containing extended message - * information with the format [[ID, Consumer, - * TimeElapsed, NumOfDelivered], ... ] + * information with the format [[ID, Consumer, TimeElapsed, NumOfDelivered], ... ] * , where: *
                      *
                    • ID: The ID of the message. @@ -3875,8 +3857,8 @@ public T xpending( * Returns an extended form of stream message information for pending messages matching a given * range of IDs. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param group The consumer group name. @@ -3897,8 +3879,7 @@ public T xpending( * @param count Limits the number of messages returned. * @param options Stream add options {@link StreamPendingOptions}. * @return Command Response - A 2D-array of 4-tuples containing extended message - * information with the format [[ID, Consumer, - * TimeElapsed, NumOfDelivered], ... ] + * information with the format [[ID, Consumer, TimeElapsed, NumOfDelivered], ... ] * , where: *
                        *
                      • ID: The ID of the message. @@ -3979,8 +3960,8 @@ public T xinfoStreamFull(@NonNull ArgType key, int count) { /** * Changes the ownership of a pending message. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param group The consumer group name. @@ -4006,8 +3987,8 @@ public T xclaim( /** * Changes the ownership of a pending message. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param group The consumer group name. @@ -4041,10 +4022,10 @@ public T xclaim( /** * Changes the ownership of a pending message. This function returns an array with - * only the message/entry IDs, and is equivalent to using JUSTID in the Redis API. + * only the message/entry IDs, and is equivalent to using JUSTID in the Valkey API. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param group The consumer group name. @@ -4075,10 +4056,10 @@ public T xclaimJustId( /** * Changes the ownership of a pending message. This function returns an array with - * only the message/entry IDs, and is equivalent to using JUSTID in the Redis API. + * only the message/entry IDs, and is equivalent to using JUSTID in the Valkey API. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the stream. * @param group The consumer group name. @@ -4321,8 +4302,8 @@ public T xautoclaimJustId( /** * Returns the remaining time to live of key that has a timeout, in milliseconds. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to return its timeout. * @return Command Response - TTL in milliseconds. -2 if key does not @@ -4339,8 +4320,8 @@ public T pttl(@NonNull ArgType key) { * key with an expire set) to persistent (a key that will never expire * as no timeout is associated). * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to remove the existing timeout on. * @return Command Response - false if key does not exist or does not @@ -4427,7 +4408,7 @@ public T flushdb(FlushMode mode) { } /** - * Displays a piece of generative computer art and the Redis version. + * Displays a piece of generative computer art and the server version. * * @see valkey.io for details. * @return Command Response - A piece of generative computer art along with the current Redis @@ -4439,14 +4420,15 @@ public T lolwut() { } /** - * Displays a piece of generative computer art and the Redis version. + * Displays a piece of generative computer art and the server version. * * @see valkey.io for details. * @param parameters Additional set of arguments in order to change the output: *
                          - *
                        • On Redis version 5, those are length of the line, number of squares per - * row, and number of squares per column. - *
                        • On Redis version 6, those are number of columns and number of lines. + *
                        • On the server version 5, those are length of the line, number of squares + * per row, and number of squares per column. + *
                        • On the server version 6, those are number of columns and number of + * lines. *
                        • On other versions parameters are ignored. *
                        * @@ -4459,7 +4441,7 @@ public T lolwut(int @NonNull [] parameters) { } /** - * Displays a piece of generative computer art and the Redis version. + * Displays a piece of generative computer art and the server version. * * @apiNote Versions 5 and 6 produce graphical things. * @see valkey.io for details. @@ -4474,7 +4456,7 @@ public T lolwut(int version) { } /** - * Displays a piece of generative computer art and the Redis version. + * Displays a piece of generative computer art and the server version. * * @apiNote Versions 5 and 6 produce graphical things. * @see valkey.io for details. @@ -4509,9 +4491,9 @@ public T dbsize() { /** * Returns the string representation of the type of the value stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException - * @see valkey.io for details. * @param key The key to check its data type. * @return Command Response - If the key exists, the type of the stored value is * returned. Otherwise, a "none" string is returned. @@ -4537,12 +4519,12 @@ public T randomKey() { * Renames key to newKey.
                        * If newKey already exists it is overwritten. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to rename. * @param newKey The new name of the key. - * @return Command Response - If the key was successfully renamed, return "OK" + * @return Command Response - If the key was successfully renamed, returns OK * . If key does not exist, the transaction fails with an error. */ public T rename(@NonNull ArgType key, @NonNull ArgType newKey) { @@ -4554,8 +4536,8 @@ public T rename(@NonNull ArgType key, @NonNull ArgType newKey) { /** * Renames key to newKey if newKey does not yet exist. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key to rename. * @param newKey The new key name. @@ -4572,8 +4554,8 @@ public T renamenx(@NonNull ArgType key, @NonNull ArgType newKey) { * Inserts element in the list at key either before or after the * pivot. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @param position The relative position to insert into - either {@link InsertPosition#BEFORE} or @@ -4600,8 +4582,8 @@ public T linsert( * being checked in the order that they are given.
                        * Blocks the connection when there are no elements to pop from any of the given lists. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @apiNote BRPOP is a client blocking command, see Blocking @@ -4611,9 +4593,8 @@ public T linsert( * 0 will block indefinitely. * @return Command Response - A two-element array containing the key * from which the element was popped and the value of the popped element, - * formatted as [key, - * value]. If no element could be popped and the timeout expired, returns
                        null - * . + * formatted as [key, value]. If no element could be popped and the timeout + * expired, returns null. */ public T brpop(@NonNull ArgType[] keys, double timeout) { checkTypeOrThrow(keys); @@ -4626,8 +4607,8 @@ public T brpop(@NonNull ArgType[] keys, double timeout) { * key exists and holds a list. If key is not a list, this performs no * operation. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @param elements The elements to insert at the head of the list stored at key. @@ -4644,8 +4625,8 @@ public T lpushx(@NonNull ArgType key, @NonNull ArgType[] elements) { * key exists and holds a list. If key is not a list, this performs no * operation. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @param elements The elements to insert at the tail of the list stored at key. @@ -4662,8 +4643,8 @@ public T rpushx(@NonNull ArgType key, @NonNull ArgType[] elements) { * being checked in the order that they are given.
                        * Blocks the connection when there are no elements to pop from any of the given lists. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @apiNote BLPOP is a client blocking command, see Blocking @@ -4673,9 +4654,8 @@ public T rpushx(@NonNull ArgType key, @NonNull ArgType[] elements) { * 0 will block indefinitely. * @return Command Response - A two-element array containing the key * from which the element was popped and the value of the popped element, - * formatted as [key, - * value]. If no element could be popped and the timeout expired, returns null - * . + * formatted as [key, value]. If no element could be popped and the timeout + * expired, returns null. */ public T blpop(@NonNull ArgType[] keys, double timeout) { checkTypeOrThrow(keys); @@ -4689,8 +4669,8 @@ public T blpop(@NonNull ArgType[] keys, double timeout) { * score, or by lexicographical order.
                        * To get the elements with their scores, see {@link #zrangeWithScores}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see
                        valkey.io for more details. * @param key The key of the sorted set. * @param rangeQuery The range query object representing the type of range query to perform.
                        @@ -4702,9 +4682,9 @@ public T blpop(@NonNull ArgType[] keys, double timeout) { * * @param reverse If true, reverses the sorted set, with index 0 as the element with the highest * score. - * @return Command Response - An array of elements within the specified range. If key - * does not exist, it is treated as an empty sorted set, and the command returns an empty - * array. + * @return Command Response - An array of elements within the specified range. If + * key does not exist, it is treated as an empty sorted set, and the command + * returns an empty array. */ public T zrange(@NonNull ArgType key, @NonNull RangeQuery rangeQuery, boolean reverse) { checkTypeOrThrow(key); @@ -4723,8 +4703,8 @@ public T zrange(@NonNull ArgType key, @NonNull RangeQuery rangeQuery, * score, or by lexicographical order.
                        * To get the elements with their scores, see {@link #zrangeWithScores}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param rangeQuery The range query object representing the type of range query to perform.
                        @@ -4734,9 +4714,9 @@ public T zrange(@NonNull ArgType key, @NonNull RangeQuery rangeQuery, *
                      • For range queries by score, use {@link RangeByScore}. *
                      * - * @return Command Response - An array of elements within the specified range. If key - * does not exist, it is treated as an empty sorted set, and the command returns an empty - * array. + * @return Command Response - An array of elements within the specified range. If + * key does not exist, it is treated as an empty sorted set, and the command + * returns an empty array. */ public T zrange(@NonNull ArgType key, @NonNull RangeQuery rangeQuery) { return getThis().zrange(key, rangeQuery, false); @@ -4746,8 +4726,8 @@ public T zrange(@NonNull ArgType key, @NonNull RangeQuery rangeQuery) * Returns the specified range of elements with their scores in the sorted set stored at key * . Similar to {@link #zrange} but with a WITHSCORE flag. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param rangeQuery The range query object representing the type of range query to perform.
                      @@ -4778,8 +4758,8 @@ public T zrangeWithScores( * Returns the specified range of elements with their scores in the sorted set stored at key * . Similar to {@link #zrange} but with a WITHSCORE flag. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param rangeQuery The range query object representing the type of range query to perform.
                      @@ -4800,9 +4780,9 @@ public T zrangeWithScores(@NonNull ArgType key, @NonNull ScoredRangeQu * Pops a member-score pair from the first non-empty sorted set, with the given keys * being checked in the order they are provided. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException - * @since Redis 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @since Valkey 7.0 and above. * @see valkey.io for more details. * @param keys The keys of the sorted sets. * @param modifier The element pop criteria - either {@link ScoreFilter#MIN} or {@link @@ -4823,9 +4803,9 @@ public T zmpop(@NonNull ArgType[] keys, @NonNull ScoreFilter modifier) * Pops multiple member-score pairs from the first non-empty sorted set, with the given keys * being checked in the order they are provided. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException - * @since Redis 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @since Valkey 7.0 and above. * @see valkey.io for more details. * @param keys The keys of the sorted sets. * @param modifier The element pop criteria - either {@link ScoreFilter#MIN} or {@link @@ -4853,11 +4833,11 @@ public T zmpop(@NonNull ArgType[] keys, @NonNull ScoreFilter modifier, /** * Blocks the connection until it pops and returns a member-score pair from the first non-empty * sorted set, with the given keys being checked in the order they are provided.
                      - * BZMPOP is the blocking variant of {@link #zmpop(String[], ScoreFilter)}. + * BZMPOP is the blocking variant of {@link #zmpop(ArgType[], ScoreFilter)}. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @apiNote BZMPOP is a client blocking command, see Blocking @@ -4885,11 +4865,11 @@ public T bzmpop( * Blocks the connection until it pops and returns multiple member-score pairs from the first * non-empty sorted set, with the given keys being checked in the order they are * provided.
                      - * BZMPOP is the blocking variant of {@link #zmpop(String[], ScoreFilter, long)}. + * BZMPOP is the blocking variant of {@link #zmpop(ArgType[], ScoreFilter, long)}. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see
                      valkey.io for more details. * @apiNote BZMPOP is a client blocking command, see Blocking @@ -4930,11 +4910,12 @@ public T bzmpop( * HyperLogLog, then no operation is performed. If key does not exist, then the * HyperLogLog structure is created. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the HyperLogLog data structure to add elements into. - * @param elements An array of members to add to the HyperLogLog stored at key. + * @param elements An array of members to add to the HyperLogLog stored at key + * . * @return Command Response - If the HyperLogLog is newly created, or if the HyperLogLog * approximated cardinality is altered, then returns 1. Otherwise, returns * 0. @@ -4949,8 +4930,8 @@ public T pfadd(@NonNull ArgType key, @NonNull ArgType[] elements) { * Estimates the cardinality of the data stored in a HyperLogLog structure for a single key or * calculates the combined cardinality of multiple keys by merging their HyperLogLogs temporarily. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param keys The keys of the HyperLogLog data structures to be analyzed. * @return Command Response - The approximated cardinality of given HyperLogLog data structures. @@ -4968,8 +4949,8 @@ public T pfcount(@NonNull ArgType[] keys) { * If the destination variable exists, it is treated as one of the source HyperLogLog data sets, * otherwise a new HyperLogLog is created. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param destination The key of the destination HyperLogLog where the merged data sets will be * stored. @@ -4984,10 +4965,10 @@ public T pfmerge(@NonNull ArgType destination, @NonNull ArgType[] sour } /** - * Returns the internal encoding for the Redis object stored at key. + * Returns the internal encoding for the server object stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the object to get the internal encoding of. * @return Command response - If key exists, returns the internal encoding of the @@ -5001,10 +4982,10 @@ public T objectEncoding(@NonNull ArgType key) { } /** - * Returns the logarithmic access frequency counter of a Redis object stored at key. + * Returns the logarithmic access frequency counter of a server object stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the object to get the logarithmic access frequency counter * of. @@ -5021,8 +5002,8 @@ public T objectFreq(@NonNull ArgType key) { /** * Returns the time in seconds since the last access to the value stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the object to get the idle time of. * @return Command response - If key exists, returns the idle time in seconds. @@ -5037,8 +5018,8 @@ public T objectIdletime(@NonNull ArgType key) { /** * Returns the reference count of the object stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the object to get the reference count of. * @return Command response - If key exists, returns the reference count of the @@ -5054,8 +5035,8 @@ public T objectRefcount(@NonNull ArgType key) { /** * Updates the last access time of specified keys. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param keys The keys to update last access time. * @return Command Response - The number of keys that were updated. @@ -5071,15 +5052,15 @@ public T touch(@NonNull ArgType[] keys) { * replace is true, removes the destination key first if it already * exists, otherwise performs no action. * - * @since Redis 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param source The key to the source value. * @param destination The key where the value should be copied to. * @param replace If the destination key should be removed before copying the value to it. - * @return Command Response - 1L if source was copied, 0L - * if source was not copied. + * @return Command Response - true if source was copied, false + * if source was not copied. */ public T copy(@NonNull ArgType source, @NonNull ArgType destination, boolean replace) { checkTypeOrThrow(source); @@ -5093,9 +5074,9 @@ public T copy(@NonNull ArgType source, @NonNull ArgType destination, b * Copies the value stored at the source to the destination key if the * destination key does not yet exist. * - * @since Redis 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param source The key to the source value. * @param destination The key where the value should be copied to. @@ -5110,8 +5091,8 @@ public T copy(@NonNull ArgType source, @NonNull ArgType destination) { * Serialize the value stored at key in a Valkey-specific format and return it to the * user. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the set. * @return Command Response - The serialized value of a set. If key does not exist, @@ -5127,8 +5108,8 @@ public T dump(@NonNull ArgType key) { * Create a key associated with a value that is obtained by * deserializing the provided serialized value (obtained via {@link #dump}). * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the set. * @param ttl The expiry time (in milliseconds). If 0, the key will @@ -5148,8 +5129,8 @@ public T restore(@NonNull ArgType key, long ttl, @NonNull byte[] value * Create a key associated with a value that is obtained by * deserializing the provided serialized value (obtained via {@link #dump}). * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the set. * @param ttl The expiry time (in milliseconds). If 0, the key will @@ -5173,8 +5154,8 @@ public T restore( /** * Counts the number of set bits (population counting) in a string stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key for the string to count the set bits of. * @return Command Response - The number of set bits in the string. Returns zero if the key is @@ -5194,8 +5175,8 @@ public T bitcount(@NonNull ArgType key) { * -1 being the last element of the list, -2 being the penultimate, and * so on. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key for the string to count the set bits of. * @param start The starting byte offset. @@ -5219,9 +5200,9 @@ public T bitcount(@NonNull ArgType key, long start, long end) { * -1 being the last element of the list, -2 being the penultimate, and * so on. * - * @since Redis 7.0 and above - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key for the string to count the set bits of. * @param start The starting offset. @@ -5246,8 +5227,8 @@ public T bitcount( * If a member is already a part of the sorted set, its position is updated. * * @see valkey.io for more details. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @param key The key of the sorted set. * @param membersToGeospatialData A mapping of member names to their corresponding positions - see * {@link GeospatialData}. The command will report an error when the user attempts to index @@ -5277,10 +5258,10 @@ public T geoadd( * .
                      * If a member is already a part of the sorted set, its position is updated.
                      * To perform a geoadd operation while specifying optional parameters, use {@link - * #geoadd(String, Map, GeoAddOptions)}. + * #geoadd(ArgType, Map, GeoAddOptions)}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param membersToGeospatialData A mapping of member names to their corresponding positions - see @@ -5297,8 +5278,8 @@ public T geoadd( * Returns the positions (longitude,latitude) of all the specified members of the * geospatial index represented by the sorted set at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param members The members for which to get the positions. @@ -5316,8 +5297,8 @@ public T geopos(@NonNull ArgType key, @NonNull ArgType[] members) { * Returns the distance between member1 and member2 saved in the * geospatial index stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param member1 The name of the first member. @@ -5343,15 +5324,15 @@ public T geodist( * Returns the distance between member1 and member2 saved in the * geospatial index stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param member1 The name of the first member. * @param member2 The name of the second member. * @return Command Response - The distance between member1 and member2. * If one or both members do not exist or if the key does not exist returns null. - * The default unit is {@see GeoUnit#METERS}. + * The default unit is {@link GeoUnit#METERS}. */ public T geodist( @NonNull ArgType key, @NonNull ArgType member1, @NonNull ArgType member2) { @@ -5365,8 +5346,8 @@ public T geodist( * Returns the GeoHash strings representing the positions of all the specified * members in the sorted set stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param members The array of members whose GeoHash strings are to be retrieved. @@ -5383,9 +5364,9 @@ public T geohash(@NonNull ArgType key, @NonNull ArgType[] members) { /** * Loads a library to Redis. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param libraryCode The source code that implements the library. * @param replace Whether the given library should overwrite a library with the same name if it @@ -5402,7 +5383,7 @@ public T functionLoad(@NonNull ArgType libraryCode, boolean replace) { /** * Returns information about the functions and libraries. * - * @since Redis 7.0 and above. + * @since Valkey 7.0 and above. * @see valkey.io for details. * @param withCode Specifies whether to request the library code from the server or not. * @return Command Response - Info about all libraries and their functions. @@ -5416,9 +5397,9 @@ public T functionList(boolean withCode) { /** * Returns information about the functions and libraries. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param libNamePattern A wildcard pattern for matching library names. * @param withCode Specifies whether to request the library code from the server or not. @@ -5439,9 +5420,9 @@ public T functionList(@NonNull ArgType libNamePattern, boolean withCod /** * Invokes a previously loaded function. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param function The function name. * @param keys An array of key arguments accessed by the function. To ensure the @@ -5463,9 +5444,9 @@ public T fcall( /** * Invokes a previously loaded read-only function. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param function The function name. * @param arguments An array of function arguments. arguments @@ -5479,9 +5460,9 @@ public T fcall(@NonNull ArgType function, @NonNull ArgType[] arguments /** * Invokes a previously loaded read-only function. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param function The function name. * @param keys An array of key arguments accessed by the function. To ensure the @@ -5504,9 +5485,9 @@ public T fcallReadOnly( /** * Invokes a previously loaded function. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param function The function name. * @param arguments An array of function arguments. arguments @@ -5521,7 +5502,7 @@ public T fcallReadOnly(@NonNull ArgType function, @NonNull ArgType[] a * Returns information about the function that's currently running and information about the * available execution engines. * - * @since Redis 7.0 and above. + * @since Valkey 7.0 and above. * @see valkey.io for details. * @return Command Response - A Map with two keys: *
                        @@ -5585,8 +5566,8 @@ public T functionRestore(@NonNull byte[] payload, @NonNull FunctionRestorePolicy * non-existent then the bit at offset is set to value and the preceding * bits are set to 0. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the string. * @param offset The index of the bit to be set. @@ -5605,8 +5586,8 @@ public T setbit(@NonNull ArgType key, long offset, long value) { * Returns the bit value at offset in the string value stored at key. * offset should be greater than or equal to zero. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the string. * @param offset The index of the bit to return. @@ -5622,14 +5603,14 @@ public T getbit(@NonNull ArgType key, long offset) { /** * Blocks the connection until it pops one or more elements from the first non-empty list from the * provided keys. BLMPOP is the blocking variant of {@link - * #lmpop(String[], ListDirection, Long)}. + * #lmpop(ArgType[], ListDirection, Long)}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @apiNote BLMPOP is a client blocking command, see Blocking * Commands for more details and best practices. - * @since Redis 7.0 and above. + * @since Valkey 7.0 and above. * @see valkey.io for details. * @param keys The list of provided key names. * @param direction The direction based on which elements are popped from - see {@link @@ -5662,15 +5643,15 @@ public T blmpop( /** * Blocks the connection until it pops one element from the first non-empty list from the provided - * keys. BLMPOP is the blocking variant of {@link #lmpop(String[], + * keys. BLMPOP is the blocking variant of {@link #lmpop(ArgType[], * ListDirection)}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @apiNote BLMPOP is a client blocking command, see Blocking * Commands for more details and best practices. - * @since Redis 7.0 and above. + * @since Valkey 7.0 and above. * @see valkey.io for details. * @param keys The list of provided key names. * @param direction The direction based on which elements are popped from - see {@link @@ -5693,8 +5674,8 @@ public T blmpop( /** * Returns the position of the first bit matching the given bit value. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the string. * @param bit The bit value to match. The value must be 0 or 1. @@ -5715,8 +5696,8 @@ public T bitpos(@NonNull ArgType key, long bit) { * indicating offsets starting at the end of the list, with -1 being the last byte of * the list, -2 being the penultimate, and so on. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the string. * @param bit The bit value to match. The value must be 0 or 1. @@ -5739,8 +5720,8 @@ public T bitpos(@NonNull ArgType key, long bit, long start) { * negative numbers indicating offsets starting at the end of the list, with -1 being * the last byte of the list, -2 being the penultimate, and so on. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the string. * @param bit The bit value to match. The value must be 0 or 1. @@ -5767,9 +5748,9 @@ public T bitpos(@NonNull ArgType key, long bit, long start, long end) * offsets starting at the end of the list, with -1 being the last element of the * list, -2 being the penultimate, and so on. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the string. * @param bit The bit value to match. The value must be 0 or 1. @@ -5794,8 +5775,8 @@ public T bitpos( * Perform a bitwise operation between multiple keys (containing string values) and store the * result in the destination. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param bitwiseOperation The bitwise operation to perform. * @param destination The key that will store the resulting string. @@ -5816,9 +5797,9 @@ public T bitop( * Pops one or more elements from the first non-empty list from the provided keys * . * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param keys An array of keys to lists. * @param direction The direction based on which elements are popped from - see {@link @@ -5845,9 +5826,9 @@ public T lmpop( /** * Pops one element from the first non-empty list from the provided keys. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param keys An array of keys to lists. * @param direction The direction based on which elements are popped from - see {@link @@ -5869,8 +5850,8 @@ public T lmpop(@NonNull ArgType[] keys, @NonNull ListDirection directi * the list. Here, -1 means the last element, -2 means the penultimate * and so forth. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the list. * @param index The index of the element in the list to be set. @@ -5885,51 +5866,51 @@ public T lset(@NonNull ArgType key, long index, @NonNull ArgType eleme /** * Atomically pops and removes the left/right-most element to the list stored at source - * depending on wherefrom, and pushes the element at the first/last element - * of the list stored at destination depending on wherefrom. + * depending on whereFrom, and pushes the element at the first/last element + * of the list stored at destination depending on whereFrom. * - * @since Redis 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param source The key to the source list. * @param destination The key to the destination list. - * @param wherefrom The {@link ListDirection} the element should be removed from. - * @param whereto The {@link ListDirection} the element should be added to. + * @param whereFrom The {@link ListDirection} the element should be removed from. + * @param whereTo The {@link ListDirection} the element should be added to. * @return Command Response - The popped element or null if source does * not exist. */ public T lmove( @NonNull ArgType source, @NonNull ArgType destination, - @NonNull ListDirection wherefrom, - @NonNull ListDirection whereto) { + @NonNull ListDirection whereFrom, + @NonNull ListDirection whereTo) { checkTypeOrThrow(source); protobufTransaction.addCommands( buildCommand( - LMove, newArgsBuilder().add(source).add(destination).add(wherefrom).add(whereto))); + LMove, newArgsBuilder().add(source).add(destination).add(whereFrom).add(whereTo))); return getThis(); } /** * Blocks the connection until it atomically pops and removes the left/right-most element to the - * list stored at source depending on wherefrom, and pushes the element + * list stored at source depending on whereFrom, and pushes the element * at the first/last element of the list stored at destination depending on - * wherefrom.
                        - * BLMove is the blocking variant of {@link #lmove(String, String, ListDirection, + * whereFrom
                        .
                        + * BLMove is the blocking variant of {@link #lmove(ArgType, ArgType, ListDirection, * ListDirection)}. * - * @since Redis 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @apiNote BLMove is a client blocking command, see Blocking * Commands for more details and best practices. * @see valkey.io for details. * @param source The key to the source list. * @param destination The key to the destination list. - * @param wherefrom The {@link ListDirection} the element should be removed from. - * @param whereto The {@link ListDirection} the element should be added to. + * @param whereFrom The {@link ListDirection} the element should be removed from. + * @param whereTo The {@link ListDirection} the element should be added to. * @param timeout The number of seconds to wait for a blocking operation to complete. A value of * 0 will block indefinitely. * @return Command Response - The popped element or null if source does @@ -5938,8 +5919,8 @@ public T lmove( public T blmove( @NonNull ArgType source, @NonNull ArgType destination, - @NonNull ListDirection wherefrom, - @NonNull ListDirection whereto, + @NonNull ListDirection whereFrom, + @NonNull ListDirection whereTo, double timeout) { checkTypeOrThrow(source); protobufTransaction.addCommands( @@ -5948,8 +5929,8 @@ public T blmove( newArgsBuilder() .add(source) .add(destination) - .add(wherefrom) - .add(whereto) + .add(whereFrom) + .add(whereTo) .add(timeout))); return getThis(); } @@ -5957,8 +5938,8 @@ public T blmove( /** * Returns a random element from the set value stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key from which to retrieve the set member. * @return Command Response - A random element from the set, or null if key @@ -5973,8 +5954,8 @@ public T srandmember(@NonNull ArgType key) { /** * Returns random elements from the set value stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key from which to retrieve the set members. * @param count The number of elements to return.
                        @@ -5993,8 +5974,8 @@ public T srandmember(@NonNull ArgType key, long count) { /** * Removes and returns one random member from the set stored at key. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the set. * @return Command Response - The value of the popped member.
                        @@ -6010,13 +5991,13 @@ public T spop(@NonNull ArgType key) { * Removes and returns up to count random members from the set stored at key * , depending on the set's length. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the set. * @param count The count of the elements to pop from the set. - * @return Command Response - A set of popped elements will be returned depending on the set's - * length.
                        + * @return Command Response - A Set of popped elements will be returned depending on + * the set's length.
                        * If key does not exist, an empty Set will be returned. */ public T spopCount(@NonNull ArgType key, long count) { @@ -6029,8 +6010,8 @@ public T spopCount(@NonNull ArgType key, long count) { * Reads or modifies the array of bits representing the string that is held at key * based on the specified subCommands. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the string. * @param subCommands The subCommands to be performed on the binary value of the string at @@ -6066,13 +6047,14 @@ public T bitfield(@NonNull ArgType key, @NonNull BitFieldSubCommands[] * specified subCommands.
                        * This command is routed depending on the client's {@link ReadFrom} strategy. * - * @since Redis 6.0 and above - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.0 and above + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the string. * @param subCommands The GET subCommands to be performed. - * @return Command Response - An array of results from the GET subcommands. + * @return Command Response - An array of results from the GET + * subcommands. */ public T bitfieldReadOnly( @NonNull ArgType key, @NonNull BitFieldReadOnlySubCommands[] subCommands) { @@ -6086,7 +6068,7 @@ public T bitfieldReadOnly( /** * Deletes all function libraries. * - * @since Redis 7.0 and above. + * @since Valkey 7.0 and above. * @see valkey.io for details. * @return Command Response - OK. */ @@ -6098,7 +6080,7 @@ public T functionFlush() { /** * Deletes all function libraries. * - * @since Redis 7.0 and above. + * @since Valkey 7.0 and above. * @see valkey.io for details. * @param mode The flushing mode, could be either {@link FlushMode#SYNC} or {@link * FlushMode#ASYNC}. @@ -6112,9 +6094,9 @@ public T functionFlush(@NonNull FlushMode mode) { /** * Deletes a library and all its functions. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param libName The library name to delete. * @return Command Response - OK. @@ -6129,9 +6111,9 @@ public T functionDelete(@NonNull ArgType libName) { * Returns the longest common subsequence between strings stored at key1 and * key2. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key1 The key that stores the first string. * @param key2 The key that stores the second string. @@ -6149,11 +6131,9 @@ public T lcs(@NonNull ArgType key1, @NonNull ArgType key2) { * Returns the length of the longest common subsequence between strings stored at key1 * and key2. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException - * @apiNote When in cluster mode, key1 and key2 must map to the same - * hash slot. + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key1 The key that stores the first string. * @param key2 The key that stores the second string. @@ -6169,8 +6149,8 @@ public T lcsLen(@NonNull ArgType key1, @NonNull ArgType key2) { /** * Publishes message on pubsub channel. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param message The message to publish. * @param channel The channel to publish the message on. @@ -6186,12 +6166,12 @@ public T publish(@NonNull ArgType message, @NonNull ArgType channel) { /** * Gets the union of all the given sets. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param keys The keys of the sets. - * @return Command Response - A set of members which are present in at least one of the given - * sets. If none of the sets exist, an empty set will be returned. + * @return Command Response - A Set of members which are present in at least one of + * the given sets. If none of the sets exist, an empty set will be returned. */ public T sunion(@NonNull ArgType[] keys) { checkTypeOrThrow(keys); @@ -6203,9 +6183,9 @@ public T sunion(@NonNull ArgType[] keys) { * Returns the indices and length of the longest common subsequence between strings stored at * key1 and key2. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key1 The key that stores the first string. * @param key2 The key that stores the second string. @@ -6222,16 +6202,17 @@ public T sunion(@NonNull ArgType[] keys) { * * @example If key1 holds the string "abcd123" and key2 * holds the string "bcdef123" then the sample result would be - *
                        {@code new Long[][][] {
                        -     *      {
                        -     *          {4L, 6L},
                        -     *          {5L, 7L}
                        -     *      },
                        -     *      {
                        -     *          {1L, 3L},
                        -     *          {0L, 2L}
                        -     *      }
                        -     *  }
                        +     *     
                        {@code
                        +     * new Long[][][] {
                        +     *     {
                        +     *         {4L, 6L},
                        +     *         {5L, 7L}
                        +     *     },
                        +     *     {
                        +     *         {1L, 3L},
                        +     *         {0L, 2L}
                        +     *     }
                        +     * }
                              * }
                        * The result indicates that the first substring match is "123" in key1 * at index 4 to 6 which matches the substring in key2 @@ -6250,9 +6231,9 @@ public T lcsIdx(@NonNull ArgType key1, @NonNull ArgType key2) { * Returns the indices and length of the longest common subsequence between strings stored at * key1 and key2. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key1 The key that stores the first string. * @param key2 The key that stores the second string. @@ -6270,16 +6251,17 @@ public T lcsIdx(@NonNull ArgType key1, @NonNull ArgType key2) { * * @example If key1 holds the string "abcd123" and key2 * holds the string "bcdef123" then the sample result would be - *
                        {@code new Long[][][] {
                        -     *      {
                        -     *          {4L, 6L},
                        -     *          {5L, 7L}
                        -     *      },
                        -     *      {
                        -     *          {1L, 3L},
                        -     *          {0L, 2L}
                        -     *      }
                        -     *  }
                        +     *     
                        {@code
                        +     * new Long[][][] {
                        +     *     {
                        +     *         {4L, 6L},
                        +     *         {5L, 7L}
                        +     *     },
                        +     *     {
                        +     *         {1L, 3L},
                        +     *         {0L, 2L}
                        +     *     }
                        +     * }
                              * }
                        * The result indicates that the first substring match is "123" in key1 * at index 4 to 6 which matches the substring in key2 @@ -6305,9 +6287,9 @@ public T lcsIdx(@NonNull ArgType key1, @NonNull ArgType key2, long min * Returns the indices and length of the longest common subsequence between strings stored at * key1 and key2. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key1 The key that stores the first string. * @param key2 The key that stores the second string. @@ -6319,15 +6301,24 @@ public T lcsIdx(@NonNull ArgType key1, @NonNull ArgType key2, long min * stored as Long. *
                      • "matches" is mapped to a three dimensional Long array that stores pairs * of indices that represent the location of the common subsequences in the strings held - * by key1 and key2. For example, + * by key1 and key2. *
                      * * @example If key1 holds the string "abcd1234" and key2 * holds the string "bcdef1234" then the sample result would be - *
                      {@code new Object[] { new Object[] { new Long[] {4L,
                      -     * 7L}, new Long[] {5L, 8L}, 4L}, new Object[] { new Long[] {1L, 3L}, new
                      -     * Long[] {0L, 2L}, 3L}
                      -     *      }
                      +     *     
                      {@code
                      +     * new Object[] {
                      +     *     new Object[] {
                      +     *         new Long[] {4L, 7L},
                      +     *         new Long[] {5L, 8L},
                      +     *         4L
                      +     *     },
                      +     *     new Object[] {
                      +     *         new Long[] {1L, 3L},
                      +     *         new Long[] {0L, 2L},
                      +     *         3L
                      +     *     }
                      +     * }
                            * }
                      * The result indicates that the first substring match is "1234" in key1 * at index 4 to 7 which matches the substring in key2 @@ -6354,9 +6345,9 @@ public T lcsIdxWithMatchLen(@NonNull ArgType key1, @NonNull ArgType ke * Returns the indices and length of the longest common subsequence between strings stored at * key1 and key2. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key1 The key that stores the first string. * @param key2 The key that stores the second string. @@ -6374,10 +6365,19 @@ public T lcsIdxWithMatchLen(@NonNull ArgType key1, @NonNull ArgType ke * * @example If key1 holds the string "abcd1234" and key2 * holds the string "bcdef1234" then the sample result would be - *
                      {@code new Object[] { new Object[] { new Long[] {4L,
                      -     * 7L}, new Long[] {5L, 8L}, 4L}, new Object[] { new Long[] {1L, 3L}, new
                      -     * Long[] {0L, 2L}, 3L}
                      -     *      }
                      +     *     
                      {@code
                      +     * new Object[] {
                      +     *     new Object[] {
                      +     *         new Long[] { 4L, 7L },
                      +     *         new Long[] { 5L, 8L },
                      +     *         4L
                      +     *     },
                      +     *     new Object[] {
                      +     *         new Long[] { 1L, 3L },
                      +     *         new Long[] { 0L, 2L },
                      +     *         3L
                      +     *     }
                      +     * }
                            * }
                      * The result indicates that the first substring match is "1234" in key1 * at index 4 to 7 which matches the substring in key2 @@ -6408,10 +6408,11 @@ public T lcsIdxWithMatchLen( *
                      * The sort command can be used to sort elements based on different criteria and * apply transformations on sorted elements.
                      - * To store the result into a new key, see {@link #sortStore(String, String)}.
                      + * To store the result into a new key, see {@link #sortStore(ArgType, ArgType)}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. * @param key The key of the list, set, or sorted set to be sorted. * @return Command Response - An Array of sorted elements. */ @@ -6427,9 +6428,10 @@ public T sort(@NonNull ArgType key) { * The sortReadOnly command can be used to sort elements based on different criteria * and apply transformations on sorted elements. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException - * @since Redis 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @since Valkey 7.0 and above. + * @see valkey.io for details. * @param key The key of the list, set, or sorted set to be sorted. * @return Command Response - An Array of sorted elements. */ @@ -6444,11 +6446,12 @@ public T sortReadOnly(@NonNull ArgType key) { * destination. The sort command can be used to sort elements based on * different criteria, apply transformations on sorted elements, and store the result in a new * key.
                      - * To get the sort result without storing it into a key, see {@link #sort(String)} or {@link - * #sortReadOnly(String)}. + * To get the sort result without storing it into a key, see {@link #sort(ArgType)} or {@link + * #sortReadOnly(ArgType)}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. * @param key The key of the list, set, or sorted set to be sorted. * @param destination The key where the sorted result will be stored. * @return Command Response - The number of elements in the sorted key stored at destination @@ -6463,19 +6466,18 @@ public T sortStore(@NonNull ArgType key, @NonNull ArgType destination) /** * Returns the members of a sorted set populated with geospatial information using {@link - * #geoadd(String, Map)}, which are within the borders of the area specified by a given shape. + * #geoadd(ArgType, Map)}, which are within the borders of the area specified by a given shape. * * @since Valkey 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param searchFrom The query's center point options, could be one of: *
                        - *
                      • {@link GeoSearchOrigin.MemberOrigin} to use the position of the given existing member - * in the sorted set. - *
                      • {@link GeoSearchOrigin.CoordOrigin} to use the given longitude and latitude - * coordinates. + *
                      • {@link MemberOrigin} to use the position of the given existing member in the sorted + * set. + *
                      • {@link CoordOrigin} to use the given longitude and latitude coordinates. *
                      * * @param searchBy The query's shape options: @@ -6489,9 +6491,7 @@ public T sortStore(@NonNull ArgType key, @NonNull ArgType destination) * @return Command Response - An array of matched member names. */ public T geosearch( - @NonNull ArgType key, - @NonNull GeoSearchOrigin.SearchOrigin searchFrom, - @NonNull GeoSearchShape searchBy) { + @NonNull ArgType key, @NonNull SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy) { checkTypeOrThrow(key); protobufTransaction.addCommands( buildCommand( @@ -6501,19 +6501,18 @@ public T geosearch( /** * Returns the members of a sorted set populated with geospatial information using {@link - * #geoadd(String, Map)}, which are within the borders of the area specified by a given shape. + * #geoadd(ArgType, Map)}, which are within the borders of the area specified by a given shape. * * @since Valkey 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param searchFrom The query's center point options, could be one of: *
                        - *
                      • {@link GeoSearchOrigin.MemberOrigin} to use the position of the given existing member - * in the sorted set. - *
                      • {@link GeoSearchOrigin.CoordOrigin} to use the given longitude and latitude - * coordinates. + *
                      • {@link MemberOrigin} to use the position of the given existing member in the sorted + * set. + *
                      • {@link CoordOrigin} to use the given longitude and latitude coordinates. *
                      * * @param searchBy The query's shape options: @@ -6530,7 +6529,7 @@ public T geosearch( */ public T geosearch( @NonNull ArgType key, - @NonNull GeoSearchOrigin.SearchOrigin searchFrom, + @NonNull SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchResultOptions resultOptions) { checkTypeOrThrow(key); @@ -6547,19 +6546,18 @@ public T geosearch( /** * Returns the members of a sorted set populated with geospatial information using {@link - * #geoadd(String, Map)}, which are within the borders of the area specified by a given shape. + * #geoadd(ArgType, Map)}, which are within the borders of the area specified by a given shape. * * @since Valkey 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param searchFrom The query's center point options, could be one of: *
                        - *
                      • {@link GeoSearchOrigin.MemberOrigin} to use the position of the given existing member - * in the sorted set. - *
                      • {@link GeoSearchOrigin.CoordOrigin} to use the given longitude and latitude - * coordinates. + *
                      • {@link MemberOrigin} to use the position of the given existing member in the sorted + * set. + *
                      • {@link CoordOrigin} to use the given longitude and latitude coordinates. *
                      * * @param searchBy The query's shape options: @@ -6571,8 +6569,8 @@ public T geosearch( *
                    * * @param options The optional inputs to request additional information. - * @return Command Response - An array of arrays where each sub-array represents a single item in - * the following order: + * @return Command Response - A 2D array of arrays where each sub-array represents a + * single item in the following order: *
                      *
                    • The member (location) name. *
                    • The distance from the center as a Double, in the same unit specified for @@ -6583,7 +6581,7 @@ public T geosearch( */ public T geosearch( @NonNull ArgType key, - @NonNull GeoSearchOrigin.SearchOrigin searchFrom, + @NonNull SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchOptions options) { checkTypeOrThrow(key); @@ -6600,19 +6598,18 @@ public T geosearch( /** * Returns the members of a sorted set populated with geospatial information using {@link - * #geoadd(String, Map)}, which are within the borders of the area specified by a given shape. + * #geoadd(ArgType, Map)}, which are within the borders of the area specified by a given shape. * * @since Valkey 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key of the sorted set. * @param searchFrom The query's center point options, could be one of: *
                        - *
                      • {@link GeoSearchOrigin.MemberOrigin} to use the position of the given existing member - * in the sorted set. - *
                      • {@link GeoSearchOrigin.CoordOrigin} to use the given longitude and latitude - * coordinates. + *
                      • {@link MemberOrigin} to use the position of the given existing member in the sorted + * set. + *
                      • {@link CoordOrigin} to use the given longitude and latitude coordinates. *
                      * * @param searchBy The query's shape options: @@ -6626,8 +6623,8 @@ public T geosearch( * @param options The optional inputs to request additional information. * @param resultOptions Optional inputs for sorting/limiting the results. See - {@link * GeoSearchResultOptions} - * @return Command Response - An array of arrays where each sub-array represents a single item in - * the following order: + * @return Command Response - A 2D array of arrays where each sub-array represents a + * single item in the following order: *
                        *
                      • The member (location) name. *
                      • The distance from the center as a Double, in the same unit specified for @@ -6638,7 +6635,7 @@ public T geosearch( */ public T geosearch( @NonNull ArgType key, - @NonNull GeoSearchOrigin.SearchOrigin searchFrom, + @NonNull SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchOptions options, @NonNull GeoSearchResultOptions resultOptions) { @@ -6659,21 +6656,20 @@ public T geosearch( * Searches for members in a sorted set stored at source representing geospatial data * within a circular or rectangular area and stores the result in destination. If * destination already exists, it is overwritten. Otherwise, a new sorted set will be - * created. To get the result directly, see `{@link #geosearch(String, - * GeoSearchOrigin.SearchOrigin, GeoSearchShape)}. + * created. To get the result directly, see `{@link #geosearch(ArgType, SearchOrigin, + * GeoSearchShape)}. * * @since Valkey 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param destination The key of the destination sorted set. * @param source The key of the source sorted set. * @param searchFrom The query's center point options, could be one of: *
                          - *
                        • {@link GeoSearchOrigin.MemberOrigin} to use the position of the given existing member - * in the sorted set. - *
                        • {@link GeoSearchOrigin.CoordOrigin} to use the given longitude and latitude - * coordinates. + *
                        • {@link MemberOrigin} to use the position of the given existing member in the sorted + * set. + *
                        • {@link CoordOrigin} to use the given longitude and latitude coordinates. *
                        * * @param searchBy The query's shape options: @@ -6689,7 +6685,7 @@ public T geosearch( public T geosearchstore( @NonNull ArgType destination, @NonNull ArgType source, - @NonNull GeoSearchOrigin.SearchOrigin searchFrom, + @NonNull SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy) { checkTypeOrThrow(destination); protobufTransaction.addCommands( @@ -6707,21 +6703,20 @@ public T geosearchstore( * Searches for members in a sorted set stored at source representing geospatial data * within a circular or rectangular area and stores the result in destination. If * destination already exists, it is overwritten. Otherwise, a new sorted set will be - * created. To get the result directly, see `{@link #geosearch(String, - * GeoSearchOrigin.SearchOrigin, GeoSearchShape, GeoSearchResultOptions)}. + * created. To get the result directly, see `{@link #geosearch(ArgType, SearchOrigin, + * GeoSearchShape, GeoSearchResultOptions)}. * * @since Valkey 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param destination The key of the destination sorted set. * @param source The key of the source sorted set. * @param searchFrom The query's center point options, could be one of: *
                          - *
                        • {@link GeoSearchOrigin.MemberOrigin} to use the position of the given existing member - * in the sorted set. - *
                        • {@link GeoSearchOrigin.CoordOrigin} to use the given longitude and latitude - * coordinates. + *
                        • {@link MemberOrigin} to use the position of the given existing member in the sorted + * set. + *
                        • {@link CoordOrigin} to use the given longitude and latitude coordinates. *
                        * * @param searchBy The query's shape options: @@ -6739,7 +6734,7 @@ public T geosearchstore( public T geosearchstore( @NonNull ArgType destination, @NonNull ArgType source, - @NonNull GeoSearchOrigin.SearchOrigin searchFrom, + @NonNull SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchResultOptions resultOptions) { checkTypeOrThrow(destination); @@ -6759,21 +6754,20 @@ public T geosearchstore( * Searches for members in a sorted set stored at source representing geospatial data * within a circular or rectangular area and stores the result in destination. If * destination already exists, it is overwritten. Otherwise, a new sorted set will be - * created. To get the result directly, see `{@link #geosearch(String, - * GeoSearchOrigin.SearchOrigin, GeoSearchShape, GeoSearchOptions)}. + * created. To get the result directly, see `{@link #geosearch(ArgType, SearchOrigin, + * GeoSearchShape, GeoSearchOptions)}. * * @since Valkey 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param destination The key of the destination sorted set. * @param source The key of the source sorted set. * @param searchFrom The query's center point options, could be one of: *
                          - *
                        • {@link GeoSearchOrigin.MemberOrigin} to use the position of the given existing member - * in the sorted set. - *
                        • {@link GeoSearchOrigin.CoordOrigin} to use the given longitude and latitude - * coordinates. + *
                        • {@link MemberOrigin} to use the position of the given existing member in the sorted + * set. + *
                        • {@link CoordOrigin} to use the given longitude and latitude coordinates. *
                        * * @param searchBy The query's shape options: @@ -6790,7 +6784,7 @@ public T geosearchstore( public T geosearchstore( @NonNull ArgType destination, @NonNull ArgType source, - @NonNull GeoSearchOrigin.SearchOrigin searchFrom, + @NonNull SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchStoreOptions options) { checkTypeOrThrow(destination); @@ -6810,21 +6804,20 @@ public T geosearchstore( * Searches for members in a sorted set stored at source representing geospatial data * within a circular or rectangular area and stores the result in destination. If * destination already exists, it is overwritten. Otherwise, a new sorted set will be - * created. To get the result directly, see `{@link #geosearch(String, - * GeoSearchOrigin.SearchOrigin, GeoSearchShape, GeoSearchOptions, GeoSearchResultOptions)}. + * created. To get the result directly, see `{@link #geosearch(ArgType, SearchOrigin, + * GeoSearchShape, GeoSearchOptions, GeoSearchResultOptions)}. * * @since Valkey 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param destination The key of the destination sorted set. * @param source The key of the source sorted set. * @param searchFrom The query's center point options, could be one of: *
                          - *
                        • {@link GeoSearchOrigin.MemberOrigin} to use the position of the given existing member - * in the sorted set. - *
                        • {@link GeoSearchOrigin.CoordOrigin} to use the given longitude and latitude - * coordinates. + *
                        • {@link MemberOrigin} to use the position of the given existing member in the sorted + * set. + *
                        • {@link CoordOrigin} to use the given longitude and latitude coordinates. *
                        * * @param searchBy The query's shape options: @@ -6843,7 +6836,7 @@ public T geosearchstore( public T geosearchstore( @NonNull ArgType destination, @NonNull ArgType source, - @NonNull GeoSearchOrigin.SearchOrigin searchFrom, + @NonNull SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchStoreOptions options, @NonNull GeoSearchResultOptions resultOptions) { @@ -6864,8 +6857,8 @@ public T geosearchstore( /** * Iterates incrementally over a set. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the set. * @param cursor The cursor that points to the next iteration of results. A value of "0" @@ -6884,8 +6877,8 @@ public T sscan(@NonNull ArgType key, @NonNull ArgType cursor) { /** * Iterates incrementally over a set. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the set. * @param cursor The cursor that points to the next iteration of results. A value of "0" @@ -6907,8 +6900,8 @@ public T sscan( /** * Iterates incrementally over a sorted set. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the sorted set. * @param cursor The cursor that points to the next iteration of results. A value of "0" @@ -6929,8 +6922,8 @@ public T zscan(@NonNull ArgType key, @NonNull ArgType cursor) { /** * Iterates incrementally over a sorted set. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the sorted set. * @param cursor The cursor that points to the next iteration of results. A value of "0" @@ -6954,8 +6947,8 @@ public T zscan( /** * Iterates fields of Hash types and their associated values. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param cursor The cursor that points to the next iteration of results. A value of "0" @@ -6976,8 +6969,8 @@ public T hscan(@NonNull ArgType key, @NonNull ArgType cursor) { /** * Iterates fields of Hash types and their associated values. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param key The key of the hash. * @param cursor The cursor that points to the next iteration of results. A value of "0" @@ -7003,14 +6996,15 @@ public T hscan( * before this command, both in the case where the specified number of replicas are reached, or * when the timeout is reached. * - * @param numreplicas The number of replicas to reach. + * @see valkey.io for details. + * @param numReplicas The number of replicas to reach. * @param timeout The timeout value specified in milliseconds. * @return Command Response - The number of replicas reached by all the writes performed in the * context of the current connection. */ - public T wait(long numreplicas, long timeout) { + public T wait(long numReplicas, long timeout) { protobufTransaction.addCommands( - buildCommand(Wait, newArgsBuilder().add(numreplicas).add(timeout))); + buildCommand(Wait, newArgsBuilder().add(numReplicas).add(timeout))); return getThis(); } @@ -7068,7 +7062,8 @@ protected void checkTypeOrThrow(Map argsMap) { } /** Helper function for creating generic type ("ArgType") array */ - protected ArgType[] createArray(ArgType... args) { + @SafeVarargs + protected final ArgType[] createArray(ArgType... args) { return args; } } diff --git a/java/client/src/main/java/glide/api/models/ClusterTransaction.java b/java/client/src/main/java/glide/api/models/ClusterTransaction.java index a13bacd476..803470fed8 100644 --- a/java/client/src/main/java/glide/api/models/ClusterTransaction.java +++ b/java/client/src/main/java/glide/api/models/ClusterTransaction.java @@ -6,28 +6,31 @@ import static redis_request.RedisRequestOuterClass.RequestType.Sort; import static redis_request.RedisRequestOuterClass.RequestType.SortReadOnly; +import glide.api.RedisClusterClient; import glide.api.models.commands.SortClusterOptions; import lombok.NonNull; /** - * Extends BaseTransaction class for cluster mode commands. Transactions allow the execution of a - * group of commands in a single step. + * Transaction implementation for cluster {@link RedisClusterClient}. Transactions allow the + * execution of a group of commands in a single step. * - *

                        Command Response: An array of command responses is returned by the client exec - * command, in the order they were given. Each element in the array represents a command given to - * the Transaction. The response for each command depends on the executed Redis - * command. Specific response types are documented alongside each method. + *

                        Transaction Response: An array of command responses is returned by the client + * {@link RedisClusterClient#exec} command, in the order they were given. Each element in the array + * represents a command given to the {@link ClusterTransaction}. The response for each command + * depends on the executed Redis command. Specific response types are documented alongside each + * method. * * @example - *

                        - *  ClusterTransaction transaction = new ClusterTransaction();
                        - *    .set("key", "value");
                        - *    .get("key");
                        - *  ClusterValue[] result = client.exec(transaction, route).get();
                        - *  // result contains: OK and "value"
                        - *  
                        + *
                        {@code
                        + * ClusterTransaction transaction = new ClusterTransaction();
                        + *   .set("key", "value");
                        + *   .get("key");
                        + * Object[] result = client.exec(transaction).get();
                        + * // result contains: OK and "value"
                        + * }
                        */ public class ClusterTransaction extends BaseTransaction { + @Override protected ClusterTransaction getThis() { return this; @@ -36,9 +39,9 @@ protected ClusterTransaction getThis() { /** * Publishes message on pubsub channel in sharded mode. * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param message The message to publish. * @param channel The channel to publish the message on. @@ -62,10 +65,12 @@ public ClusterTransaction publish( *
                        * The sort command can be used to sort elements based on different criteria and * apply transformations on sorted elements.
                        - * To store the result into a new key, see {@link #sortStore(String, String, SortClusterOptions)}. + * To store the result into a new key, see {@link #sortStore(ArgType, ArgType, + * SortClusterOptions)}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. * @param key The key of the list, set, or sorted set to be sorted. * @param sortClusterOptions The {@link SortClusterOptions}. * @return Command Response - An Array of sorted elements. @@ -84,9 +89,10 @@ public ClusterTransaction sort( * The sortReadOnly command can be used to sort elements based on different criteria * and apply transformations on sorted elements.
                        * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException - * @since Redis 7.0 and above. + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. * @param key The key of the list, set, or sorted set to be sorted. * @param sortClusterOptions The {@link SortClusterOptions}. * @return Command Response - An Array of sorted elements. @@ -104,11 +110,12 @@ public ClusterTransaction sortReadOnly( * destination. The sort command can be used to sort elements based on * different criteria, apply transformations on sorted elements, and store the result in a new * key.
                        - * To get the sort result without storing it into a key, see {@link #sort(String, - * SortClusterOptions)} or {@link #sortReadOnly(String, SortClusterOptions)}. + * To get the sort result without storing it into a key, see {@link #sort(ArgType, + * SortClusterOptions)} or {@link #sortReadOnly(ArgType, SortClusterOptions)}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. * @param key The key of the list, set, or sorted set to be sorted. * @param destination The key where the sorted result will be stored. * @param sortClusterOptions The {@link SortClusterOptions}. diff --git a/java/client/src/main/java/glide/api/models/Transaction.java b/java/client/src/main/java/glide/api/models/Transaction.java index 0d381bb5fb..0a5d514e19 100644 --- a/java/client/src/main/java/glide/api/models/Transaction.java +++ b/java/client/src/main/java/glide/api/models/Transaction.java @@ -11,19 +11,19 @@ import static redis_request.RedisRequestOuterClass.RequestType.Sort; import static redis_request.RedisRequestOuterClass.RequestType.SortReadOnly; +import glide.api.RedisClient; import glide.api.models.commands.SortOptions; import glide.api.models.commands.scan.ScanOptions; -import lombok.AllArgsConstructor; import lombok.NonNull; /** - * Extends BaseTransaction class for Redis standalone commands. Transactions allow the execution of - * a group of commands in a single step. + * Transaction implementation for standalone {@link RedisClient}. Transactions allow the execution + * of a group of commands in a single step. * - *

                        Command Response: An array of command responses is returned by the client exec - * command, in the order they were given. Each element in the array represents a command given to - * the Transaction. The response for each command depends on the executed Redis - * command. Specific response types are documented alongside each method. + *

                        Transaction Response: An array of command responses is returned by the client + * {@link RedisClient#exec} API, in the order they were given. Each element in the array represents + * a command given to the {@link Transaction}. The response for each command depends on the executed + * Valkey command. Specific response types are documented alongside each method. * * @example *

                        {@code
                        @@ -36,15 +36,15 @@
                          * assert result[1].equals("value");
                          * }
                        */ -@AllArgsConstructor public class Transaction extends BaseTransaction { + @Override protected Transaction getThis() { return this; } /** - * Changes the currently selected Redis database. + * Changes the currently selected server database. * * @see valkey.io for details. * @param index The index of the database to select. @@ -59,6 +59,8 @@ public Transaction select(long index) { * Move key from the currently selected database to the database specified by * dbIndex. * + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for more details. * @param key The key to move. * @param dbIndex The index of the database to move key to. @@ -77,9 +79,9 @@ public Transaction move(ArgType key, long dbIndex) { * destinationDB. When replace is true, removes the destination * key first if it already exists, otherwise performs no action. * - * @since Redis 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param source The key to the source value. * @param destination The key where the value should be copied to. @@ -97,9 +99,9 @@ public Transaction copy( * destinationDB. When replace is true, removes the destination * key first if it already exists, otherwise performs no action. * - * @since Redis 6.2.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 6.2.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. * @see valkey.io for details. * @param source The key to the source value. * @param destination The key where the value should be copied to. @@ -129,8 +131,9 @@ public Transaction copy( * apply transformations on sorted elements.
                        * To store the result into a new key, see {@link #sortStore(ArgType, ArgType, SortOptions)}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. * @param key The key of the list, set, or sorted set to be sorted. * @param sortOptions The {@link SortOptions}. * @return Command Response - An Array of sorted elements. @@ -147,9 +150,10 @@ public Transaction sort(@NonNull ArgType key, @NonNull SortOptions sor * The sortReadOnly command can be used to sort elements based on different criteria * and apply transformations on sorted elements.
                        * - * @since Redis 7.0 and above. - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @since Valkey 7.0 and above. + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. * @param key The key of the list, set, or sorted set to be sorted. * @param sortOptions The {@link SortOptions}. * @return Command Response - An Array of sorted elements. @@ -169,8 +173,9 @@ public Transaction sortReadOnly( * key.
                        * To get the sort result without storing it into a key, see {@link #sort(ArgType, SortOptions)}. * - * @implNote ArgType is limited to String or GlideString, any other type will throw - * IllegalArgumentException + * @implNote {@link ArgType} is limited to {@link String} or {@link GlideString}, any other type + * will throw {@link IllegalArgumentException}. + * @see valkey.io for details. * @param key The key of the list, set, or sorted set to be sorted. * @param sortOptions The {@link SortOptions}. * @param destination The key where the sorted result will be stored. @@ -194,7 +199,7 @@ public Transaction sortStore( /** * Iterates incrementally over a database for matching keys. * - * @see valkey.io for details. + * @see valkey.io for details. * @param cursor The cursor that points to the next iteration of results. A value of "0" * indicates the start of the search. * @return Command Response - An Array of Objects. The first element is @@ -211,7 +216,7 @@ public Transaction scan(@NonNull ArgType cursor) { /** * Iterates incrementally over a database for matching keys. * - * @see valkey.io for details. + * @see valkey.io for details. * @param cursor The cursor that points to the next iteration of results. A value of "0" * indicates the start of the search. * @param options The {@link ScanOptions}. diff --git a/java/client/src/main/java/glide/api/models/ArgsBuilder.java b/java/client/src/main/java/glide/utils/ArgsBuilder.java similarity index 96% rename from java/client/src/main/java/glide/api/models/ArgsBuilder.java rename to java/client/src/main/java/glide/utils/ArgsBuilder.java index 42c65420fb..066d75a707 100644 --- a/java/client/src/main/java/glide/api/models/ArgsBuilder.java +++ b/java/client/src/main/java/glide/utils/ArgsBuilder.java @@ -1,6 +1,7 @@ /** Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0 */ -package glide.api.models; +package glide.utils; +import glide.api.models.GlideString; import java.util.ArrayList; /** diff --git a/java/client/src/test/java/glide/api/RedisClientTest.java b/java/client/src/test/java/glide/api/RedisClientTest.java index a5a9b2862b..41ae446263 100644 --- a/java/client/src/test/java/glide/api/RedisClientTest.java +++ b/java/client/src/test/java/glide/api/RedisClientTest.java @@ -282,7 +282,6 @@ import static redis_request.RedisRequestOuterClass.RequestType.ZUnion; import static redis_request.RedisRequestOuterClass.RequestType.ZUnionStore; -import glide.api.models.ArgsBuilder; import glide.api.models.GlideString; import glide.api.models.Script; import glide.api.models.Transaction; @@ -358,6 +357,7 @@ import glide.api.models.commands.stream.StreamTrimOptions.MaxLen; import glide.api.models.commands.stream.StreamTrimOptions.MinId; import glide.managers.CommandManager; +import glide.utils.ArgsBuilder; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; diff --git a/java/integTest/src/test/java/glide/cluster/ClusterTransactionTests.java b/java/integTest/src/test/java/glide/cluster/ClusterTransactionTests.java index 1ef1c87d3d..54e8d2d9d1 100644 --- a/java/integTest/src/test/java/glide/cluster/ClusterTransactionTests.java +++ b/java/integTest/src/test/java/glide/cluster/ClusterTransactionTests.java @@ -5,6 +5,7 @@ import static glide.TestUtilities.assertDeepEquals; import static glide.TestUtilities.generateLuaLibCode; import static glide.api.BaseClient.OK; +import static glide.api.models.GlideString.gs; import static glide.api.models.commands.SortBaseOptions.OrderBy.DESC; import static glide.api.models.configuration.RequestRoutingConfiguration.SimpleMultiNodeRoute.ALL_PRIMARIES; import static glide.api.models.configuration.RequestRoutingConfiguration.SimpleSingleNodeRoute.RANDOM; @@ -355,9 +356,7 @@ public void test_transaction_function_dump_restore() { clusterClient.functionLoad(code, true).get(); // Verify functionDump - ClusterTransaction transaction = new ClusterTransaction(); - transaction.withBinarySafeOutput(); - transaction.functionDump(); + ClusterTransaction transaction = new ClusterTransaction().withBinaryOutput().functionDump(); Object[] result = clusterClient.exec(transaction).get(); GlideString payload = (GlideString) (result[0]); @@ -424,4 +423,24 @@ public void test_transaction_xinfoStream() { }, results); } + + @SneakyThrows + @Test + public void binary_strings() { + String key = UUID.randomUUID().toString(); + clusterClient.set(key, "_").get(); + // use dump to ensure that we have non-string convertible bytes + var bytes = clusterClient.dump(gs(key)).get(); + + var transaction = + new ClusterTransaction().withBinaryOutput().set(gs(key), gs(bytes)).get(gs(key)); + + var responses = clusterClient.exec(transaction).get(); + + assertDeepEquals( + new Object[] { + OK, gs(bytes), + }, + responses); + } } diff --git a/java/integTest/src/test/java/glide/standalone/TransactionTests.java b/java/integTest/src/test/java/glide/standalone/TransactionTests.java index 80e247408a..3cf1d664c7 100644 --- a/java/integTest/src/test/java/glide/standalone/TransactionTests.java +++ b/java/integTest/src/test/java/glide/standalone/TransactionTests.java @@ -560,9 +560,7 @@ public void scan_binary_test() { GlideString cursor = gs("0"); Object[] keysFound = new Object[0]; do { - Transaction transaction = new Transaction(); - transaction.withBinarySafeOutput(); - transaction.scan(cursor); + Transaction transaction = new Transaction().withBinaryOutput().scan(cursor); Object[] results = client.exec(transaction).get(); cursor = (GlideString) ((Object[]) results[0])[0]; keysFound = ArrayUtils.addAll(keysFound, (Object[]) ((Object[]) results[0])[1]); @@ -634,8 +632,7 @@ public void scan_with_options_test() { @Test public void scan_binary_with_options_test() { // setup - Transaction setupTransaction = new Transaction(); - setupTransaction.withBinarySafeOutput(); + Transaction setupTransaction = new Transaction().withBinaryOutput(); Map typeKeys = Map.of( @@ -664,9 +661,7 @@ HASH, gs("{hash}-" + UUID.randomUUID()), GlideString cursor = initialCursor; Object[] keysFound = new Object[0]; do { - Transaction transaction = new Transaction(); - transaction.withBinarySafeOutput(); - transaction.scan(cursor, options); + Transaction transaction = new Transaction().withBinaryOutput().scan(cursor, options); Object[] results = client.exec(transaction).get(); cursor = (GlideString) ((Object[]) results[0])[0]; keysFound = ArrayUtils.addAll(keysFound, (Object[]) ((Object[]) results[0])[1]); @@ -681,9 +676,7 @@ HASH, gs("{hash}-" + UUID.randomUUID()), cursor = initialCursor; keysFound = new Object[0]; do { - Transaction transaction = new Transaction(); - transaction.withBinarySafeOutput(); - transaction.scan(cursor, options); + Transaction transaction = new Transaction().withBinaryOutput().scan(cursor, options); Object[] results = client.exec(transaction).get(); cursor = (GlideString) ((Object[]) results[0])[0]; keysFound = ArrayUtils.addAll(keysFound, (Object[]) ((Object[]) results[0])[1]); @@ -706,9 +699,7 @@ public void test_transaction_dump_restore() { assertEquals(OK, client.set(key1, gs(value)).get()); // Verify dump - Transaction transaction = new Transaction(); - transaction.withBinarySafeOutput(); - transaction.dump(key1); + Transaction transaction = new Transaction().withBinaryOutput().dump(key1); Object[] result = client.exec(transaction).get(); GlideString payload = (GlideString) (result[0]); @@ -733,9 +724,7 @@ public void test_transaction_function_dump_restore() { client.functionLoad(code, true).get(); // Verify functionDump - Transaction transaction = new Transaction(); - transaction.withBinarySafeOutput(); - transaction.functionDump(); + Transaction transaction = new Transaction().withBinaryOutput().functionDump(); Object[] result = client.exec(transaction).get(); GlideString payload = (GlideString) (result[0]); @@ -799,4 +788,23 @@ public void test_transaction_xinfoStream() { }, results); } + + @SneakyThrows + @Test + public void binary_strings() { + String key = UUID.randomUUID().toString(); + client.set(key, "_").get(); + // use dump to ensure that we have non-string convertible bytes + var bytes = client.dump(gs(key)).get(); + + var transaction = new Transaction().withBinaryOutput().set(gs(key), gs(bytes)).get(gs(key)); + + var responses = client.exec(transaction).get(); + + assertDeepEquals( + new Object[] { + OK, gs(bytes), + }, + responses); + } }