Class BaseClient
- java.lang.Object
-
- glide.api.BaseClient
-
- All Implemented Interfaces:
BitmapBaseCommands,GenericBaseCommands,GeospatialIndicesBaseCommands,HashBaseCommands,HyperLogLogBaseCommands,ListBaseCommands,PubSubBaseCommands,ScriptingAndFunctionsBaseCommands,SetBaseCommands,SortedSetBaseCommands,StreamBaseCommands,StringBaseCommands,TransactionsBaseCommands,java.lang.AutoCloseable
- Direct Known Subclasses:
GlideClient,GlideClusterClient
public abstract class BaseClient extends java.lang.Object implements java.lang.AutoCloseable, BitmapBaseCommands, GenericBaseCommands, StringBaseCommands, HashBaseCommands, ListBaseCommands, SetBaseCommands, SortedSetBaseCommands, StreamBaseCommands, HyperLogLogBaseCommands, GeospatialIndicesBaseCommands, ScriptingAndFunctionsBaseCommands, TransactionsBaseCommands, PubSubBaseCommands
Base Client class
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classBaseClient.ClientBuilderAuxiliary builder which wraps all fieldsstatic classBaseClient.ResponseFlags
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCANCEL_VALKEY_APIprotected CommandManagercommandManagerprotected ConnectionManagerconnectionManagerstatic java.lang.StringCOUNT_FOR_LIST_VALKEY_APIstatic java.lang.StringCOUNT_VALKEY_APIprotected static GlideString[]EMPTY_GLIDE_STRING_ARRAYprotected static java.lang.String[]EMPTY_STRING_ARRAYstatic java.lang.StringIDX_COMMAND_STRINGstatic java.lang.StringLCS_MATCHES_RESULT_KEYstatic java.lang.StringLEN_VALKEY_APIstatic java.lang.StringLIMIT_VALKEY_APIprotected MessageHandlermessageHandlerstatic java.lang.StringMINMATCHLEN_COMMAND_STRINGstatic java.lang.StringOKValkey simple string response with "OK"static java.lang.StringREPLACE_VALKEY_APIprotected static java.lang.StringSCHEDULE_VALKEY_APIstatic java.lang.StringSET_LIMIT_VALKEY_APIprotected java.util.Optional<BaseSubscriptionConfiguration>subscriptionConfigurationstatic java.lang.StringWITH_SCORE_VALKEY_APIstatic java.lang.StringWITH_SCORES_VALKEY_APIstatic java.lang.StringWITH_VALUES_VALKEY_APIstatic java.lang.StringWITHMATCHLEN_COMMAND_STRING-
Fields inherited from interface glide.api.commands.GenericBaseCommands
DB_VALKEY_API
-
Fields inherited from interface glide.api.commands.HashBaseCommands
FIELDS_VALKEY_API
-
Fields inherited from interface glide.api.commands.PubSubBaseCommands
ALL_CHANNELS, ALL_PATTERNS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseClient(BaseClient.ClientBuilder builder)Constructor for client initialization
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void__enqueuePubSubMessage(PubSubMessage message)Internal method for enqueueing PubSub messages from native callback.java.util.concurrent.CompletableFuture<java.lang.String[]>aclCat()java.util.concurrent.CompletableFuture<java.lang.String[]>aclCat(java.lang.String category)java.util.concurrent.CompletableFuture<java.lang.Long>aclDelUser(java.lang.String[] usernames)java.util.concurrent.CompletableFuture<java.lang.String>aclDryRun(java.lang.String username, java.lang.String command, java.lang.String[] args)java.util.concurrent.CompletableFuture<java.lang.String>aclGenPass()java.util.concurrent.CompletableFuture<java.lang.String>aclGenPass(int bits)java.util.concurrent.CompletableFuture<java.lang.Object>aclGetUser(java.lang.String username)java.util.concurrent.CompletableFuture<java.lang.String[]>aclList()java.util.concurrent.CompletableFuture<java.lang.String>aclLoad()java.util.concurrent.CompletableFuture<java.lang.Object[]>aclLog()java.util.concurrent.CompletableFuture<java.lang.Object[]>aclLog(int count)java.util.concurrent.CompletableFuture<java.lang.String>aclSave()java.util.concurrent.CompletableFuture<java.lang.String>aclSetUser(java.lang.String username, java.lang.String[] rules)java.util.concurrent.CompletableFuture<java.lang.String[]>aclUsers()java.util.concurrent.CompletableFuture<java.lang.String>aclWhoami()java.util.concurrent.CompletableFuture<java.lang.Long>append(@NonNull GlideString key, @NonNull GlideString value)Appends avalueto akey.java.util.concurrent.CompletableFuture<java.lang.Long>append(@NonNull java.lang.String key, @NonNull java.lang.String value)Appends avalueto akey.java.util.concurrent.CompletableFuture<java.lang.Long>bitcount(@NonNull GlideString key)Counts the number of set bits (population counting) in a string stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>bitcount(@NonNull GlideString key, long start)Counts the number of set bits (population counting) in a string stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>bitcount(@NonNull GlideString key, long start, long end)Counts the number of set bits (population counting) in a string stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>bitcount(@NonNull GlideString key, long start, long end, @NonNull BitmapIndexType options)Counts the number of set bits (population counting) in a string stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>bitcount(@NonNull java.lang.String key)Counts the number of set bits (population counting) in a string stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>bitcount(@NonNull java.lang.String key, long start)Counts the number of set bits (population counting) in a string stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>bitcount(@NonNull java.lang.String key, long start, long end)Counts the number of set bits (population counting) in a string stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>bitcount(@NonNull java.lang.String key, long start, long end, @NonNull BitmapIndexType options)Counts the number of set bits (population counting) in a string stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long[]>bitfield(@NonNull GlideString key, @NonNull BitFieldOptions.BitFieldSubCommands[] subCommands)Reads or modifies the array of bits representing the string that is held atkeybased on the specifiedsubCommands.java.util.concurrent.CompletableFuture<java.lang.Long[]>bitfield(@NonNull java.lang.String key, @NonNull BitFieldOptions.BitFieldSubCommands[] subCommands)Reads or modifies the array of bits representing the string that is held atkeybased on the specifiedsubCommands.java.util.concurrent.CompletableFuture<java.lang.Long[]>bitfieldReadOnly(@NonNull GlideString key, @NonNull BitFieldOptions.BitFieldReadOnlySubCommands[] subCommands)Reads the array of bits representing the string that is held atkeybased on the specifiedsubCommands.
This command is routed depending on the client'sReadFromstrategy.java.util.concurrent.CompletableFuture<java.lang.Long[]>bitfieldReadOnly(@NonNull java.lang.String key, @NonNull BitFieldOptions.BitFieldReadOnlySubCommands[] subCommands)Reads the array of bits representing the string that is held atkeybased on the specifiedsubCommands.
This command is routed depending on the client'sReadFromstrategy.java.util.concurrent.CompletableFuture<java.lang.Long>bitop(@NonNull BitwiseOperation bitwiseOperation, @NonNull GlideString destination, @NonNull GlideString[] keys)Perform a bitwise operation between multiple keys (containing string values) and store the result in thedestination.java.util.concurrent.CompletableFuture<java.lang.Long>bitop(@NonNull BitwiseOperation bitwiseOperation, @NonNull java.lang.String destination, @NonNull java.lang.String[] keys)Perform a bitwise operation between multiple keys (containing string values) and store the result in thedestination.java.util.concurrent.CompletableFuture<java.lang.Long>bitpos(@NonNull GlideString key, long bit)Returns the position of the first bit matching the givenbitvalue.java.util.concurrent.CompletableFuture<java.lang.Long>bitpos(@NonNull GlideString key, long bit, long start)Returns the position of the first bit matching the givenbitvalue.java.util.concurrent.CompletableFuture<java.lang.Long>bitpos(@NonNull GlideString key, long bit, long start, long end)Returns the position of the first bit matching the givenbitvalue.java.util.concurrent.CompletableFuture<java.lang.Long>bitpos(@NonNull GlideString key, long bit, long start, long end, @NonNull BitmapIndexType options)Returns the position of the first bit matching the givenbitvalue.java.util.concurrent.CompletableFuture<java.lang.Long>bitpos(@NonNull java.lang.String key, long bit)Returns the position of the first bit matching the givenbitvalue.java.util.concurrent.CompletableFuture<java.lang.Long>bitpos(@NonNull java.lang.String key, long bit, long start)Returns the position of the first bit matching the givenbitvalue.java.util.concurrent.CompletableFuture<java.lang.Long>bitpos(@NonNull java.lang.String key, long bit, long start, long end)Returns the position of the first bit matching the givenbitvalue.java.util.concurrent.CompletableFuture<java.lang.Long>bitpos(@NonNull java.lang.String key, long bit, long start, long end, @NonNull BitmapIndexType options)Returns the position of the first bit matching the givenbitvalue.java.util.concurrent.CompletableFuture<GlideString>blmove(@NonNull GlideString source, @NonNull GlideString destination, @NonNull ListDirection wherefrom, @NonNull ListDirection whereto, double timeout)Blocks the connection until it pops atomically and removes the left/right-most element to the list stored atsourcedepending onwherefrom, and pushes the element at the first/last element of the list stored atdestinationdepending onwherefrom.
BLMoveis the blocking variant ofListBaseCommands.lmove(String, String, ListDirection, ListDirection).java.util.concurrent.CompletableFuture<java.lang.String>blmove(@NonNull java.lang.String source, @NonNull java.lang.String destination, @NonNull ListDirection wherefrom, @NonNull ListDirection whereto, double timeout)Blocks the connection until it pops atomically and removes the left/right-most element to the list stored atsourcedepending onwherefrom, and pushes the element at the first/last element of the list stored atdestinationdepending onwherefrom.
BLMoveis the blocking variant ofListBaseCommands.lmove(String, String, ListDirection, ListDirection).java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[]>>blmpop(@NonNull GlideString[] keys, @NonNull ListDirection direction, double timeout)Blocks the connection until it pops one element from the first non-empty list from the providedkeysBLMPOPis the blocking variant ofListBaseCommands.lmpop(String[], ListDirection).java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[]>>blmpop(@NonNull GlideString[] keys, @NonNull ListDirection direction, long count, double timeout)Blocks the connection until it pops one or more elements from the first non-empty list from the providedkeysBLMPOPis the blocking variant ofListBaseCommands.lmpop(String[], ListDirection, long).java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[]>>blmpop(@NonNull java.lang.String[] keys, @NonNull ListDirection direction, double timeout)Blocks the connection until it pops one element from the first non-empty list from the providedkeysBLMPOPis the blocking variant ofListBaseCommands.lmpop(String[], ListDirection).java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[]>>blmpop(@NonNull java.lang.String[] keys, @NonNull ListDirection direction, long count, double timeout)Blocks the connection until it pops one or more elements from the first non-empty list from the providedkeysBLMPOPis the blocking variant ofListBaseCommands.lmpop(String[], ListDirection, long).java.util.concurrent.CompletableFuture<GlideString[]>blpop(@NonNull GlideString[] keys, double timeout)Pops an element from the head of the first list that is non-empty, with the givenkeysbeing checked in the order that they are given.
Blocks the connection when there are no elements to pop from any of the given lists.java.util.concurrent.CompletableFuture<java.lang.String[]>blpop(@NonNull java.lang.String[] keys, double timeout)Pops an element from the head of the first list that is non-empty, with the givenkeysbeing checked in the order that they are given.
Blocks the connection when there are no elements to pop from any of the given lists.java.util.concurrent.CompletableFuture<GlideString[]>brpop(@NonNull GlideString[] keys, double timeout)Pops an element from the tail of the first list that is non-empty, with the givenkeysbeing checked in the order that they are given.
Blocks the connection when there are no elements to pop from any of the given lists.java.util.concurrent.CompletableFuture<java.lang.String[]>brpop(@NonNull java.lang.String[] keys, double timeout)Pops an element from the tail of the first list that is non-empty, with the givenkeysbeing checked in the order that they are given.
Blocks the connection when there are no elements to pop from any of the given lists.protected static CommandManagerbuildCommandManager(ConnectionManager connectionManager)Build CommandManager for native clientprotected static ConnectionManagerbuildConnectionManager()Build ConnectionManager for native clientprotected static MessageHandlerbuildMessageHandler(BaseClientConfiguration config)Build MessageHandler for native clientjava.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>>bzmpop(@NonNull GlideString[] keys, @NonNull ScoreFilter modifier, double timeout)Blocks the connection until it pops and returns a member-score pair from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZMPOPis the blocking variant ofSortedSetBaseCommands.zmpop(String[], ScoreFilter).java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>>bzmpop(@NonNull GlideString[] keys, @NonNull ScoreFilter modifier, double timeout, long count)Blocks the connection until it pops and returns multiple member-score pairs from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZMPOPis the blocking variant ofSortedSetBaseCommands.zmpop(String[], ScoreFilter, long).java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>bzmpop(@NonNull java.lang.String[] keys, @NonNull ScoreFilter modifier, double timeout)Blocks the connection until it pops and returns a member-score pair from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZMPOPis the blocking variant ofSortedSetBaseCommands.zmpop(String[], ScoreFilter).java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>bzmpop(@NonNull java.lang.String[] keys, @NonNull ScoreFilter modifier, double timeout, long count)Blocks the connection until it pops and returns multiple member-score pairs from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZMPOPis the blocking variant ofSortedSetBaseCommands.zmpop(String[], ScoreFilter, long).java.util.concurrent.CompletableFuture<java.lang.Object[]>bzpopmax(@NonNull GlideString[] keys, double timeout)Blocks the connection until it removes and returns a member with the highest score from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZPOPMAXis the blocking variant ofSortedSetBaseCommands.zpopmax(String).java.util.concurrent.CompletableFuture<java.lang.Object[]>bzpopmax(@NonNull java.lang.String[] keys, double timeout)Blocks the connection until it removes and returns a member with the highest score from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZPOPMAXis the blocking variant ofSortedSetBaseCommands.zpopmax(String).java.util.concurrent.CompletableFuture<java.lang.Object[]>bzpopmin(@NonNull GlideString[] keys, double timeout)Blocks the connection until it removes and returns a member with the lowest score from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZPOPMINis the blocking variant ofSortedSetBaseCommands.zpopmin(String).java.util.concurrent.CompletableFuture<java.lang.Object[]>bzpopmin(@NonNull java.lang.String[] keys, double timeout)Blocks the connection until it removes and returns a member with the lowest score from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZPOPMINis the blocking variant ofSortedSetBaseCommands.zpopmin(String).voidclose()Closes this resource, relinquishing any underlying resources.java.util.concurrent.CompletableFuture<java.lang.Boolean>copy(@NonNull GlideString source, @NonNull GlideString destination)Copies the value stored at thesourceto thedestinationkey if thedestinationkey does not yet exist.java.util.concurrent.CompletableFuture<java.lang.Boolean>copy(@NonNull GlideString source, @NonNull GlideString destination, boolean replace)Copies the value stored at thesourceto thedestinationkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>copy(@NonNull GlideString source, @NonNull GlideString destination, long destinationDB)Copies the value stored at thesourceto thedestinationkey ondestinationDB.java.util.concurrent.CompletableFuture<java.lang.Boolean>copy(@NonNull GlideString source, @NonNull GlideString destination, long destinationDB, boolean replace)Copies the value stored at thesourceto thedestinationkey ondestinationDB.java.util.concurrent.CompletableFuture<java.lang.Boolean>copy(@NonNull java.lang.String source, @NonNull java.lang.String destination)Copies the value stored at thesourceto thedestinationkey if thedestinationkey does not yet exist.java.util.concurrent.CompletableFuture<java.lang.Boolean>copy(@NonNull java.lang.String source, @NonNull java.lang.String destination, boolean replace)Copies the value stored at thesourceto thedestinationkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>copy(@NonNull java.lang.String source, @NonNull java.lang.String destination, long destinationDB)Copies the value stored at thesourceto thedestinationkey ondestinationDB.java.util.concurrent.CompletableFuture<java.lang.Boolean>copy(@NonNull java.lang.String source, @NonNull java.lang.String destination, long destinationDB, boolean replace)Copies the value stored at thesourceto thedestinationkey ondestinationDB.protected static <T extends BaseClient>
java.util.concurrent.CompletableFuture<T>createClient(@NonNull BaseClientConfiguration config, java.util.function.Function<BaseClient.ClientBuilder,T> constructor)Create native clientjava.util.concurrent.CompletableFuture<java.lang.Long>decr(@NonNull GlideString key)Decrements the number stored atkeyby one.java.util.concurrent.CompletableFuture<java.lang.Long>decr(@NonNull java.lang.String key)Decrements the number stored atkeyby one.java.util.concurrent.CompletableFuture<java.lang.Long>decrBy(@NonNull GlideString key, long amount)Decrements the number stored atkeybyamount.java.util.concurrent.CompletableFuture<java.lang.Long>decrBy(@NonNull java.lang.String key, long amount)Decrements the number stored atkeybyamount.java.util.concurrent.CompletableFuture<java.lang.Long>del(@NonNull GlideString[] keys)Removes the specifiedkeysfrom the database.java.util.concurrent.CompletableFuture<java.lang.Long>del(@NonNull java.lang.String[] keys)Removes the specifiedkeysfrom the database.java.util.concurrent.CompletableFuture<byte[]>dump(@NonNull GlideString key)Serialize the value stored atkeyin a Valkey-specific format and return it to the user.java.util.concurrent.CompletableFuture<java.lang.Object>evalReadOnly(@NonNull GlideString script)Executes a read-only Lua script.
This command is routed depending on the client'sReadFromstrategy.java.util.concurrent.CompletableFuture<java.lang.Object>evalReadOnly(@NonNull GlideString script, @NonNull GlideString[] keys, @NonNull GlideString[] args)Executes a read-only Lua script with keys and arguments.
This command is routed depending on the client'sReadFromstrategy.java.util.concurrent.CompletableFuture<java.lang.Object>evalReadOnly(@NonNull java.lang.String script)Executes a read-only Lua script.
This command is routed depending on the client'sReadFromstrategy.java.util.concurrent.CompletableFuture<java.lang.Object>evalReadOnly(@NonNull java.lang.String script, @NonNull java.lang.String[] keys, @NonNull java.lang.String[] args)Executes a read-only Lua script with keys and arguments.
This command is routed depending on the client'sReadFromstrategy.java.util.concurrent.CompletableFuture<java.lang.Object>evalshaReadOnly(@NonNull GlideString sha1)Executes a read-only Lua script by its SHA1 digest.
This command is routed depending on the client'sReadFromstrategy.java.util.concurrent.CompletableFuture<java.lang.Object>evalshaReadOnly(@NonNull GlideString sha1, @NonNull GlideString[] keys, @NonNull GlideString[] args)Executes a read-only Lua script by its SHA1 digest with keys and arguments.
This command is routed depending on the client'sReadFromstrategy.java.util.concurrent.CompletableFuture<java.lang.Object>evalshaReadOnly(@NonNull java.lang.String sha1)Executes a read-only Lua script by its SHA1 digest.
This command is routed depending on the client'sReadFromstrategy.java.util.concurrent.CompletableFuture<java.lang.Object>evalshaReadOnly(@NonNull java.lang.String sha1, @NonNull java.lang.String[] keys, @NonNull java.lang.String[] args)Executes a read-only Lua script by its SHA1 digest with keys and arguments.
This command is routed depending on the client'sReadFromstrategy.java.util.concurrent.CompletableFuture<java.lang.Long>exists(@NonNull GlideString[] keys)Returns the number of keys inkeysthat exist in the database.java.util.concurrent.CompletableFuture<java.lang.Long>exists(@NonNull java.lang.String[] keys)Returns the number of keys inkeysthat exist in the database.java.util.concurrent.CompletableFuture<java.lang.Boolean>expire(@NonNull GlideString key, long seconds)Sets a timeout onkeyin seconds.java.util.concurrent.CompletableFuture<java.lang.Boolean>expire(@NonNull GlideString key, long seconds, @NonNull ExpireOptions expireOptions)Sets a timeout onkeyin seconds.java.util.concurrent.CompletableFuture<java.lang.Boolean>expire(@NonNull java.lang.String key, long seconds)Sets a timeout onkeyin seconds.java.util.concurrent.CompletableFuture<java.lang.Boolean>expire(@NonNull java.lang.String key, long seconds, @NonNull ExpireOptions expireOptions)Sets a timeout onkeyin seconds.java.util.concurrent.CompletableFuture<java.lang.Boolean>expireAt(@NonNull GlideString key, long unixSeconds)Sets a timeout onkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>expireAt(@NonNull GlideString key, long unixSeconds, @NonNull ExpireOptions expireOptions)Sets a timeout onkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>expireAt(@NonNull java.lang.String key, long unixSeconds)Sets a timeout onkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>expireAt(@NonNull java.lang.String key, long unixSeconds, @NonNull ExpireOptions expireOptions)Sets a timeout onkey.java.util.concurrent.CompletableFuture<java.lang.Long>expiretime(@NonNull GlideString key)Returns the absolute Unix timestamp (since January 1, 1970) at which the givenkeywill expire, in seconds.
To get the expiration with millisecond precision, useGenericBaseCommands.pexpiretime(String).java.util.concurrent.CompletableFuture<java.lang.Long>expiretime(@NonNull java.lang.String key)Returns the absolute Unix timestamp (since January 1, 1970) at which the givenkeywill expire, in seconds.
To get the expiration with millisecond precision, useGenericBaseCommands.pexpiretime(String).java.util.concurrent.CompletableFuture<java.lang.Object>fcall(@NonNull GlideString function, @NonNull GlideString[] keys, @NonNull GlideString[] arguments)Invokes a previously loaded function.
This command is routed to primary nodes only.
To route to a replica please refer toScriptingAndFunctionsBaseCommands.fcallReadOnly(java.lang.String, java.lang.String[], java.lang.String[]).java.util.concurrent.CompletableFuture<java.lang.Object>fcall(@NonNull java.lang.String function, @NonNull java.lang.String[] keys, @NonNull java.lang.String[] arguments)Invokes a previously loaded function.
This command is routed to primary nodes only.
To route to a replica please refer toScriptingAndFunctionsBaseCommands.fcallReadOnly(java.lang.String, java.lang.String[], java.lang.String[]).java.util.concurrent.CompletableFuture<java.lang.Object>fcallReadOnly(@NonNull GlideString function, @NonNull GlideString[] keys, @NonNull GlideString[] arguments)Invokes a previously loaded read-only function.
This command is routed depending on the client'sReadFromstrategy.java.util.concurrent.CompletableFuture<java.lang.Object>fcallReadOnly(@NonNull java.lang.String function, @NonNull java.lang.String[] keys, @NonNull java.lang.String[] arguments)Invokes a previously loaded read-only function.
This command is routed depending on the client'sReadFromstrategy.java.util.concurrent.CompletableFuture<java.lang.Long>geoadd(@NonNull GlideString key, @NonNull java.util.Map<GlideString,GeospatialData> membersToGeospatialData)Adds geospatial members with their positions to the specified sorted set stored atkey.
If a member is already a part of the sorted set, its position is updated.
To perform ageoaddoperation while specifying optional parameters, useGeospatialIndicesBaseCommands.geoadd(String, Map, GeoAddOptions).java.util.concurrent.CompletableFuture<java.lang.Long>geoadd(@NonNull GlideString key, @NonNull java.util.Map<GlideString,GeospatialData> membersToGeospatialData, @NonNull GeoAddOptions options)Adds geospatial members with their positions to the specified sorted set stored atkey.
If a member is already a part of the sorted set, its position is updated.java.util.concurrent.CompletableFuture<java.lang.Long>geoadd(@NonNull java.lang.String key, @NonNull java.util.Map<java.lang.String,GeospatialData> membersToGeospatialData)Adds geospatial members with their positions to the specified sorted set stored atkey.
If a member is already a part of the sorted set, its position is updated.
To perform ageoaddoperation while specifying optional parameters, useGeospatialIndicesBaseCommands.geoadd(String, Map, GeoAddOptions).java.util.concurrent.CompletableFuture<java.lang.Long>geoadd(@NonNull java.lang.String key, @NonNull java.util.Map<java.lang.String,GeospatialData> membersToGeospatialData, @NonNull GeoAddOptions options)Adds geospatial members with their positions to the specified sorted set stored atkey.
If a member is already a part of the sorted set, its position is updated.java.util.concurrent.CompletableFuture<java.lang.Double>geodist(@NonNull GlideString key, @NonNull GlideString member1, @NonNull GlideString member2)Returns the distance betweenmember1andmember2saved in the geospatial index stored atkey.java.util.concurrent.CompletableFuture<java.lang.Double>geodist(@NonNull GlideString key, @NonNull GlideString member1, @NonNull GlideString member2, @NonNull GeoUnit geoUnit)Returns the distance betweenmember1andmember2saved in the geospatial index stored atkey.java.util.concurrent.CompletableFuture<java.lang.Double>geodist(@NonNull java.lang.String key, @NonNull java.lang.String member1, @NonNull java.lang.String member2)Returns the distance betweenmember1andmember2saved in the geospatial index stored atkey.java.util.concurrent.CompletableFuture<java.lang.Double>geodist(@NonNull java.lang.String key, @NonNull java.lang.String member1, @NonNull java.lang.String member2, @NonNull GeoUnit geoUnit)Returns the distance betweenmember1andmember2saved in the geospatial index stored atkey.java.util.concurrent.CompletableFuture<GlideString[]>geohash(@NonNull GlideString key, @NonNull GlideString[] members)Returns theGeoHashstrings representing the positions of all the specifiedmembersin the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.lang.String[]>geohash(@NonNull java.lang.String key, @NonNull java.lang.String[] members)Returns theGeoHashstrings representing the positions of all the specifiedmembersin the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Double[][]>geopos(@NonNull GlideString key, @NonNull GlideString[] members)Returns the positions (longitude,latitude) of all the specifiedmembersof the geospatial index represented by the sorted set atkey.java.util.concurrent.CompletableFuture<java.lang.Double[][]>geopos(@NonNull java.lang.String key, @NonNull java.lang.String[] members)Returns the positions (longitude,latitude) of all the specifiedmembersof the geospatial index represented by the sorted set atkey.java.util.concurrent.CompletableFuture<GlideString[]>geosearch(@NonNull GlideString key, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy)Returns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.java.util.concurrent.CompletableFuture<java.lang.Object[]>geosearch(@NonNull GlideString key, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchOptions options)Returns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.java.util.concurrent.CompletableFuture<java.lang.Object[]>geosearch(@NonNull GlideString key, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchOptions options, @NonNull GeoSearchResultOptions resultOptions)Returns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.java.util.concurrent.CompletableFuture<GlideString[]>geosearch(@NonNull GlideString key, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchResultOptions resultOptions)Returns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.java.util.concurrent.CompletableFuture<java.lang.String[]>geosearch(@NonNull java.lang.String key, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy)Returns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.java.util.concurrent.CompletableFuture<java.lang.Object[]>geosearch(@NonNull java.lang.String key, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchOptions options)Returns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.java.util.concurrent.CompletableFuture<java.lang.Object[]>geosearch(@NonNull java.lang.String key, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchOptions options, @NonNull GeoSearchResultOptions resultOptions)Returns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.java.util.concurrent.CompletableFuture<java.lang.String[]>geosearch(@NonNull java.lang.String key, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchResultOptions resultOptions)Returns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.java.util.concurrent.CompletableFuture<java.lang.Long>geosearchstore(@NonNull GlideString destination, @NonNull GlideString source, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy)Searches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>geosearchstore(@NonNull GlideString destination, @NonNull GlideString source, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchResultOptions resultOptions)Searches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>geosearchstore(@NonNull GlideString destination, @NonNull GlideString source, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchStoreOptions options)Searches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>geosearchstore(@NonNull GlideString destination, @NonNull GlideString source, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchStoreOptions options, @NonNull GeoSearchResultOptions resultOptions)Searches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>geosearchstore(@NonNull java.lang.String destination, @NonNull java.lang.String source, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy)Searches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>geosearchstore(@NonNull java.lang.String destination, @NonNull java.lang.String source, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchResultOptions resultOptions)Searches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>geosearchstore(@NonNull java.lang.String destination, @NonNull java.lang.String source, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchStoreOptions options)Searches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>geosearchstore(@NonNull java.lang.String destination, @NonNull java.lang.String source, GeoSearchOrigin.SearchOrigin searchFrom, @NonNull GeoSearchShape searchBy, @NonNull GeoSearchStoreOptions options, @NonNull GeoSearchResultOptions resultOptions)Searches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination.java.util.concurrent.CompletableFuture<GlideString>get(@NonNull GlideString key)Gets the value associated with the givenkey, ornullif no suchkeyexists.java.util.concurrent.CompletableFuture<java.lang.String>get(@NonNull java.lang.String key)Gets the value associated with the givenkey, ornullif no suchkeyexists.java.util.concurrent.CompletableFuture<java.lang.Long>getbit(@NonNull GlideString key, long offset)Returns the bit value atoffsetin the string value stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>getbit(@NonNull java.lang.String key, long offset)Returns the bit value atoffsetin the string value stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>getCacheEntryCount()Get the current number of entries in the cache.java.util.concurrent.CompletableFuture<java.lang.Long>getCacheEvictions()Get the total number of cache evictions.java.util.concurrent.CompletableFuture<java.lang.Long>getCacheExpirations()Get the total number of cache expirations.java.util.concurrent.CompletableFuture<java.lang.Double>getCacheHitRate()Get the cache hit rate metric.java.util.concurrent.CompletableFuture<java.lang.Double>getCacheMissRate()Get the cache miss rate metric.java.util.concurrent.CompletableFuture<java.lang.Long>getCacheTotalLookups()Get the total number of cache lookups (hits + misses).java.lang.StringgetClientInfo()Get client information from the native layer.java.util.concurrent.CompletableFuture<GlideString>getdel(@NonNull GlideString key)Gets a string value associated with the givenkeyand deletes the key.java.util.concurrent.CompletableFuture<java.lang.String>getdel(@NonNull java.lang.String key)Gets a string value associated with the givenkeyand deletes the key.java.util.concurrent.CompletableFuture<GlideString>getex(@NonNull GlideString key)Gets the value associated with the givenkey.java.util.concurrent.CompletableFuture<GlideString>getex(@NonNull GlideString key, @NonNull GetExOptions options)Gets the value associated with the givenkey.java.util.concurrent.CompletableFuture<java.lang.String>getex(@NonNull java.lang.String key)Gets the value associated with the givenkey.java.util.concurrent.CompletableFuture<java.lang.String>getex(@NonNull java.lang.String key, @NonNull GetExOptions options)Gets the value associated with the givenkey.java.util.concurrent.CompletableFuture<PubSubMessage>getPubSubMessage()Returns a promise for a next pubsub message.
Message gets unrecoverable lost if future is cancelled or reference to this future is lost.java.util.concurrent.CompletableFuture<GlideString>getrange(@NonNull GlideString key, int start, int end)Returns the subGlideString of the GlideString value stored atkey, determined by the offsetsstartandend(both are inclusive).java.util.concurrent.CompletableFuture<java.lang.String>getrange(@NonNull java.lang.String key, int start, int end)Returns the substring of the string value stored atkey, determined by the offsetsstartandend(both are inclusive).java.util.Map<java.lang.String,java.lang.String>getStatistics()Return a statisticsprotected java.lang.Object[]handleArrayOrNullResponse(ResponseOuterClass.Response response)protected java.lang.Object[]handleArrayOrNullResponseBinary(ResponseOuterClass.Response response)protected java.lang.Object[]handleArrayResponse(ResponseOuterClass.Response response)protected java.lang.Object[]handleArrayResponseBinary(ResponseOuterClass.Response response)protected java.lang.ObjecthandleBinaryObjectOrNullResponse(ResponseOuterClass.Response response)protected java.util.Map<java.lang.String,GlideString[]>handleBinaryStringMapOfArraysResponse(ResponseOuterClass.Response response)protected <V> java.util.Map<GlideString,V>handleBinaryStringMapOrNullResponse(ResponseOuterClass.Response response)protected <V> java.util.Map<GlideString,V>handleBinaryStringMapResponse(ResponseOuterClass.Response response)Get a map and convertMapkeys frombyte[]toString.protected java.lang.BooleanhandleBooleanResponse(ResponseOuterClass.Response response)protected byte[]handleBytesOrNullResponse(ResponseOuterClass.Response response)protected java.lang.DoublehandleDoubleOrNullResponse(ResponseOuterClass.Response response)protected java.lang.DoublehandleDoubleResponse(ResponseOuterClass.Response response)protected java.util.Map<java.lang.String,java.lang.Object>[]handleFunctionListResponse(java.lang.Object[] response)Process aFUNCTION LISTstandalone response.protected java.util.Map<GlideString,java.lang.Object>[]handleFunctionListResponseBinary(java.lang.Object[] response)Process aFUNCTION LISTstandalone response.protected java.util.Map<GlideString,java.util.Map<GlideString,java.lang.Object>>handleFunctionStatsBinaryResponse(java.util.Map<GlideString,java.util.Map<GlideString,java.lang.Object>> response)Process aFUNCTION STATSresponse from one node.protected ClusterValue<java.util.Map<GlideString,java.util.Map<GlideString,java.lang.Object>>>handleFunctionStatsBinaryResponse(ResponseOuterClass.Response response, boolean isSingleValue)Process aFUNCTION STATScluster response.protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>handleFunctionStatsResponse(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> response)Process aFUNCTION STATSresponse from one node.protected ClusterValue<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>>handleFunctionStatsResponse(ResponseOuterClass.Response response, boolean isSingleValue)Process aFUNCTION STATScluster response.protected GlideStringhandleGlideStringOrNullResponse(ResponseOuterClass.Response response)protected GlideStringhandleGlideStringResponse(ResponseOuterClass.Response response)protected java.util.Map<java.lang.String,java.lang.Object>handleLcsIdxResponse(java.util.Map<java.lang.String,java.lang.Object> response)Process aLCS key1 key2 IDXresponseprotected java.lang.LonghandleLongOrNullResponse(ResponseOuterClass.Response response)protected java.lang.LonghandleLongResponse(ResponseOuterClass.Response response)protected java.util.Map<java.lang.String,java.lang.String[]>handleMapOfArraysResponse(ResponseOuterClass.Response response)protected <V> java.util.Map<java.lang.String,V>handleMapOrNullResponse(ResponseOuterClass.Response response)protected <V> java.util.Map<java.lang.String,V>handleMapResponse(ResponseOuterClass.Response response)protected java.lang.ObjecthandleObjectOrNullResponse(ResponseOuterClass.Response response)protected java.util.Set<GlideString>handleSetBinaryResponse(ResponseOuterClass.Response response)protected java.util.Set<java.lang.String>handleSetResponse(ResponseOuterClass.Response response)protected java.lang.StringhandleStringOrNullResponse(ResponseOuterClass.Response response)protected java.lang.StringhandleStringResponse(ResponseOuterClass.Response response)protected <T> ThandleValkeyResponse(java.lang.Class<T> classType, java.util.EnumSet<BaseClient.ResponseFlags> flags, ResponseOuterClass.Response response)Extracts the value from aGLIDE coreresponse message and either throws an exception or returns the value as an object of typeT.protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String[][]>>handleXReadResponse(ResponseOuterClass.Response response)protected java.util.Map<GlideString,java.util.Map<GlideString,GlideString[][]>>handleXReadResponseBinary(ResponseOuterClass.Response response)java.util.concurrent.CompletableFuture<java.lang.Long>hdel(@NonNull GlideString key, @NonNull GlideString[] fields)Removes the specified fields from the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>hdel(@NonNull java.lang.String key, @NonNull java.lang.String[] fields)Removes the specified fields from the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>hexists(@NonNull GlideString key, @NonNull GlideString field)Returns iffieldis an existing field in the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>hexists(@NonNull java.lang.String key, @NonNull java.lang.String field)Returns iffieldis an existing field in the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long[]>hexpire(@NonNull GlideString key, long seconds, @NonNull GlideString[] fields, HashFieldExpirationConditionOptions options)Sets expiration time for hash fields.java.util.concurrent.CompletableFuture<java.lang.Long[]>hexpire(@NonNull java.lang.String key, long seconds, @NonNull java.lang.String[] fields, HashFieldExpirationConditionOptions options)Sets expiration time for hash fields.java.util.concurrent.CompletableFuture<java.lang.Long[]>hexpireat(@NonNull GlideString key, long unixSeconds, @NonNull GlideString[] fields, HashFieldExpirationConditionOptions options)Sets expiration time for hash fields, in seconds, using an absolute Unix timestamp.java.util.concurrent.CompletableFuture<java.lang.Long[]>hexpireat(@NonNull java.lang.String key, long unixSeconds, @NonNull java.lang.String[] fields, HashFieldExpirationConditionOptions options)Sets expiration time for hash fields, in seconds, using an absolute Unix timestamp.java.util.concurrent.CompletableFuture<java.lang.Long[]>hexpiretime(@NonNull GlideString key, @NonNull GlideString[] fields)Returns the absolute Unix timestamp (in seconds) at which the given hash fields will expire.java.util.concurrent.CompletableFuture<java.lang.Long[]>hexpiretime(@NonNull java.lang.String key, @NonNull java.lang.String[] fields)Returns the absolute Unix timestamp (in seconds) at which the given hash fields will expire.java.util.concurrent.CompletableFuture<GlideString>hget(@NonNull GlideString key, @NonNull GlideString field)Retrieves the value associated withfieldin the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>hget(@NonNull java.lang.String key, @NonNull java.lang.String field)Retrieves the value associated withfieldin the hash stored atkey.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString>>hgetall(@NonNull GlideString key)Returns all fields and values of the hash stored atkey.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String>>hgetall(@NonNull java.lang.String key)Returns all fields and values of the hash stored atkey.java.util.concurrent.CompletableFuture<GlideString[]>hgetex(@NonNull GlideString key, @NonNull GlideString[] fields, HGetExOptions options)Retrieves the values of specified fields from the hash stored atkeyand optionally sets their expiration or removes it.java.util.concurrent.CompletableFuture<java.lang.String[]>hgetex(@NonNull java.lang.String key, @NonNull java.lang.String[] fields, HGetExOptions options)Retrieves the values of specified fields from the hash stored atkeyand optionally sets their expiration or removes it.java.util.concurrent.CompletableFuture<java.lang.Long>hincrBy(@NonNull GlideString key, @NonNull GlideString field, long amount)Increments the number stored atfieldin the hash stored atkeyby increment.java.util.concurrent.CompletableFuture<java.lang.Long>hincrBy(@NonNull java.lang.String key, @NonNull java.lang.String field, long amount)Increments the number stored atfieldin the hash stored atkeyby increment.java.util.concurrent.CompletableFuture<java.lang.Double>hincrByFloat(@NonNull GlideString key, @NonNull GlideString field, double amount)Increments the string representing a floating point number stored atfieldin the hash stored atkeyby increment.java.util.concurrent.CompletableFuture<java.lang.Double>hincrByFloat(@NonNull java.lang.String key, @NonNull java.lang.String field, double amount)Increments the string representing a floating point number stored atfieldin the hash stored atkeyby increment.java.util.concurrent.CompletableFuture<GlideString[]>hkeys(@NonNull GlideString key)Returns all field names in the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.String[]>hkeys(@NonNull java.lang.String key)Returns all field names in the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>hlen(@NonNull GlideString key)Returns the number of fields contained in the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>hlen(@NonNull java.lang.String key)Returns the number of fields contained in the hash stored atkey.java.util.concurrent.CompletableFuture<GlideString[]>hmget(@NonNull GlideString key, @NonNull GlideString[] fields)Returns the values associated with the specified fields in the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.String[]>hmget(@NonNull java.lang.String key, @NonNull java.lang.String[] fields)Returns the values associated with the specified fields in the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long[]>hpersist(@NonNull GlideString key, @NonNull GlideString[] fields)Removes the expiration time for each specified field, turning the field from volatile (a field with expiration time) to persistent (a field that will never expire as no expiration time is associated).java.util.concurrent.CompletableFuture<java.lang.Long[]>hpersist(@NonNull java.lang.String key, @NonNull java.lang.String[] fields)Removes the expiration time for each specified field, turning the field from volatile (a field with expiration time) to persistent (a field that will never expire as no expiration time is associated).java.util.concurrent.CompletableFuture<java.lang.Long[]>hpexpire(@NonNull GlideString key, long milliseconds, @NonNull GlideString[] fields, HashFieldExpirationConditionOptions options)Sets expiration time for hash fields, in milliseconds.java.util.concurrent.CompletableFuture<java.lang.Long[]>hpexpire(@NonNull java.lang.String key, long milliseconds, @NonNull java.lang.String[] fields, HashFieldExpirationConditionOptions options)Sets expiration time for hash fields, in milliseconds.java.util.concurrent.CompletableFuture<java.lang.Long[]>hpexpireat(@NonNull GlideString key, long unixMilliseconds, @NonNull GlideString[] fields, HashFieldExpirationConditionOptions options)Sets expiration time for hash fields, using an absolute Unix timestamp in milliseconds.java.util.concurrent.CompletableFuture<java.lang.Long[]>hpexpireat(@NonNull java.lang.String key, long unixMilliseconds, @NonNull java.lang.String[] fields, HashFieldExpirationConditionOptions options)Sets expiration time for hash fields, using an absolute Unix timestamp in milliseconds.java.util.concurrent.CompletableFuture<java.lang.Long[]>hpexpiretime(@NonNull GlideString key, @NonNull GlideString[] fields)Returns the absolute Unix timestamp (in milliseconds) at which the given hash fields will expire.java.util.concurrent.CompletableFuture<java.lang.Long[]>hpexpiretime(@NonNull java.lang.String key, @NonNull java.lang.String[] fields)Returns the absolute Unix timestamp (in milliseconds) at which the given hash fields will expire.java.util.concurrent.CompletableFuture<java.lang.Long[]>hpttl(@NonNull GlideString key, @NonNull GlideString[] fields)Returns the remaining time to live of hash fields that have a timeout, in milliseconds.java.util.concurrent.CompletableFuture<java.lang.Long[]>hpttl(@NonNull java.lang.String key, @NonNull java.lang.String[] fields)Returns the remaining time to live of hash fields that have a timeout, in milliseconds.java.util.concurrent.CompletableFuture<GlideString>hrandfield(@NonNull GlideString key)Returns a random field name from the hash value stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>hrandfield(@NonNull java.lang.String key)Returns a random field name from the hash value stored atkey.java.util.concurrent.CompletableFuture<GlideString[]>hrandfieldWithCount(@NonNull GlideString key, long count)Retrieves up tocountrandom field names from the hash value stored atkey.java.util.concurrent.CompletableFuture<java.lang.String[]>hrandfieldWithCount(@NonNull java.lang.String key, long count)Retrieves up tocountrandom field names from the hash value stored atkey.java.util.concurrent.CompletableFuture<GlideString[][]>hrandfieldWithCountWithValues(@NonNull GlideString key, long count)Retrieves up tocountrandom field names along with their values from the hash value stored atkey.java.util.concurrent.CompletableFuture<java.lang.String[][]>hrandfieldWithCountWithValues(@NonNull java.lang.String key, long count)Retrieves up tocountrandom field names along with their values from the hash value stored atkey.java.util.concurrent.CompletableFuture<java.lang.Object[]>hscan(@NonNull GlideString key, @NonNull GlideString cursor)Iterates fields of Hash types and their associated values.java.util.concurrent.CompletableFuture<java.lang.Object[]>hscan(@NonNull GlideString key, @NonNull GlideString cursor, @NonNull HScanOptionsBinary hScanOptions)Iterates fields of Hash types and their associated values.java.util.concurrent.CompletableFuture<java.lang.Object[]>hscan(@NonNull java.lang.String key, @NonNull java.lang.String cursor)Iterates fields of Hash types and their associated values.java.util.concurrent.CompletableFuture<java.lang.Object[]>hscan(@NonNull java.lang.String key, @NonNull java.lang.String cursor, @NonNull HScanOptions hScanOptions)Iterates fields of Hash types and their associated values.java.util.concurrent.CompletableFuture<java.lang.Long>hset(@NonNull GlideString key, @NonNull java.util.Map<GlideString,GlideString> fieldValueMap)Sets the specified fields to their respective values in the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>hset(@NonNull java.lang.String key, @NonNull java.util.Map<java.lang.String,java.lang.String> fieldValueMap)Sets the specified fields to their respective values in the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>hsetex(@NonNull GlideString key, @NonNull java.util.Map<GlideString,GlideString> fieldValueMap, HSetExOptions options)Sets the specified fields to their respective values in the hash stored atkeywith optional expiration and conditional options.java.util.concurrent.CompletableFuture<java.lang.Long>hsetex(@NonNull java.lang.String key, @NonNull java.util.Map<java.lang.String,java.lang.String> fieldValueMap, HSetExOptions options)Sets the specified fields to their respective values in the hash stored atkeywith optional expiration and conditional options.java.util.concurrent.CompletableFuture<java.lang.Boolean>hsetnx(@NonNull GlideString key, @NonNull GlideString field, @NonNull GlideString value)Setsfieldin the hash stored atkeytovalue, only iffielddoes not yet exist.
Ifkeydoes not exist, a new key holding a hash is created.
Iffieldalready exists, this operation has no effect.java.util.concurrent.CompletableFuture<java.lang.Boolean>hsetnx(@NonNull java.lang.String key, @NonNull java.lang.String field, @NonNull java.lang.String value)Setsfieldin the hash stored atkeytovalue, only iffielddoes not yet exist.
Ifkeydoes not exist, a new key holding a hash is created.
Iffieldalready exists, this operation has no effect.java.util.concurrent.CompletableFuture<java.lang.Long>hstrlen(@NonNull GlideString key, @NonNull GlideString field)Returns the string length of the value associated withfieldin the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>hstrlen(@NonNull java.lang.String key, @NonNull java.lang.String field)Returns the string length of the value associated withfieldin the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long[]>httl(@NonNull GlideString key, @NonNull GlideString[] fields)Returns the remaining time to live of hash fields that have a timeout, in seconds.java.util.concurrent.CompletableFuture<java.lang.Long[]>httl(@NonNull java.lang.String key, @NonNull java.lang.String[] fields)Returns the remaining time to live of hash fields that have a timeout, in seconds.java.util.concurrent.CompletableFuture<GlideString[]>hvals(@NonNull GlideString key)Returns all values in the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.String[]>hvals(@NonNull java.lang.String key)Returns all values in the hash stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>incr(@NonNull GlideString key)Increments the number stored atkeyby one.java.util.concurrent.CompletableFuture<java.lang.Long>incr(@NonNull java.lang.String key)Increments the number stored atkeyby one.java.util.concurrent.CompletableFuture<java.lang.Long>incrBy(@NonNull GlideString key, long amount)Increments the number stored atkeybyamount.java.util.concurrent.CompletableFuture<java.lang.Long>incrBy(@NonNull java.lang.String key, long amount)Increments the number stored atkeybyamount.java.util.concurrent.CompletableFuture<java.lang.Double>incrByFloat(@NonNull GlideString key, double amount)Increments the string representing a floating point number stored atkeybyamount.java.util.concurrent.CompletableFuture<java.lang.Double>incrByFloat(@NonNull java.lang.String key, double amount)Increments the string representing a floating point number stored atkeybyamount.java.util.concurrent.CompletableFuture<java.lang.Object>invokeScript(@NonNull Script script)Invokes a Lua script.
This method simplifies the process of invoking scripts on the server by using an object that represents a Lua script.java.util.concurrent.CompletableFuture<java.lang.Object>invokeScript(@NonNull Script script, @NonNull ScriptOptions options)Invokes a Lua script with its keys and arguments.
This method simplifies the process of invoking scripts on the server by using an object that represents a Lua script.java.util.concurrent.CompletableFuture<java.lang.Object>invokeScript(@NonNull Script script, @NonNull ScriptOptionsGlideString options)Invokes a Lua script with its keys and arguments.
This method simplifies the process of invoking scripts on the server by using an object that represents a Lua script.booleanisConnected()Check if the client is connected and ready for commands.java.util.concurrent.CompletableFuture<GlideString>lcs(@NonNull GlideString key1, @NonNull GlideString key2)Returns all the longest common subsequences combined between strings stored atkey1andkey2.java.util.concurrent.CompletableFuture<java.lang.String>lcs(@NonNull java.lang.String key1, @NonNull java.lang.String key2)Returns all the longest common subsequences combined between strings stored atkey1andkey2.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>lcsIdx(@NonNull GlideString key1, @NonNull GlideString key2)Returns the indices and the total length of all the longest common subsequences between strings stored atkey1andkey2.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>lcsIdx(@NonNull GlideString key1, @NonNull GlideString key2, long minMatchLen)Returns the indices and the total length of all the longest common subsequences between strings stored atkey1andkey2.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>lcsIdx(@NonNull java.lang.String key1, @NonNull java.lang.String key2)Returns the indices and the total length of all the longest common subsequences between strings stored atkey1andkey2.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>lcsIdx(@NonNull java.lang.String key1, @NonNull java.lang.String key2, long minMatchLen)Returns the indices and the total length of all the longest common subsequences between strings stored atkey1andkey2.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>lcsIdxWithMatchLen(@NonNull GlideString key1, @NonNull GlideString key2)Returns the indices and lengths of the longest common subsequences between strings stored atkey1andkey2.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>lcsIdxWithMatchLen(@NonNull GlideString key1, @NonNull GlideString key2, long minMatchLen)Returns the indices and lengths of the longest common subsequences between strings stored atkey1andkey2.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>lcsIdxWithMatchLen(@NonNull java.lang.String key1, @NonNull java.lang.String key2)Returns the indices and lengths of the longest common subsequences between strings stored atkey1andkey2.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>lcsIdxWithMatchLen(@NonNull java.lang.String key1, @NonNull java.lang.String key2, long minMatchLen)Returns the indices and lengths of the longest common subsequences between strings stored atkey1andkey2.java.util.concurrent.CompletableFuture<java.lang.Long>lcsLen(@NonNull GlideString key1, @NonNull GlideString key2)Returns the total length of all the longest common subsequences between strings stored atkey1andkey2.java.util.concurrent.CompletableFuture<java.lang.Long>lcsLen(@NonNull java.lang.String key1, @NonNull java.lang.String key2)Returns the total length of all the longest common subsequences between strings stored atkey1andkey2.java.util.concurrent.CompletableFuture<GlideString>lindex(@NonNull GlideString key, long index)Returns the element atindexfrom the list stored atkey.
The index is zero-based, so0means the first element,1the second element and so on.java.util.concurrent.CompletableFuture<java.lang.String>lindex(@NonNull java.lang.String key, long index)Returns the element atindexfrom the list stored atkey.
The index is zero-based, so0means the first element,1the second element and so on.java.util.concurrent.CompletableFuture<java.lang.Long>linsert(@NonNull GlideString key, @NonNull LInsertOptions.InsertPosition position, @NonNull GlideString pivot, @NonNull GlideString element)Insertselementin the list atkeyeither before or after thepivot.java.util.concurrent.CompletableFuture<java.lang.Long>linsert(@NonNull java.lang.String key, @NonNull LInsertOptions.InsertPosition position, @NonNull java.lang.String pivot, @NonNull java.lang.String element)Insertselementin the list atkeyeither before or after thepivot.java.util.concurrent.CompletableFuture<java.lang.Long>llen(@NonNull GlideString key)Returns the length of the list stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>llen(@NonNull java.lang.String key)Returns the length of the list stored atkey.java.util.concurrent.CompletableFuture<GlideString>lmove(@NonNull GlideString source, @NonNull GlideString destination, @NonNull ListDirection wherefrom, @NonNull ListDirection whereto)Atomically pops and removes the left/right-most element to the list stored atsourcedepending onwherefrom, and pushes the element at the first/last element of the list stored atdestinationdepending onwherefrom.java.util.concurrent.CompletableFuture<java.lang.String>lmove(@NonNull java.lang.String source, @NonNull java.lang.String destination, @NonNull ListDirection wherefrom, @NonNull ListDirection whereto)Atomically pops and removes the left/right-most element to the list stored atsourcedepending onwherefrom, and pushes the element at the first/last element of the list stored atdestinationdepending onwherefrom.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[]>>lmpop(@NonNull GlideString[] keys, @NonNull ListDirection direction)Pops one element from the first non-empty list from the providedkeys.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[]>>lmpop(@NonNull GlideString[] keys, @NonNull ListDirection direction, long count)Pops one or more elements from the first non-empty list from the providedkeys.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[]>>lmpop(@NonNull java.lang.String[] keys, @NonNull ListDirection direction)Pops one element from the first non-empty list from the providedkeys.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[]>>lmpop(@NonNull java.lang.String[] keys, @NonNull ListDirection direction, long count)Pops one or more elements from the first non-empty list from the providedkeys.java.util.concurrent.CompletableFuture<GlideString>lpop(@NonNull GlideString key)Removes and returns the first elements of the list stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>lpop(@NonNull java.lang.String key)Removes and returns the first elements of the list stored atkey.java.util.concurrent.CompletableFuture<GlideString[]>lpopCount(@NonNull GlideString key, long count)Removes and returns up tocountelements of the list stored atkey, depending on the list's length.java.util.concurrent.CompletableFuture<java.lang.String[]>lpopCount(@NonNull java.lang.String key, long count)Removes and returns up tocountelements of the list stored atkey, depending on the list's length.java.util.concurrent.CompletableFuture<java.lang.Long>lpos(@NonNull GlideString key, @NonNull GlideString element)Returns the index of the first occurrence ofelementinside the list specified bykey.java.util.concurrent.CompletableFuture<java.lang.Long>lpos(@NonNull GlideString key, @NonNull GlideString element, @NonNull LPosOptions options)Returns the index of an occurrence ofelementwithin a list based on the givenoptions.java.util.concurrent.CompletableFuture<java.lang.Long>lpos(@NonNull java.lang.String key, @NonNull java.lang.String element)Returns the index of the first occurrence ofelementinside the list specified bykey.java.util.concurrent.CompletableFuture<java.lang.Long>lpos(@NonNull java.lang.String key, @NonNull java.lang.String element, @NonNull LPosOptions options)Returns the index of an occurrence ofelementwithin a list based on the givenoptions.java.util.concurrent.CompletableFuture<java.lang.Long[]>lposCount(@NonNull GlideString key, @NonNull GlideString element, long count)Returns anarrayof indices of matching elements within a list.java.util.concurrent.CompletableFuture<java.lang.Long[]>lposCount(@NonNull GlideString key, @NonNull GlideString element, long count, @NonNull LPosOptions options)Returns anarrayof indices of matching elements within a list based on the givenoptions.java.util.concurrent.CompletableFuture<java.lang.Long[]>lposCount(@NonNull java.lang.String key, @NonNull java.lang.String element, long count)Returns anarrayof indices of matching elements within a list.java.util.concurrent.CompletableFuture<java.lang.Long[]>lposCount(@NonNull java.lang.String key, @NonNull java.lang.String element, long count, @NonNull LPosOptions options)Returns anarrayof indices of matching elements within a list based on the givenoptions.java.util.concurrent.CompletableFuture<java.lang.Long>lpush(@NonNull GlideString key, @NonNull GlideString[] elements)Inserts all the specified values at the head of the list stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>lpush(@NonNull java.lang.String key, @NonNull java.lang.String[] elements)Inserts all the specified values at the head of the list stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>lpushx(@NonNull GlideString key, @NonNull GlideString[] elements)Inserts all the specified values at the head of the list stored atkey, only ifkeyexists and holds a list.java.util.concurrent.CompletableFuture<java.lang.Long>lpushx(@NonNull java.lang.String key, @NonNull java.lang.String[] elements)Inserts all the specified values at the head of the list stored atkey, only ifkeyexists and holds a list.java.util.concurrent.CompletableFuture<GlideString[]>lrange(@NonNull GlideString key, long start, long end)Returns the specified elements of the list stored atkey.
The offsetsstartandendare zero-based indexes, with0being the first element of the list,1being the next element and so on.java.util.concurrent.CompletableFuture<java.lang.String[]>lrange(@NonNull java.lang.String key, long start, long end)Returns the specified elements of the list stored atkey.
The offsetsstartandendare zero-based indexes, with0being the first element of the list,1being the next element and so on.java.util.concurrent.CompletableFuture<java.lang.Long>lrem(@NonNull GlideString key, long count, @NonNull GlideString element)Removes the firstcountoccurrences of elements equal toelementfrom the list stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>lrem(@NonNull java.lang.String key, long count, @NonNull java.lang.String element)Removes the firstcountoccurrences of elements equal toelementfrom the list stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>lset(@NonNull GlideString key, long index, @NonNull GlideString element)Sets the list element atindextoelement.
The index is zero-based, so0means the first element,1the second element and so on.java.util.concurrent.CompletableFuture<java.lang.String>lset(@NonNull java.lang.String key, long index, @NonNull java.lang.String element)Sets the list element atindextoelement.
The index is zero-based, so0means the first element,1the second element and so on.java.util.concurrent.CompletableFuture<java.lang.String>ltrim(@NonNull GlideString key, long start, long end)Trims an existing list so that it will contain only the specified range of elements specified.java.util.concurrent.CompletableFuture<java.lang.String>ltrim(@NonNull java.lang.String key, long start, long end)Trims an existing list so that it will contain only the specified range of elements specified.java.util.concurrent.CompletableFuture<GlideString[]>mget(@NonNull GlideString[] keys)Retrieves the values of multiplekeys.java.util.concurrent.CompletableFuture<java.lang.String[]>mget(@NonNull java.lang.String[] keys)Retrieves the values of multiplekeys.java.util.concurrent.CompletableFuture<java.lang.String>migrate(java.lang.String destinationHost, long destinationPort, GlideString key, long destinationDB, long timeout)Atomically transfers a key from a source Valkey instance to a destination Valkey instance.java.util.concurrent.CompletableFuture<java.lang.String>migrate(java.lang.String destinationHost, long destinationPort, GlideString key, long destinationDB, long timeout, MigrateOptions migrateOptions)Atomically transfers a key from a source Valkey instance to a destination Valkey instance.java.util.concurrent.CompletableFuture<java.lang.String>migrate(java.lang.String destinationHost, long destinationPort, java.lang.String key, long destinationDB, long timeout)Atomically transfers a key from a source Valkey instance to a destination Valkey instance.java.util.concurrent.CompletableFuture<java.lang.String>migrate(java.lang.String destinationHost, long destinationPort, java.lang.String key, long destinationDB, long timeout, MigrateOptions migrateOptions)Atomically transfers a key from a source Valkey instance to a destination Valkey instance.java.util.concurrent.CompletableFuture<java.lang.Boolean>move(@NonNull GlideString key, long dbIndex)Movekeyfrom the currently selected database to the database specified bydbIndex.java.util.concurrent.CompletableFuture<java.lang.Boolean>move(@NonNull java.lang.String key, long dbIndex)Movekeyfrom the currently selected database to the database specified bydbIndex.java.util.concurrent.CompletableFuture<java.lang.String>mset(@NonNull java.util.Map<java.lang.String,java.lang.String> keyValueMap)Sets multiple keys to multiple values in a single operation.java.util.concurrent.CompletableFuture<java.lang.String>msetBinary(@NonNull java.util.Map<GlideString,GlideString> keyValueMap)Sets multiple keys to multiple values in a single operation.java.util.concurrent.CompletableFuture<java.lang.Boolean>msetnx(@NonNull java.util.Map<java.lang.String,java.lang.String> keyValueMap)Sets multiple keys to values if the key does not exist.java.util.concurrent.CompletableFuture<java.lang.Boolean>msetnxBinary(@NonNull java.util.Map<GlideString,GlideString> keyValueMap)Sets multiple keys to values if the key does not exist.java.util.concurrent.CompletableFuture<java.lang.String>objectEncoding(@NonNull GlideString key)Returns the internal encoding for the Valkey object stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>objectEncoding(@NonNull java.lang.String key)Returns the internal encoding for the Valkey object stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>objectFreq(@NonNull GlideString key)Returns the logarithmic access frequency counter of a Valkey object stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>objectFreq(@NonNull java.lang.String key)Returns the logarithmic access frequency counter of a Valkey object stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>objectIdletime(@NonNull GlideString key)Returns the time in seconds since the last access to the value stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>objectIdletime(@NonNull java.lang.String key)Returns the time in seconds since the last access to the value stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>objectRefcount(@NonNull GlideString key)Returns the reference count of the object stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>objectRefcount(@NonNull java.lang.String key)Returns the reference count of the object stored atkey.protected java.lang.ObjectparseSubscriptionState(java.lang.Object response)java.util.concurrent.CompletableFuture<java.lang.Boolean>persist(@NonNull GlideString key)Removes the existing timeout onkey, turning thekeyfrom volatile (akeywith an expire set) to persistent (akeythat will never expire as no timeout is associated).java.util.concurrent.CompletableFuture<java.lang.Boolean>persist(@NonNull java.lang.String key)Removes the existing timeout onkey, turning thekeyfrom volatile (akeywith an expire set) to persistent (akeythat will never expire as no timeout is associated).java.util.concurrent.CompletableFuture<java.lang.Boolean>pexpire(@NonNull GlideString key, long milliseconds)Sets a timeout onkeyin milliseconds.java.util.concurrent.CompletableFuture<java.lang.Boolean>pexpire(@NonNull GlideString key, long milliseconds, @NonNull ExpireOptions expireOptions)Sets a timeout onkeyin milliseconds.java.util.concurrent.CompletableFuture<java.lang.Boolean>pexpire(@NonNull java.lang.String key, long milliseconds)Sets a timeout onkeyin milliseconds.java.util.concurrent.CompletableFuture<java.lang.Boolean>pexpire(@NonNull java.lang.String key, long milliseconds, @NonNull ExpireOptions expireOptions)Sets a timeout onkeyin milliseconds.java.util.concurrent.CompletableFuture<java.lang.Boolean>pexpireAt(@NonNull GlideString key, long unixMilliseconds)Sets a timeout onkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>pexpireAt(@NonNull GlideString key, long unixMilliseconds, @NonNull ExpireOptions expireOptions)Sets a timeout onkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>pexpireAt(@NonNull java.lang.String key, long unixMilliseconds)Sets a timeout onkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>pexpireAt(@NonNull java.lang.String key, long unixMilliseconds, @NonNull ExpireOptions expireOptions)Sets a timeout onkey.java.util.concurrent.CompletableFuture<java.lang.Long>pexpiretime(@NonNull GlideString key)Returns the absolute Unix timestamp (since January 1, 1970) at which the givenkeywill expire, in milliseconds.java.util.concurrent.CompletableFuture<java.lang.Long>pexpiretime(@NonNull java.lang.String key)Returns the absolute Unix timestamp (since January 1, 1970) at which the givenkeywill expire, in milliseconds.java.util.concurrent.CompletableFuture<java.lang.Boolean>pfadd(@NonNull GlideString key, @NonNull GlideString[] elements)Adds all elements to the HyperLogLog data structure stored at the specifiedkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>pfadd(@NonNull java.lang.String key, @NonNull java.lang.String[] elements)Adds all elements to the HyperLogLog data structure stored at the specifiedkey.java.util.concurrent.CompletableFuture<java.lang.Long>pfcount(@NonNull GlideString[] keys)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.java.util.concurrent.CompletableFuture<java.lang.Long>pfcount(@NonNull java.lang.String[] keys)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.java.util.concurrent.CompletableFuture<java.lang.String>pfmerge(@NonNull GlideString destination, @NonNull GlideString[] sourceKeys)Merges multiple HyperLogLog values into a unique value.
If the destination variable exists, it is treated as one of the source HyperLogLog data sets, otherwise a new HyperLogLog is created.java.util.concurrent.CompletableFuture<java.lang.String>pfmerge(@NonNull java.lang.String destination, @NonNull java.lang.String[] sourceKeys)Merges multiple HyperLogLog values into a unique value.
If the destination variable exists, it is treated as one of the source HyperLogLog data sets, otherwise a new HyperLogLog is created.java.util.concurrent.CompletableFuture<java.lang.Void>psubscribe(java.util.Set<java.lang.String> patterns, int timeoutMs)Subscribes the client to channels matching the specified patterns with a timeout.java.util.concurrent.CompletableFuture<java.lang.Void>psubscribeLazy(java.util.Set<java.lang.String> patterns)Subscribes the client to channels matching the specified patterns.java.util.concurrent.CompletableFuture<java.lang.Long>pttl(@NonNull GlideString key)Returns the remaining time to live ofkeythat has a timeout, in milliseconds.java.util.concurrent.CompletableFuture<java.lang.Long>pttl(@NonNull java.lang.String key)Returns the remaining time to live ofkeythat has a timeout, in milliseconds.java.util.concurrent.CompletableFuture<java.lang.String>publish(@NonNull GlideString message, @NonNull GlideString channel)Publishes message on pubsub channel.java.util.concurrent.CompletableFuture<java.lang.String>publish(@NonNull java.lang.String message, @NonNull java.lang.String channel)Publishes message on pubsub channel.java.util.concurrent.CompletableFuture<java.lang.String[]>pubsubChannels()Lists the currently active channels.java.util.concurrent.CompletableFuture<GlideString[]>pubsubChannels(@NonNull GlideString pattern)Lists the currently active channels.java.util.concurrent.CompletableFuture<java.lang.String[]>pubsubChannels(@NonNull java.lang.String pattern)Lists the currently active channels.java.util.concurrent.CompletableFuture<GlideString[]>pubsubChannelsBinary()Lists the currently active channels.
Unlike ofPubSubBaseCommands.pubsubChannels(), returns channel names asGlideStrings.java.util.concurrent.CompletableFuture<java.lang.Long>pubsubNumPat()Returns the number of unique patterns that are subscribed to by clients.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Long>>pubsubNumSub(@NonNull GlideString[] channels)Returns the number of subscribers (exclusive of clients subscribed to patterns) for the specified channels.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Long>>pubsubNumSub(@NonNull java.lang.String[] channels)Returns the number of subscribers (exclusive of clients subscribed to patterns) for the specified channels.java.util.concurrent.CompletableFuture<java.lang.Void>punsubscribe(int timeoutMs)Unsubscribes the client from all currently subscribed patterns with a timeout.java.util.concurrent.CompletableFuture<java.lang.Void>punsubscribe(java.util.Set<java.lang.String> patterns, int timeoutMs)Unsubscribes the client from the specified patterns with a timeout.java.util.concurrent.CompletableFuture<java.lang.Void>punsubscribeLazy()Unsubscribes the client from all currently subscribed patterns.java.util.concurrent.CompletableFuture<java.lang.Void>punsubscribeLazy(java.util.Set<java.lang.String> patterns)Unsubscribes the client from the specified patterns.java.util.concurrent.CompletableFuture<java.lang.String>refreshIamToken()Manually refresh the IAM token for the current connection.java.util.concurrent.CompletableFuture<java.lang.String>rename(@NonNull GlideString key, @NonNull GlideString newKey)RenameskeytonewKey.
IfnewKeyalready exists it is overwritten.java.util.concurrent.CompletableFuture<java.lang.String>rename(@NonNull java.lang.String key, @NonNull java.lang.String newKey)RenameskeytonewKey.
IfnewKeyalready exists it is overwritten.java.util.concurrent.CompletableFuture<java.lang.Boolean>renamenx(@NonNull GlideString key, @NonNull GlideString newKey)RenameskeytonewKeyifnewKeydoes not yet exist.java.util.concurrent.CompletableFuture<java.lang.Boolean>renamenx(@NonNull java.lang.String key, @NonNull java.lang.String newKey)RenameskeytonewKeyifnewKeydoes not yet exist.java.util.concurrent.CompletableFuture<java.lang.String>restore(@NonNull GlideString key, long ttl, @lombok.NonNull byte[] value)Create akeyassociated with avaluethat is obtained by deserializing the provided serializedvalue(obtained viaGenericBaseCommands.dump(glide.api.models.GlideString)).java.util.concurrent.CompletableFuture<java.lang.String>restore(@NonNull GlideString key, long ttl, @lombok.NonNull byte[] value, @NonNull RestoreOptions restoreOptions)Create akeyassociated with avaluethat is obtained by deserializing the provided serializedvalue(obtained viaGenericBaseCommands.dump(glide.api.models.GlideString)).java.util.concurrent.CompletableFuture<GlideString>rpop(@NonNull GlideString key)Removes and returns the last elements of the list stored atkey.
The command pops a single element from the end of the list.java.util.concurrent.CompletableFuture<java.lang.String>rpop(@NonNull java.lang.String key)Removes and returns the last elements of the list stored atkey.
The command pops a single element from the end of the list.java.util.concurrent.CompletableFuture<GlideString[]>rpopCount(@NonNull GlideString key, long count)Removes and returns up tocountelements from the list stored atkey, depending on the list's length.java.util.concurrent.CompletableFuture<java.lang.String[]>rpopCount(@NonNull java.lang.String key, long count)Removes and returns up tocountelements from the list stored atkey, depending on the list's length.java.util.concurrent.CompletableFuture<java.lang.Long>rpush(@NonNull GlideString key, @NonNull GlideString[] elements)Inserts all the specified values at the tail of the list stored atkey.
elementsare inserted one after the other to the tail of the list, from the leftmost element to the rightmost element.java.util.concurrent.CompletableFuture<java.lang.Long>rpush(@NonNull java.lang.String key, @NonNull java.lang.String[] elements)Inserts all the specified values at the tail of the list stored atkey.
elementsare inserted one after the other to the tail of the list, from the leftmost element to the rightmost element.java.util.concurrent.CompletableFuture<java.lang.Long>rpushx(@NonNull GlideString key, @NonNull GlideString[] elements)Inserts all the specified values at the tail of the list stored atkey, only ifkeyexists and holds a list.java.util.concurrent.CompletableFuture<java.lang.Long>rpushx(@NonNull java.lang.String key, @NonNull java.lang.String[] elements)Inserts all the specified values at the tail of the list stored atkey, only ifkeyexists and holds a list.java.util.concurrent.CompletableFuture<java.lang.Long>sadd(@NonNull GlideString key, @NonNull GlideString[] members)Adds specified members to the set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>sadd(@NonNull java.lang.String key, @NonNull java.lang.String[] members)Adds specified members to the set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>scard(@NonNull GlideString key)Retrieves the set cardinality (number of elements) of the set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>scard(@NonNull java.lang.String key)Retrieves the set cardinality (number of elements) of the set stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>scriptDebug(@NonNull ScriptDebugMode mode)Sets the debugging mode for executed scripts.java.util.concurrent.CompletableFuture<java.lang.Boolean[]>scriptExists(@NonNull GlideString[] sha1s)java.util.concurrent.CompletableFuture<java.lang.Boolean[]>scriptExists(@NonNull java.lang.String[] sha1s)java.util.concurrent.CompletableFuture<java.lang.String>scriptFlush()java.util.concurrent.CompletableFuture<java.lang.String>scriptFlush(@NonNull FlushMode flushMode)java.util.concurrent.CompletableFuture<java.lang.String>scriptKill()java.util.concurrent.CompletableFuture<GlideString>scriptShow(@NonNull GlideString sha1)Returns the original source code of a script in the script cache.java.util.concurrent.CompletableFuture<java.lang.String>scriptShow(@NonNull java.lang.String sha1)Returns the original source code of a script in the script cache.java.util.concurrent.CompletableFuture<java.util.Set<GlideString>>sdiff(@NonNull GlideString[] keys)Computes the difference between the first set and all the successive sets inkeys.java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>>sdiff(@NonNull java.lang.String[] keys)Computes the difference between the first set and all the successive sets inkeys.java.util.concurrent.CompletableFuture<java.lang.Long>sdiffstore(@NonNull GlideString destination, @NonNull GlideString[] keys)Stores the difference between the first set and all the successive sets inkeysinto a new set atdestination.java.util.concurrent.CompletableFuture<java.lang.Long>sdiffstore(@NonNull java.lang.String destination, @NonNull java.lang.String[] keys)Stores the difference between the first set and all the successive sets inkeysinto a new set atdestination.java.util.concurrent.CompletableFuture<java.lang.String>set(@NonNull GlideString key, @NonNull GlideString value)Sets the givenkeywith the given value.java.util.concurrent.CompletableFuture<java.lang.String>set(@NonNull GlideString key, @NonNull GlideString value, @NonNull SetOptions options)Sets the given key with the given value.java.util.concurrent.CompletableFuture<java.lang.String>set(@NonNull java.lang.String key, @NonNull java.lang.String value)Sets the givenkeywith the given value.java.util.concurrent.CompletableFuture<java.lang.String>set(@NonNull java.lang.String key, @NonNull java.lang.String value, @NonNull SetOptions options)Sets the given key with the given value.java.util.concurrent.CompletableFuture<java.lang.Long>setbit(@NonNull GlideString key, long offset, long value)Sets or clears the bit atoffsetin the string value stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>setbit(@NonNull java.lang.String key, long offset, long value)Sets or clears the bit atoffsetin the string value stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>setrange(@NonNull GlideString key, int offset, @NonNull GlideString value)Overwrites part of the GlideString stored atkey, starting at the specifiedoffset, for the entire length ofvalue.
If theoffsetis larger than the current length of the GlideString atkey, the GlideString is padded with zero bytes to makeoffsetfit.java.util.concurrent.CompletableFuture<java.lang.Long>setrange(@NonNull java.lang.String key, int offset, @NonNull java.lang.String value)Overwrites part of the string stored atkey, starting at the specifiedoffset, for the entire length ofvalue.
If theoffsetis larger than the current length of the string atkey, the string is padded with zero bytes to makeoffsetfit.java.util.concurrent.CompletableFuture<java.util.Set<GlideString>>sinter(@NonNull GlideString[] keys)Gets the intersection of all the given sets.java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>>sinter(@NonNull java.lang.String[] keys)Gets the intersection of all the given sets.java.util.concurrent.CompletableFuture<java.lang.Long>sintercard(@NonNull GlideString[] keys)Gets the cardinality of the intersection of all the given sets.java.util.concurrent.CompletableFuture<java.lang.Long>sintercard(@NonNull GlideString[] keys, long limit)Gets the cardinality of the intersection of all the given sets.java.util.concurrent.CompletableFuture<java.lang.Long>sintercard(@NonNull java.lang.String[] keys)Gets the cardinality of the intersection of all the given sets.java.util.concurrent.CompletableFuture<java.lang.Long>sintercard(@NonNull java.lang.String[] keys, long limit)Gets the cardinality of the intersection of all the given sets.java.util.concurrent.CompletableFuture<java.lang.Long>sinterstore(@NonNull GlideString destination, @NonNull GlideString[] keys)Stores the members of the intersection of all given sets specified bykeysinto a new set atdestination.java.util.concurrent.CompletableFuture<java.lang.Long>sinterstore(@NonNull java.lang.String destination, @NonNull java.lang.String[] keys)Stores the members of the intersection of all given sets specified bykeysinto a new set atdestination.java.util.concurrent.CompletableFuture<java.lang.Boolean>sismember(@NonNull GlideString key, @NonNull GlideString member)Returns ifmemberis a member of the set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>sismember(@NonNull java.lang.String key, @NonNull java.lang.String member)Returns ifmemberis a member of the set stored atkey.java.util.concurrent.CompletableFuture<java.util.Set<GlideString>>smembers(@NonNull GlideString key)Retrieves all the members of the set value stored atkey.java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>>smembers(@NonNull java.lang.String key)Retrieves all the members of the set value stored atkey.java.util.concurrent.CompletableFuture<java.lang.Boolean[]>smismember(@NonNull GlideString key, @NonNull GlideString[] members)Checks whether each member is contained in the members of the set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Boolean[]>smismember(@NonNull java.lang.String key, @NonNull java.lang.String[] members)Checks whether each member is contained in the members of the set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>smove(@NonNull GlideString source, @NonNull GlideString destination, @NonNull GlideString member)Movesmemberfrom the set atsourceto the set atdestination, removing it from the source set.java.util.concurrent.CompletableFuture<java.lang.Boolean>smove(@NonNull java.lang.String source, @NonNull java.lang.String destination, @NonNull java.lang.String member)Movesmemberfrom the set atsourceto the set atdestination, removing it from the source set.java.util.concurrent.CompletableFuture<GlideString[]>sort(@NonNull GlideString key)Sorts the elements in the list, set, or sorted set atkeyand returns the result.java.util.concurrent.CompletableFuture<GlideString[]>sort(@NonNull GlideString key, @NonNull SortOptionsBinary sortOptions)Sorts the elements in the list, set, or sorted set atkeyand returns the result.java.util.concurrent.CompletableFuture<java.lang.String[]>sort(@NonNull java.lang.String key)Sorts the elements in the list, set, or sorted set atkeyand returns the result.java.util.concurrent.CompletableFuture<java.lang.String[]>sort(@NonNull java.lang.String key, @NonNull SortOptions sortOptions)Sorts the elements in the list, set, or sorted set atkeyand returns the result.java.util.concurrent.CompletableFuture<GlideString[]>sortReadOnly(@NonNull GlideString key)Sorts the elements in the list, set, or sorted set atkeyand returns the result.java.util.concurrent.CompletableFuture<GlideString[]>sortReadOnly(@NonNull GlideString key, @NonNull SortOptionsBinary sortOptions)Sorts the elements in the list, set, or sorted set atkeyand returns the result.java.util.concurrent.CompletableFuture<java.lang.String[]>sortReadOnly(@NonNull java.lang.String key)Sorts the elements in the list, set, or sorted set atkeyand returns the result.java.util.concurrent.CompletableFuture<java.lang.String[]>sortReadOnly(@NonNull java.lang.String key, @NonNull SortOptions sortOptions)Sorts the elements in the list, set, or sorted set atkeyand returns the result.java.util.concurrent.CompletableFuture<java.lang.Long>sortStore(@NonNull GlideString key, @NonNull GlideString destination)Sorts the elements in the list, set, or sorted set atkeyand stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>sortStore(@NonNull GlideString key, @NonNull GlideString destination, @NonNull SortOptionsBinary sortOptions)Sorts the elements in the list, set, or sorted set atkeyand stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>sortStore(@NonNull java.lang.String key, @NonNull java.lang.String destination)Sorts the elements in the list, set, or sorted set atkeyand stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>sortStore(@NonNull java.lang.String key, @NonNull java.lang.String destination, @NonNull SortOptions sortOptions)Sorts the elements in the list, set, or sorted set atkeyand stores the result indestination.java.util.concurrent.CompletableFuture<GlideString>spop(@NonNull GlideString key)Removes and returns one random member from the set stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>spop(@NonNull java.lang.String key)Removes and returns one random member from the set stored atkey.java.util.concurrent.CompletableFuture<java.util.Set<GlideString>>spopCount(@NonNull GlideString key, long count)Removes and returns up tocountrandom members from the set stored atkey, depending on the set's length.java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>>spopCount(@NonNull java.lang.String key, long count)Removes and returns up tocountrandom members from the set stored atkey, depending on the set's length.java.util.concurrent.CompletableFuture<GlideString>srandmember(@NonNull GlideString key)Returns a random element from the set value stored atkey.java.util.concurrent.CompletableFuture<GlideString[]>srandmember(@NonNull GlideString key, long count)Returns one or more random elements from the set value stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>srandmember(@NonNull java.lang.String key)Returns a random element from the set value stored atkey.java.util.concurrent.CompletableFuture<java.lang.String[]>srandmember(@NonNull java.lang.String key, long count)Returns one or more random elements from the set value stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>srem(@NonNull GlideString key, @NonNull GlideString[] members)Removes specified members from the set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>srem(@NonNull java.lang.String key, @NonNull java.lang.String[] members)Removes specified members from the set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Object[]>sscan(@NonNull GlideString key, @NonNull GlideString cursor)Iterates incrementally over a set.java.util.concurrent.CompletableFuture<java.lang.Object[]>sscan(@NonNull GlideString key, @NonNull GlideString cursor, @NonNull SScanOptionsBinary sScanOptions)Iterates incrementally over a set.java.util.concurrent.CompletableFuture<java.lang.Object[]>sscan(@NonNull java.lang.String key, @NonNull java.lang.String cursor)Iterates incrementally over a set.java.util.concurrent.CompletableFuture<java.lang.Object[]>sscan(@NonNull java.lang.String key, @NonNull java.lang.String cursor, @NonNull SScanOptions sScanOptions)Iterates incrementally over a set.java.util.concurrent.CompletableFuture<java.lang.Long>strlen(@NonNull GlideString key)Returns the length of the string value stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>strlen(@NonNull java.lang.String key)Returns the length of the string value stored atkey.java.util.concurrent.CompletableFuture<java.lang.Void>subscribe(java.util.Set<java.lang.String> channels, int timeoutMs)Subscribes the client to the specified channels with a timeout.java.util.concurrent.CompletableFuture<java.lang.Void>subscribeLazy(java.util.Set<java.lang.String> channels)Subscribes the client to the specified channels.java.util.concurrent.CompletableFuture<java.util.Set<GlideString>>sunion(@NonNull GlideString[] keys)Gets the union of all the given sets.java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>>sunion(@NonNull java.lang.String[] keys)Gets the union of all the given sets.java.util.concurrent.CompletableFuture<java.lang.Long>sunionstore(@NonNull GlideString destination, @NonNull GlideString[] keys)Stores the members of the union of all given sets specified bykeysinto a new set atdestination.java.util.concurrent.CompletableFuture<java.lang.Long>sunionstore(@NonNull java.lang.String destination, @NonNull java.lang.String[] keys)Stores the members of the union of all given sets specified bykeysinto a new set atdestination.java.util.concurrent.CompletableFuture<java.lang.Long>touch(@NonNull GlideString[] keys)Updates the last access time of specifiedkeys.java.util.concurrent.CompletableFuture<java.lang.Long>touch(@NonNull java.lang.String[] keys)Updates the last access time of specifiedkeys.PubSubMessagetryGetPubSubMessage()Return a next pubsub message if it is present.java.util.concurrent.CompletableFuture<java.lang.Long>ttl(@NonNull GlideString key)Returns the remaining time to live ofkeythat has a timeout, in seconds.java.util.concurrent.CompletableFuture<java.lang.Long>ttl(@NonNull java.lang.String key)Returns the remaining time to live ofkeythat has a timeout, in seconds.java.util.concurrent.CompletableFuture<java.lang.String>type(@NonNull GlideString key)Returns the string representation of the type of the value stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>type(@NonNull java.lang.String key)Returns the string representation of the type of the value stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>unlink(@NonNull GlideString[] keys)Unlink (delete) multiplekeysfrom the database.java.util.concurrent.CompletableFuture<java.lang.Long>unlink(@NonNull java.lang.String[] keys)Unlink (delete) multiplekeysfrom the database.java.util.concurrent.CompletableFuture<java.lang.Void>unsubscribe(int timeoutMs)Unsubscribes the client from all currently subscribed channels with a timeout.java.util.concurrent.CompletableFuture<java.lang.Void>unsubscribe(java.util.Set<java.lang.String> channels, int timeoutMs)Unsubscribes the client from the specified channels with a timeout.java.util.concurrent.CompletableFuture<java.lang.Void>unsubscribeLazy()Unsubscribes the client from all currently subscribed channels.java.util.concurrent.CompletableFuture<java.lang.Void>unsubscribeLazy(java.util.Set<java.lang.String> channels)Unsubscribes the client from the specified channels.java.util.concurrent.CompletableFuture<java.lang.String>updateConnectionPassword(boolean immediateAuth)Update the current connection by removing the password.java.util.concurrent.CompletableFuture<java.lang.String>updateConnectionPassword(@NonNull java.lang.String password, boolean immediateAuth)Update the current connection with a new password.java.util.concurrent.CompletableFuture<java.lang.Long>wait(long numreplicas, long timeout)Blocks the current client until all the previous write commands are successfully transferred and acknowledged by at leastnumreplicasof replicas.java.util.concurrent.CompletableFuture<java.lang.Long[]>waitaof(long numlocal, long numreplicas, long timeout)Blocks the current client until all previous write commands are successfully transferred and acknowledged by at leastnumlocalandnumreplicasof replicas.java.util.concurrent.CompletableFuture<java.lang.String>watch(@NonNull GlideString[] keys)Marks the given keys to be watched for conditional execution of a transaction.java.util.concurrent.CompletableFuture<java.lang.String>watch(@NonNull java.lang.String[] keys)Marks the given keys to be watched for conditional execution of a transaction.java.util.concurrent.CompletableFuture<java.lang.Long>xack(@NonNull GlideString key, @NonNull GlideString group, @NonNull GlideString[] ids)Returns the number of messages that were successfully acknowledged by the consumer group member of a stream.java.util.concurrent.CompletableFuture<java.lang.Long>xack(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull java.lang.String[] ids)Returns the number of messages that were successfully acknowledged by the consumer group member of a stream.java.util.concurrent.CompletableFuture<GlideString>xadd(@NonNull GlideString key, @NonNull GlideString[][] values)Adds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created.java.util.concurrent.CompletableFuture<GlideString>xadd(@NonNull GlideString key, @NonNull GlideString[][] values, @NonNull StreamAddOptionsBinary options)Adds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created.java.util.concurrent.CompletableFuture<GlideString>xadd(@NonNull GlideString key, @NonNull java.util.Map<GlideString,GlideString> values)Adds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created.java.util.concurrent.CompletableFuture<GlideString>xadd(@NonNull GlideString key, @NonNull java.util.Map<GlideString,GlideString> values, @NonNull StreamAddOptionsBinary options)Adds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created.java.util.concurrent.CompletableFuture<java.lang.String>xadd(@NonNull java.lang.String key, @NonNull java.lang.String[][] values)Adds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created.java.util.concurrent.CompletableFuture<java.lang.String>xadd(@NonNull java.lang.String key, @NonNull java.lang.String[][] values, @NonNull StreamAddOptions options)Adds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created.java.util.concurrent.CompletableFuture<java.lang.String>xadd(@NonNull java.lang.String key, @NonNull java.util.Map<java.lang.String,java.lang.String> values)Adds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created.java.util.concurrent.CompletableFuture<java.lang.String>xadd(@NonNull java.lang.String key, @NonNull java.util.Map<java.lang.String,java.lang.String> values, @NonNull StreamAddOptions options)Adds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created.java.util.concurrent.CompletableFuture<java.lang.Object[]>xautoclaim(@NonNull GlideString key, @NonNull GlideString group, @NonNull GlideString consumer, long minIdleTime, @NonNull GlideString start)Transfers ownership of pending stream entries that match the specified criteria.java.util.concurrent.CompletableFuture<java.lang.Object[]>xautoclaim(@NonNull GlideString key, @NonNull GlideString group, @NonNull GlideString consumer, long minIdleTime, @NonNull GlideString start, long count)Transfers ownership of pending stream entries that match the specified criteria.java.util.concurrent.CompletableFuture<java.lang.Object[]>xautoclaim(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull java.lang.String consumer, long minIdleTime, @NonNull java.lang.String start)Transfers ownership of pending stream entries that match the specified criteria.java.util.concurrent.CompletableFuture<java.lang.Object[]>xautoclaim(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull java.lang.String consumer, long minIdleTime, @NonNull java.lang.String start, long count)Transfers ownership of pending stream entries that match the specified criteria.java.util.concurrent.CompletableFuture<java.lang.Object[]>xautoclaimJustId(@NonNull GlideString key, @NonNull GlideString group, @NonNull GlideString consumer, long minIdleTime, @NonNull GlideString start)Transfers ownership of pending stream entries that match the specified criteria.java.util.concurrent.CompletableFuture<java.lang.Object[]>xautoclaimJustId(@NonNull GlideString key, @NonNull GlideString group, @NonNull GlideString consumer, long minIdleTime, @NonNull GlideString start, long count)Transfers ownership of pending stream entries that match the specified criteria.java.util.concurrent.CompletableFuture<java.lang.Object[]>xautoclaimJustId(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull java.lang.String consumer, long minIdleTime, @NonNull java.lang.String start)Transfers ownership of pending stream entries that match the specified criteria.java.util.concurrent.CompletableFuture<java.lang.Object[]>xautoclaimJustId(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull java.lang.String consumer, long minIdleTime, @NonNull java.lang.String start, long count)Transfers ownership of pending stream entries that match the specified criteria.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[][]>>xclaim(@NonNull GlideString key, @NonNull GlideString group, @NonNull GlideString consumer, long minIdleTime, @NonNull GlideString[] ids)Changes the ownership of a pending message.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[][]>>xclaim(@NonNull GlideString key, @NonNull GlideString group, @NonNull GlideString consumer, long minIdleTime, @NonNull GlideString[] ids, @NonNull StreamClaimOptions options)Changes the ownership of a pending message.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[][]>>xclaim(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull java.lang.String consumer, long minIdleTime, @NonNull java.lang.String[] ids)Changes the ownership of a pending message.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[][]>>xclaim(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull java.lang.String consumer, long minIdleTime, @NonNull java.lang.String[] ids, @NonNull StreamClaimOptions options)Changes the ownership of a pending message.java.util.concurrent.CompletableFuture<GlideString[]>xclaimJustId(@NonNull GlideString key, @NonNull GlideString group, @NonNull GlideString consumer, long minIdleTime, @NonNull GlideString[] ids)Changes the ownership of a pending message.java.util.concurrent.CompletableFuture<GlideString[]>xclaimJustId(@NonNull GlideString key, @NonNull GlideString group, @NonNull GlideString consumer, long minIdleTime, @NonNull GlideString[] ids, @NonNull StreamClaimOptions options)Changes the ownership of a pending message.java.util.concurrent.CompletableFuture<java.lang.String[]>xclaimJustId(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull java.lang.String consumer, long minIdleTime, @NonNull java.lang.String[] ids)Changes the ownership of a pending message.java.util.concurrent.CompletableFuture<java.lang.String[]>xclaimJustId(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull java.lang.String consumer, long minIdleTime, @NonNull java.lang.String[] ids, @NonNull StreamClaimOptions options)Changes the ownership of a pending message.java.util.concurrent.CompletableFuture<java.lang.Long>xdel(@NonNull GlideString key, @NonNull GlideString[] ids)Removes the specified entries by id from a stream, and returns the number of entries deleted.java.util.concurrent.CompletableFuture<java.lang.Long>xdel(@NonNull java.lang.String key, @NonNull java.lang.String[] ids)Removes the specified entries by id from a stream, and returns the number of entries deleted.java.util.concurrent.CompletableFuture<java.lang.String>xgroupCreate(@NonNull GlideString key, @NonNull GlideString groupName, @NonNull GlideString id)Creates a new consumer group uniquely identified bygroupnamefor the stream stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>xgroupCreate(@NonNull GlideString key, @NonNull GlideString groupName, @NonNull GlideString id, @NonNull StreamGroupOptions options)Creates a new consumer group uniquely identified bygroupnamefor the stream stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>xgroupCreate(@NonNull java.lang.String key, @NonNull java.lang.String groupName, @NonNull java.lang.String id)Creates a new consumer group uniquely identified bygroupnamefor the stream stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>xgroupCreate(@NonNull java.lang.String key, @NonNull java.lang.String groupName, @NonNull java.lang.String id, @NonNull StreamGroupOptions options)Creates a new consumer group uniquely identified bygroupnamefor the stream stored atkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>xgroupCreateConsumer(@NonNull GlideString key, @NonNull GlideString group, @NonNull GlideString consumer)Creates a consumer namedconsumerin the consumer groupgroupfor the stream stored atkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>xgroupCreateConsumer(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull java.lang.String consumer)Creates a consumer namedconsumerin the consumer groupgroupfor the stream stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>xgroupDelConsumer(@NonNull GlideString key, @NonNull GlideString group, @NonNull GlideString consumer)Deletes a consumer namedconsumerin the consumer groupgroup.java.util.concurrent.CompletableFuture<java.lang.Long>xgroupDelConsumer(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull java.lang.String consumer)Deletes a consumer namedconsumerin the consumer groupgroup.java.util.concurrent.CompletableFuture<java.lang.Boolean>xgroupDestroy(@NonNull GlideString key, @NonNull GlideString groupname)Destroys the consumer groupgroupnamefor the stream stored atkey.java.util.concurrent.CompletableFuture<java.lang.Boolean>xgroupDestroy(@NonNull java.lang.String key, @NonNull java.lang.String groupname)Destroys the consumer groupgroupnamefor the stream stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>xgroupSetId(@NonNull GlideString key, @NonNull GlideString groupName, @NonNull GlideString id)Sets the last delivered ID for a consumer group.java.util.concurrent.CompletableFuture<java.lang.String>xgroupSetId(@NonNull GlideString key, @NonNull GlideString groupName, @NonNull GlideString id, long entriesRead)Sets the last delivered ID for a consumer group.java.util.concurrent.CompletableFuture<java.lang.String>xgroupSetId(@NonNull java.lang.String key, @NonNull java.lang.String groupName, @NonNull java.lang.String id)Sets the last delivered ID for a consumer group.java.util.concurrent.CompletableFuture<java.lang.String>xgroupSetId(@NonNull java.lang.String key, @NonNull java.lang.String groupName, @NonNull java.lang.String id, long entriesRead)Sets the last delivered ID for a consumer group.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>[]>xinfoConsumers(@NonNull GlideString key, @NonNull GlideString groupName)Returns the list of all consumers and their attributes for the given consumer group of the stream stored atkey.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>[]>xinfoConsumers(@NonNull java.lang.String key, @NonNull java.lang.String groupName)Returns the list of all consumers and their attributes for the given consumer group of the stream stored atkey.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>[]>xinfoGroups(@NonNull GlideString key)Returns the list of all consumer groups and their attributes for the stream stored atkey.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>[]>xinfoGroups(@NonNull java.lang.String key)Returns the list of all consumer groups and their attributes for the stream stored atkey.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>>xinfoStream(@NonNull GlideString key)Returns information about the stream stored at keykey.
To get more detailed information useStreamBaseCommands.xinfoStreamFull(GlideString)orStreamBaseCommands.xinfoStreamFull(GlideString, int).java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>xinfoStream(@NonNull java.lang.String key)Returns information about the stream stored at keykey.
To get more detailed information useStreamBaseCommands.xinfoStreamFull(String)orStreamBaseCommands.xinfoStreamFull(String, int).java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>>xinfoStreamFull(@NonNull GlideString key)Returns verbose information about the stream stored at keykey.
The output is limited by first10PEL entries.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>>xinfoStreamFull(@NonNull GlideString key, int count)Returns verbose information about the stream stored at keykey.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>xinfoStreamFull(@NonNull java.lang.String key)Returns verbose information about the stream stored at keykey.
The output is limited by first10PEL entries.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>xinfoStreamFull(@NonNull java.lang.String key, int count)Returns verbose information about the stream stored at keykey.java.util.concurrent.CompletableFuture<java.lang.Long>xlen(@NonNull GlideString key)Returns the number of entries in the stream stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>xlen(@NonNull java.lang.String key)Returns the number of entries in the stream stored atkey.java.util.concurrent.CompletableFuture<java.lang.Object[]>xpending(@NonNull GlideString key, @NonNull GlideString group)Returns stream message summary information for pending messages matching a given range of IDs.java.util.concurrent.CompletableFuture<java.lang.Object[][]>xpending(@NonNull GlideString key, @NonNull GlideString group, @NonNull StreamRange start, @NonNull StreamRange end, long count)Returns an extended form of stream message information for pending messages matching a given range of IDs.java.util.concurrent.CompletableFuture<java.lang.Object[][]>xpending(@NonNull GlideString key, @NonNull GlideString group, @NonNull StreamRange start, @NonNull StreamRange end, long count, @NonNull StreamPendingOptionsBinary options)Returns an extended form of stream message information for pending messages matching a given range of IDs.java.util.concurrent.CompletableFuture<java.lang.Object[]>xpending(@NonNull java.lang.String key, @NonNull java.lang.String group)Returns stream message summary information for pending messages matching a given range of IDs.java.util.concurrent.CompletableFuture<java.lang.Object[][]>xpending(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull StreamRange start, @NonNull StreamRange end, long count)Returns an extended form of stream message information for pending messages matching a given range of IDs.java.util.concurrent.CompletableFuture<java.lang.Object[][]>xpending(@NonNull java.lang.String key, @NonNull java.lang.String group, @NonNull StreamRange start, @NonNull StreamRange end, long count, @NonNull StreamPendingOptions options)Returns an extended form of stream message information for pending messages matching a given range of IDs.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[][]>>xrange(@NonNull GlideString key, @NonNull StreamRange start, @NonNull StreamRange end)Returns stream entries matching a given range of IDs.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[][]>>xrange(@NonNull GlideString key, @NonNull StreamRange start, @NonNull StreamRange end, long count)Returns stream entries matching a given range of IDs.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[][]>>xrange(@NonNull java.lang.String key, @NonNull StreamRange start, @NonNull StreamRange end)Returns stream entries matching a given range of IDs.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[][]>>xrange(@NonNull java.lang.String key, @NonNull StreamRange start, @NonNull StreamRange end, long count)Returns stream entries matching a given range of IDs.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String[][]>>>xread(@NonNull java.util.Map<java.lang.String,java.lang.String> keysAndIds)Reads entries from the given streams.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String[][]>>>xread(@NonNull java.util.Map<java.lang.String,java.lang.String> keysAndIds, @NonNull StreamReadOptions options)Reads entries from the given streams.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.util.Map<GlideString,GlideString[][]>>>xreadBinary(@NonNull java.util.Map<GlideString,GlideString> keysAndIds)Reads entries from the given streams.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.util.Map<GlideString,GlideString[][]>>>xreadBinary(@NonNull java.util.Map<GlideString,GlideString> keysAndIds, @NonNull StreamReadOptions options)Reads entries from the given streams.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.util.Map<GlideString,GlideString[][]>>>xreadgroup(@NonNull java.util.Map<GlideString,GlideString> keysAndIds, @NonNull GlideString group, @NonNull GlideString consumer)Reads entries from the given streams owned by a consumer group.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.util.Map<GlideString,GlideString[][]>>>xreadgroup(@NonNull java.util.Map<GlideString,GlideString> keysAndIds, @NonNull GlideString group, @NonNull GlideString consumer, @NonNull StreamReadGroupOptions options)Reads entries from the given streams owned by a consumer group.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String[][]>>>xreadgroup(@NonNull java.util.Map<java.lang.String,java.lang.String> keysAndIds, @NonNull java.lang.String group, @NonNull java.lang.String consumer)Reads entries from the given streams owned by a consumer group.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String[][]>>>xreadgroup(@NonNull java.util.Map<java.lang.String,java.lang.String> keysAndIds, @NonNull java.lang.String group, @NonNull java.lang.String consumer, @NonNull StreamReadGroupOptions options)Reads entries from the given streams owned by a consumer group.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[][]>>xrevrange(@NonNull GlideString key, @NonNull StreamRange end, @NonNull StreamRange start)Returns stream entries matching a given range of IDs in reverse order.
Equivalent toStreamBaseCommands.xrange(GlideString, StreamRange, StreamRange)but returns the entries in reverse order.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[][]>>xrevrange(@NonNull GlideString key, @NonNull StreamRange end, @NonNull StreamRange start, long count)Returns stream entries matching a given range of IDs in reverse order.
Equivalent toStreamBaseCommands.xrange(GlideString, StreamRange, StreamRange, long)but returns the entries in reverse order.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[][]>>xrevrange(@NonNull java.lang.String key, @NonNull StreamRange end, @NonNull StreamRange start)Returns stream entries matching a given range of IDs in reverse order.
Equivalent toStreamBaseCommands.xrange(String, StreamRange, StreamRange)but returns the entries in reverse order.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[][]>>xrevrange(@NonNull java.lang.String key, @NonNull StreamRange end, @NonNull StreamRange start, long count)Returns stream entries matching a given range of IDs in reverse order.
Equivalent toStreamBaseCommands.xrange(String, StreamRange, StreamRange, long)but returns the entries in reverse order.java.util.concurrent.CompletableFuture<java.lang.Long>xtrim(@NonNull GlideString key, @NonNull StreamTrimOptions options)Trims the stream by evicting older entries.java.util.concurrent.CompletableFuture<java.lang.Long>xtrim(@NonNull java.lang.String key, @NonNull StreamTrimOptions options)Trims the stream by evicting older entries.java.util.concurrent.CompletableFuture<java.lang.Long>zadd(@NonNull GlideString key, @NonNull java.util.Map<GlideString,java.lang.Double> membersScoresMap)Adds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.java.util.concurrent.CompletableFuture<java.lang.Long>zadd(@NonNull GlideString key, @NonNull java.util.Map<GlideString,java.lang.Double> membersScoresMap, boolean changed)Adds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.java.util.concurrent.CompletableFuture<java.lang.Long>zadd(@NonNull GlideString key, @NonNull java.util.Map<GlideString,java.lang.Double> membersScoresMap, @NonNull ZAddOptions options)Adds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.java.util.concurrent.CompletableFuture<java.lang.Long>zadd(@NonNull GlideString key, @NonNull java.util.Map<GlideString,java.lang.Double> membersScoresMap, @NonNull ZAddOptions options, boolean changed)Adds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.java.util.concurrent.CompletableFuture<java.lang.Long>zadd(@NonNull java.lang.String key, @NonNull java.util.Map<java.lang.String,java.lang.Double> membersScoresMap)Adds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.java.util.concurrent.CompletableFuture<java.lang.Long>zadd(@NonNull java.lang.String key, @NonNull java.util.Map<java.lang.String,java.lang.Double> membersScoresMap, boolean changed)Adds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.java.util.concurrent.CompletableFuture<java.lang.Long>zadd(@NonNull java.lang.String key, @NonNull java.util.Map<java.lang.String,java.lang.Double> membersScoresMap, @NonNull ZAddOptions options)Adds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.java.util.concurrent.CompletableFuture<java.lang.Long>zadd(@NonNull java.lang.String key, @NonNull java.util.Map<java.lang.String,java.lang.Double> membersScoresMap, @NonNull ZAddOptions options, boolean changed)Adds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.java.util.concurrent.CompletableFuture<java.lang.Double>zaddIncr(@NonNull GlideString key, @NonNull GlideString member, double increment)Increments the score of member in the sorted set stored atkeybyincrement.
Ifmemberdoes not exist in the sorted set, it is added withincrementas its score (as if its previous score was0.0).
Ifkeydoes not exist, a new sorted set with the specified member as its sole member is created.java.util.concurrent.CompletableFuture<java.lang.Double>zaddIncr(@NonNull GlideString key, @NonNull GlideString member, double increment, @NonNull ZAddOptions options)Increments the score of member in the sorted set stored atkeybyincrement.
Ifmemberdoes not exist in the sorted set, it is added withincrementas its score (as if its previous score was0.0).
Ifkeydoes not exist, a new sorted set with the specified member as its sole member is created.
zaddIncrwith empty option acts asSortedSetBaseCommands.zincrby(GlideString, double, GlideString).java.util.concurrent.CompletableFuture<java.lang.Double>zaddIncr(@NonNull java.lang.String key, @NonNull java.lang.String member, double increment)Increments the score of member in the sorted set stored atkeybyincrement.
Ifmemberdoes not exist in the sorted set, it is added withincrementas its score (as if its previous score was0.0).
Ifkeydoes not exist, a new sorted set with the specified member as its sole member is created.
zaddIncrwith empty option acts asSortedSetBaseCommands.zincrby(GlideString, double, GlideString).java.util.concurrent.CompletableFuture<java.lang.Double>zaddIncr(@NonNull java.lang.String key, @NonNull java.lang.String member, double increment, @NonNull ZAddOptions options)Increments the score of member in the sorted set stored atkeybyincrement.
Ifmemberdoes not exist in the sorted set, it is added withincrementas its score (as if its previous score was0.0).
Ifkeydoes not exist, a new sorted set with the specified member as its sole member is created.
zaddIncrwith empty option acts asSortedSetBaseCommands.zincrby(String, double, String).java.util.concurrent.CompletableFuture<java.lang.Long>zcard(@NonNull GlideString key)Returns the cardinality (number of elements) of the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>zcard(@NonNull java.lang.String key)Returns the cardinality (number of elements) of the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>zcount(@NonNull GlideString key, @NonNull RangeOptions.ScoreRange minScore, @NonNull RangeOptions.ScoreRange maxScore)Returns the number of members in the sorted set stored atkeywith scores betweenminScoreandmaxScore.java.util.concurrent.CompletableFuture<java.lang.Long>zcount(@NonNull java.lang.String key, @NonNull RangeOptions.ScoreRange minScore, @NonNull RangeOptions.ScoreRange maxScore)Returns the number of members in the sorted set stored atkeywith scores betweenminScoreandmaxScore.java.util.concurrent.CompletableFuture<GlideString[]>zdiff(@NonNull GlideString[] keys)Returns the difference between the first sorted set and all the successive sorted sets.
To get the elements with their scores, seeSortedSetBaseCommands.zdiffWithScores(java.lang.String[]).java.util.concurrent.CompletableFuture<java.lang.String[]>zdiff(@NonNull java.lang.String[] keys)Returns the difference between the first sorted set and all the successive sorted sets.
To get the elements with their scores, seeSortedSetBaseCommands.zdiffWithScores(java.lang.String[]).java.util.concurrent.CompletableFuture<java.lang.Long>zdiffstore(@NonNull GlideString destination, @NonNull GlideString[] keys)Calculates the difference between the first sorted set and all the successive sorted sets atkeysand stores the difference as a sorted set todestination, overwriting it if it already exists.java.util.concurrent.CompletableFuture<java.lang.Long>zdiffstore(@NonNull java.lang.String destination, @NonNull java.lang.String[] keys)Calculates the difference between the first sorted set and all the successive sorted sets atkeysand stores the difference as a sorted set todestination, overwriting it if it already exists.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>>zdiffWithScores(@NonNull GlideString[] keys)Returns the difference between the first sorted set and all the successive sorted sets.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>>zdiffWithScores(@NonNull java.lang.String[] keys)Returns the difference between the first sorted set and all the successive sorted sets.java.util.concurrent.CompletableFuture<java.lang.Double>zincrby(@NonNull GlideString key, double increment, @NonNull GlideString member)Increments the score ofmemberin the sorted set stored atkeybyincrement.
Ifmemberdoes not exist in the sorted set, it is added withincrementas its score.java.util.concurrent.CompletableFuture<java.lang.Double>zincrby(@NonNull java.lang.String key, double increment, @NonNull java.lang.String member)Increments the score ofmemberin the sorted set stored atkeybyincrement.
Ifmemberdoes not exist in the sorted set, it is added withincrementas its score.java.util.concurrent.CompletableFuture<java.lang.String[]>zinter(@NonNull WeightAggregateOptions.KeyArray keys)Returns the intersection of members from sorted sets specified by the givenkeys.java.util.concurrent.CompletableFuture<GlideString[]>zinter(@NonNull WeightAggregateOptions.KeyArrayBinary keys)Returns the intersection of members from sorted sets specified by the givenkeys.java.util.concurrent.CompletableFuture<java.lang.Long>zintercard(@NonNull GlideString[] keys)Returns the cardinality of the intersection of the sorted sets specified bykeys.java.util.concurrent.CompletableFuture<java.lang.Long>zintercard(@NonNull GlideString[] keys, long limit)Returns the cardinality of the intersection of the sorted sets specified bykeys.java.util.concurrent.CompletableFuture<java.lang.Long>zintercard(@NonNull java.lang.String[] keys)Returns the cardinality of the intersection of the sorted sets specified bykeys.java.util.concurrent.CompletableFuture<java.lang.Long>zintercard(@NonNull java.lang.String[] keys, long limit)Returns the cardinality of the intersection of the sorted sets specified bykeys.java.util.concurrent.CompletableFuture<java.lang.Long>zinterstore(@NonNull GlideString destination, @NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys)Computes the intersection of sorted sets given by the specifiedkeysOrWeightedKeys, and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>zinterstore(@NonNull GlideString destination, @NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys, @NonNull WeightAggregateOptions.Aggregate aggregate)Computes the intersection of sorted sets given by the specifiedkeysOrWeightedKeys, and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>zinterstore(@NonNull java.lang.String destination, @NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys)Computes the intersection of sorted sets given by the specifiedkeysOrWeightedKeys, and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>zinterstore(@NonNull java.lang.String destination, @NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys, @NonNull WeightAggregateOptions.Aggregate aggregate)Computes the intersection of sorted sets given by the specifiedkeysOrWeightedKeys, and stores the result indestination.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>>zinterWithScores(@NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys)Returns the intersection of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>>zinterWithScores(@NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys)Returns the intersection of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>>zinterWithScores(@NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys, @NonNull WeightAggregateOptions.Aggregate aggregate)Returns the intersection of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>>zinterWithScores(@NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys, @NonNull WeightAggregateOptions.Aggregate aggregate)Returns the intersection of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.java.util.concurrent.CompletableFuture<java.lang.Long>zlexcount(@NonNull GlideString key, @NonNull RangeOptions.LexRange minLex, @NonNull RangeOptions.LexRange maxLex)Returns the number of members in the sorted set stored atkeywith scores betweenminLexandmaxLex.java.util.concurrent.CompletableFuture<java.lang.Long>zlexcount(@NonNull java.lang.String key, @NonNull RangeOptions.LexRange minLex, @NonNull RangeOptions.LexRange maxLex)Returns the number of members in the sorted set stored atkeywith scores betweenminLexandmaxLex.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>>zmpop(@NonNull GlideString[] keys, @NonNull ScoreFilter modifier)Pops a member-score pair from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>>zmpop(@NonNull GlideString[] keys, @NonNull ScoreFilter modifier, long count)Pops multiple member-score pairs from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>zmpop(@NonNull java.lang.String[] keys, @NonNull ScoreFilter modifier)Pops a member-score pair from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>>zmpop(@NonNull java.lang.String[] keys, @NonNull ScoreFilter modifier, long count)Pops multiple member-score pairs from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.java.util.concurrent.CompletableFuture<java.lang.Double[]>zmscore(@NonNull GlideString key, @NonNull GlideString[] members)Returns the scores associated with the specifiedmembersin the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Double[]>zmscore(@NonNull java.lang.String key, @NonNull java.lang.String[] members)Returns the scores associated with the specifiedmembersin the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>>zpopmax(@NonNull GlideString key)Removes and returns the member with the highest score from the sorted set stored at the specifiedkey.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>>zpopmax(@NonNull GlideString key, long count)Removes and returns up tocountmembers with the highest scores from the sorted set stored at the specifiedkey.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>>zpopmax(@NonNull java.lang.String key)Removes and returns the member with the highest score from the sorted set stored at the specifiedkey.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>>zpopmax(@NonNull java.lang.String key, long count)Removes and returns up tocountmembers with the highest scores from the sorted set stored at the specifiedkey.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>>zpopmin(@NonNull GlideString key)Removes and returns the member with the lowest score from the sorted set stored at the specifiedkey.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>>zpopmin(@NonNull GlideString key, long count)Removes and returns up tocountmembers with the lowest scores from the sorted set stored at the specifiedkey.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>>zpopmin(@NonNull java.lang.String key)Removes and returns the member with the lowest score from the sorted set stored at the specifiedkey.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>>zpopmin(@NonNull java.lang.String key, long count)Removes and returns up tocountmembers with the lowest scores from the sorted set stored at the specifiedkey.java.util.concurrent.CompletableFuture<GlideString>zrandmember(@NonNull GlideString key)Returns a random element from the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.lang.String>zrandmember(@NonNull java.lang.String key)Returns a random element from the sorted set stored atkey.java.util.concurrent.CompletableFuture<GlideString[]>zrandmemberWithCount(@NonNull GlideString key, long count)Retrieves random elements from the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.lang.String[]>zrandmemberWithCount(@NonNull java.lang.String key, long count)Returns a random element from the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Object[][]>zrandmemberWithCountWithScores(@NonNull GlideString key, long count)Retrieves random elements along with their scores from the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Object[][]>zrandmemberWithCountWithScores(@NonNull java.lang.String key, long count)Retrieves random elements along with their scores from the sorted set stored atkey.java.util.concurrent.CompletableFuture<GlideString[]>zrange(@NonNull GlideString key, @NonNull RangeOptions.RangeQuery rangeQuery)Returns the specified range of elements in the sorted set stored atkey.
ZRANGEcan perform different types of range queries: by index (rank), by the score, or by lexicographical order.
To get the elements with their scores, seeSortedSetBaseCommands.zrangeWithScores(java.lang.String, glide.api.models.commands.RangeOptions.ScoredRangeQuery, boolean).java.util.concurrent.CompletableFuture<GlideString[]>zrange(@NonNull GlideString key, @NonNull RangeOptions.RangeQuery rangeQuery, boolean reverse)Returns the specified range of elements in the sorted set stored atkey.
ZRANGEcan perform different types of range queries: by index (rank), by the score, or by lexicographical order.
To get the elements with their scores, seeSortedSetBaseCommands.zrangeWithScores(java.lang.String, glide.api.models.commands.RangeOptions.ScoredRangeQuery, boolean).java.util.concurrent.CompletableFuture<java.lang.String[]>zrange(@NonNull java.lang.String key, @NonNull RangeOptions.RangeQuery rangeQuery)Returns the specified range of elements in the sorted set stored atkey.
ZRANGEcan perform different types of range queries: by index (rank), by the score, or by lexicographical order.
To get the elements with their scores, seeSortedSetBaseCommands.zrangeWithScores(java.lang.String, glide.api.models.commands.RangeOptions.ScoredRangeQuery, boolean).java.util.concurrent.CompletableFuture<java.lang.String[]>zrange(@NonNull java.lang.String key, @NonNull RangeOptions.RangeQuery rangeQuery, boolean reverse)Returns the specified range of elements in the sorted set stored atkey.
ZRANGEcan perform different types of range queries: by index (rank), by the score, or by lexicographical order.
To get the elements with their scores, seeSortedSetBaseCommands.zrangeWithScores(java.lang.String, glide.api.models.commands.RangeOptions.ScoredRangeQuery, boolean).java.util.concurrent.CompletableFuture<java.lang.Long>zrangestore(@NonNull GlideString destination, @NonNull GlideString source, @NonNull RangeOptions.RangeQuery rangeQuery)Stores a specified range of elements from the sorted set atsource, into a new sorted set atdestination.java.util.concurrent.CompletableFuture<java.lang.Long>zrangestore(@NonNull GlideString destination, @NonNull GlideString source, @NonNull RangeOptions.RangeQuery rangeQuery, boolean reverse)Stores a specified range of elements from the sorted set atsource, into a new sorted set atdestination.java.util.concurrent.CompletableFuture<java.lang.Long>zrangestore(@NonNull java.lang.String destination, @NonNull java.lang.String source, @NonNull RangeOptions.RangeQuery rangeQuery)Stores a specified range of elements from the sorted set atsource, into a new sorted set atdestination.java.util.concurrent.CompletableFuture<java.lang.Long>zrangestore(@NonNull java.lang.String destination, @NonNull java.lang.String source, @NonNull RangeOptions.RangeQuery rangeQuery, boolean reverse)Stores a specified range of elements from the sorted set atsource, into a new sorted set atdestination.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>>zrangeWithScores(@NonNull GlideString key, @NonNull RangeOptions.ScoredRangeQuery rangeQuery)Returns the specified range of elements with their scores in the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>>zrangeWithScores(@NonNull GlideString key, @NonNull RangeOptions.ScoredRangeQuery rangeQuery, boolean reverse)Returns the specified range of elements with their scores in the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>>zrangeWithScores(@NonNull java.lang.String key, @NonNull RangeOptions.ScoredRangeQuery rangeQuery)Returns the specified range of elements with their scores in the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>>zrangeWithScores(@NonNull java.lang.String key, @NonNull RangeOptions.ScoredRangeQuery rangeQuery, boolean reverse)Returns the specified range of elements with their scores in the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Long>zrank(@NonNull GlideString key, @NonNull GlideString member)Returns the rank ofmemberin the sorted set stored atkey, with scores ordered from low to high, starting from0.
To get the rank ofmemberwith its score, seeSortedSetBaseCommands.zrankWithScore(java.lang.String, java.lang.String).java.util.concurrent.CompletableFuture<java.lang.Long>zrank(@NonNull java.lang.String key, @NonNull java.lang.String member)Returns the rank ofmemberin the sorted set stored atkey, with scores ordered from low to high, starting from0.
To get the rank ofmemberwith its score, seeSortedSetBaseCommands.zrankWithScore(java.lang.String, java.lang.String).java.util.concurrent.CompletableFuture<java.lang.Object[]>zrankWithScore(@NonNull GlideString key, @NonNull GlideString member)Returns the rank ofmemberin the sorted set stored atkeywith its score, where scores are ordered from the lowest to highest, starting from0.java.util.concurrent.CompletableFuture<java.lang.Object[]>zrankWithScore(@NonNull java.lang.String key, @NonNull java.lang.String member)Returns the rank ofmemberin the sorted set stored atkeywith its score, where scores are ordered from the lowest to highest, starting from0.java.util.concurrent.CompletableFuture<java.lang.Long>zrem(@NonNull GlideString key, @NonNull GlideString[] members)Removes the specified members from the sorted set stored atkey.
Specified members that are not a member of this set are ignored.java.util.concurrent.CompletableFuture<java.lang.Long>zrem(@NonNull java.lang.String key, @NonNull java.lang.String[] members)Removes the specified members from the sorted set stored atkey.
Specified members that are not a member of this set are ignored.java.util.concurrent.CompletableFuture<java.lang.Long>zremrangebylex(@NonNull GlideString key, @NonNull RangeOptions.LexRange minLex, @NonNull RangeOptions.LexRange maxLex)Removes all elements in the sorted set stored atkeywith a lexicographical order betweenminLexandmaxLex.java.util.concurrent.CompletableFuture<java.lang.Long>zremrangebylex(@NonNull java.lang.String key, @NonNull RangeOptions.LexRange minLex, @NonNull RangeOptions.LexRange maxLex)Removes all elements in the sorted set stored atkeywith a lexicographical order betweenminLexandmaxLex.java.util.concurrent.CompletableFuture<java.lang.Long>zremrangebyrank(@NonNull GlideString key, long start, long end)Removes all elements in the sorted set stored atkeywith rank betweenstartandend.java.util.concurrent.CompletableFuture<java.lang.Long>zremrangebyrank(@NonNull java.lang.String key, long start, long end)Removes all elements in the sorted set stored atkeywith rank betweenstartandend.java.util.concurrent.CompletableFuture<java.lang.Long>zremrangebyscore(@NonNull GlideString key, @NonNull RangeOptions.ScoreRange minScore, @NonNull RangeOptions.ScoreRange maxScore)Removes all elements in the sorted set stored atkeywith a score betweenminScoreandmaxScore.java.util.concurrent.CompletableFuture<java.lang.Long>zremrangebyscore(@NonNull java.lang.String key, @NonNull RangeOptions.ScoreRange minScore, @NonNull RangeOptions.ScoreRange maxScore)Removes all elements in the sorted set stored atkeywith a score betweenminScoreandmaxScore.java.util.concurrent.CompletableFuture<java.lang.Long>zrevrank(@NonNull GlideString key, @NonNull GlideString member)Returns the rank ofmemberin the sorted set stored atkey, where scores are ordered from the highest to lowest, starting from0.
To get the rank ofmemberwith its score, seeSortedSetBaseCommands.zrevrankWithScore(java.lang.String, java.lang.String).java.util.concurrent.CompletableFuture<java.lang.Long>zrevrank(@NonNull java.lang.String key, @NonNull java.lang.String member)Returns the rank ofmemberin the sorted set stored atkey, where scores are ordered from the highest to lowest, starting from0.
To get the rank ofmemberwith its score, seeSortedSetBaseCommands.zrevrankWithScore(java.lang.String, java.lang.String).java.util.concurrent.CompletableFuture<java.lang.Object[]>zrevrankWithScore(@NonNull GlideString key, @NonNull GlideString member)Returns the rank ofmemberin the sorted set stored atkeywith its score, where scores are ordered from the highest to lowest, starting from0.java.util.concurrent.CompletableFuture<java.lang.Object[]>zrevrankWithScore(@NonNull java.lang.String key, @NonNull java.lang.String member)Returns the rank ofmemberin the sorted set stored atkeywith its score, where scores are ordered from the highest to lowest, starting from0.java.util.concurrent.CompletableFuture<java.lang.Object[]>zscan(@NonNull GlideString key, @NonNull GlideString cursor)Iterates incrementally over a sorted set.java.util.concurrent.CompletableFuture<java.lang.Object[]>zscan(@NonNull GlideString key, @NonNull GlideString cursor, @NonNull ZScanOptionsBinary zScanOptions)Iterates incrementally over a sorted set.java.util.concurrent.CompletableFuture<java.lang.Object[]>zscan(@NonNull java.lang.String key, @NonNull java.lang.String cursor)Iterates incrementally over a sorted set.java.util.concurrent.CompletableFuture<java.lang.Object[]>zscan(@NonNull java.lang.String key, @NonNull java.lang.String cursor, @NonNull ZScanOptions zScanOptions)Iterates incrementally over a sorted set.java.util.concurrent.CompletableFuture<java.lang.Double>zscore(@NonNull GlideString key, @NonNull GlideString member)Returns the score ofmemberin the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.lang.Double>zscore(@NonNull java.lang.String key, @NonNull java.lang.String member)Returns the score ofmemberin the sorted set stored atkey.java.util.concurrent.CompletableFuture<java.lang.String[]>zunion(@NonNull WeightAggregateOptions.KeyArray keys)Returns the union of members from sorted sets specified by the givenkeys.
To get the elements with their scores, seeSortedSetBaseCommands.zunionWithScores(glide.api.models.commands.WeightAggregateOptions.KeysOrWeightedKeys, glide.api.models.commands.WeightAggregateOptions.Aggregate).java.util.concurrent.CompletableFuture<GlideString[]>zunion(@NonNull WeightAggregateOptions.KeyArrayBinary keys)Returns the union of members from sorted sets specified by the givenkeys.
To get the elements with their scores, seeSortedSetBaseCommands.zunionWithScores(glide.api.models.commands.WeightAggregateOptions.KeysOrWeightedKeys, glide.api.models.commands.WeightAggregateOptions.Aggregate).java.util.concurrent.CompletableFuture<java.lang.Long>zunionstore(@NonNull GlideString destination, @NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys)Computes the union of sorted sets given by the specifiedKeysOrWeightedKeys, and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>zunionstore(@NonNull GlideString destination, @NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys, @NonNull WeightAggregateOptions.Aggregate aggregate)Computes the union of sorted sets given by the specifiedKeysOrWeightedKeys, and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>zunionstore(@NonNull java.lang.String destination, @NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys)Computes the union of sorted sets given by the specifiedKeysOrWeightedKeys, and stores the result indestination.java.util.concurrent.CompletableFuture<java.lang.Long>zunionstore(@NonNull java.lang.String destination, @NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys, @NonNull WeightAggregateOptions.Aggregate aggregate)Computes the union of sorted sets given by the specifiedKeysOrWeightedKeys, and stores the result indestination.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>>zunionWithScores(@NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys)Returns the union of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.
To perform azunionoperation while specifying aggregation settings, useSortedSetBaseCommands.zunionWithScores(KeysOrWeightedKeys, Aggregate).java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>>zunionWithScores(@NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys)Returns the union of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.
To perform azunionoperation while specifying aggregation settings, useSortedSetBaseCommands.zunionWithScores(KeysOrWeightedKeys, Aggregate).java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>>zunionWithScores(@NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys, @NonNull WeightAggregateOptions.Aggregate aggregate)Returns the union of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>>zunionWithScores(@NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys, @NonNull WeightAggregateOptions.Aggregate aggregate)Returns the union of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.
-
-
-
Field Detail
-
OK
public static final java.lang.String OK
Valkey simple string response with "OK"
-
WITH_VALUES_VALKEY_API
public static final java.lang.String WITH_VALUES_VALKEY_API
- See Also:
- Constant Field Values
-
COUNT_VALKEY_API
public static final java.lang.String COUNT_VALKEY_API
- See Also:
- Constant Field Values
-
WITH_SCORE_VALKEY_API
public static final java.lang.String WITH_SCORE_VALKEY_API
- See Also:
- Constant Field Values
-
WITH_SCORES_VALKEY_API
public static final java.lang.String WITH_SCORES_VALKEY_API
- See Also:
- Constant Field Values
-
LIMIT_VALKEY_API
public static final java.lang.String LIMIT_VALKEY_API
- See Also:
- Constant Field Values
-
SET_LIMIT_VALKEY_API
public static final java.lang.String SET_LIMIT_VALKEY_API
- See Also:
- Constant Field Values
-
COUNT_FOR_LIST_VALKEY_API
public static final java.lang.String COUNT_FOR_LIST_VALKEY_API
- See Also:
- Constant Field Values
-
REPLACE_VALKEY_API
public static final java.lang.String REPLACE_VALKEY_API
- See Also:
- Constant Field Values
-
LEN_VALKEY_API
public static final java.lang.String LEN_VALKEY_API
- See Also:
- Constant Field Values
-
IDX_COMMAND_STRING
public static final java.lang.String IDX_COMMAND_STRING
- See Also:
- Constant Field Values
-
MINMATCHLEN_COMMAND_STRING
public static final java.lang.String MINMATCHLEN_COMMAND_STRING
- See Also:
- Constant Field Values
-
WITHMATCHLEN_COMMAND_STRING
public static final java.lang.String WITHMATCHLEN_COMMAND_STRING
- See Also:
- Constant Field Values
-
LCS_MATCHES_RESULT_KEY
public static final java.lang.String LCS_MATCHES_RESULT_KEY
- See Also:
- Constant Field Values
-
SCHEDULE_VALKEY_API
protected static final java.lang.String SCHEDULE_VALKEY_API
- See Also:
- Constant Field Values
-
CANCEL_VALKEY_API
protected static final java.lang.String CANCEL_VALKEY_API
- See Also:
- Constant Field Values
-
EMPTY_STRING_ARRAY
protected static final java.lang.String[] EMPTY_STRING_ARRAY
-
EMPTY_GLIDE_STRING_ARRAY
protected static final GlideString[] EMPTY_GLIDE_STRING_ARRAY
-
commandManager
protected final CommandManager commandManager
-
connectionManager
protected final ConnectionManager connectionManager
-
messageHandler
protected final MessageHandler messageHandler
-
subscriptionConfiguration
protected final java.util.Optional<BaseSubscriptionConfiguration> subscriptionConfiguration
-
-
Constructor Detail
-
BaseClient
protected BaseClient(BaseClient.ClientBuilder builder)
Constructor for client initialization
-
-
Method Detail
-
createClient
protected static <T extends BaseClient> java.util.concurrent.CompletableFuture<T> createClient(@NonNull @NonNull BaseClientConfiguration config, java.util.function.Function<BaseClient.ClientBuilder,T> constructor)
Create native client- Type Parameters:
T- Client type.- Parameters:
config- client Configuration.constructor- client constructor reference.- Returns:
- a Future to connect and return a client.
-
buildConnectionManager
protected static ConnectionManager buildConnectionManager()
Build ConnectionManager for native client
-
buildMessageHandler
protected static MessageHandler buildMessageHandler(BaseClientConfiguration config)
Build MessageHandler for native client
-
buildCommandManager
protected static CommandManager buildCommandManager(ConnectionManager connectionManager)
Build CommandManager for native client
-
getStatistics
public java.util.Map<java.lang.String,java.lang.String> getStatistics()
Return a statistics- Returns:
- Return a
Mapthat contains the statistics collected internally by GLIDE core
-
tryGetPubSubMessage
public PubSubMessage tryGetPubSubMessage()
Return a next pubsub message if it is present.- Returns:
- A message if any or
nullif there are no unread messages. - Throws:
ConfigurationError- If client is not subscribed to any channel or if client configured with a callback.
-
getPubSubMessage
public java.util.concurrent.CompletableFuture<PubSubMessage> getPubSubMessage()
Returns a promise for a next pubsub message.
Message gets unrecoverable lost if future is cancelled or reference to this future is lost.- Returns:
- A
CompletableFuturewhich will asynchronously hold the next available message. - Throws:
ConfigurationError- If client is not subscribed to any channel or if client configured with a callback.
-
close
public void close() throws java.util.concurrent.ExecutionExceptionCloses this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.util.concurrent.ExecutionException- See Also:
- AutoCloseable::close()
-
isConnected
public boolean isConnected()
Check if the client is connected and ready for commands.
-
getClientInfo
public java.lang.String getClientInfo()
Get client information from the native layer.
-
handleValkeyResponse
protected <T> T handleValkeyResponse(java.lang.Class<T> classType, java.util.EnumSet<BaseClient.ResponseFlags> flags, ResponseOuterClass.Response response) throws GlideExceptionExtracts the value from aGLIDE coreresponse message and either throws an exception or returns the value as an object of typeT.- Type Parameters:
T- The return value type.- Parameters:
response- protobuf message.classType- ParameterTclass type.flags- A set of parameters which describes how to handle the response. Could be empty or any combination ofBaseClient.ResponseFlags.ENCODING_UTF8to return the data as aString; if unset, abyte[]is returned.BaseClient.ResponseFlags.IS_NULLABLEto acceptnullvalues.
- Returns:
- Response as an object of type
Tornull. - Throws:
GlideException- On a type mismatch.
-
handleObjectOrNullResponse
protected java.lang.Object handleObjectOrNullResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleBinaryObjectOrNullResponse
protected java.lang.Object handleBinaryObjectOrNullResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleStringResponse
protected java.lang.String handleStringResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleStringOrNullResponse
protected java.lang.String handleStringOrNullResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleBytesOrNullResponse
protected byte[] handleBytesOrNullResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleGlideStringOrNullResponse
protected GlideString handleGlideStringOrNullResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleGlideStringResponse
protected GlideString handleGlideStringResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleBooleanResponse
protected java.lang.Boolean handleBooleanResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleLongResponse
protected java.lang.Long handleLongResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleLongOrNullResponse
protected java.lang.Long handleLongOrNullResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleDoubleResponse
protected java.lang.Double handleDoubleResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleDoubleOrNullResponse
protected java.lang.Double handleDoubleOrNullResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleArrayResponse
protected java.lang.Object[] handleArrayResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleArrayResponseBinary
protected java.lang.Object[] handleArrayResponseBinary(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleArrayOrNullResponse
protected java.lang.Object[] handleArrayOrNullResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleArrayOrNullResponseBinary
protected java.lang.Object[] handleArrayOrNullResponseBinary(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleMapResponse
protected <V> java.util.Map<java.lang.String,V> handleMapResponse(ResponseOuterClass.Response response) throws GlideException
- Type Parameters:
V- Value type.- Parameters:
response- A Protobuf response- Returns:
- A map of
StringtoV. - Throws:
GlideException
-
handleBinaryStringMapResponse
protected <V> java.util.Map<GlideString,V> handleBinaryStringMapResponse(ResponseOuterClass.Response response) throws GlideException
Get a map and convertMapkeys frombyte[]toString.- Type Parameters:
V- Value type.- Parameters:
response- A Protobuf response- Returns:
- A map of
GlideStringtoV. - Throws:
GlideException
-
handleMapOrNullResponse
protected <V> java.util.Map<java.lang.String,V> handleMapOrNullResponse(ResponseOuterClass.Response response) throws GlideException
- Type Parameters:
V- Value type.- Parameters:
response- A Protobuf response- Returns:
- A map of
StringtoVornull - Throws:
GlideException
-
handleBinaryStringMapOrNullResponse
protected <V> java.util.Map<GlideString,V> handleBinaryStringMapOrNullResponse(ResponseOuterClass.Response response) throws GlideException
- Type Parameters:
V- Value type.- Parameters:
response- A Protobuf response- Returns:
- A map of
StringtoVornull - Throws:
GlideException
-
handleMapOfArraysResponse
protected java.util.Map<java.lang.String,java.lang.String[]> handleMapOfArraysResponse(ResponseOuterClass.Response response) throws GlideException
- Parameters:
response- A Protobuf response- Returns:
- A map of
StringtoString[] - Throws:
GlideException
-
handleBinaryStringMapOfArraysResponse
protected java.util.Map<java.lang.String,GlideString[]> handleBinaryStringMapOfArraysResponse(ResponseOuterClass.Response response) throws GlideException
- Parameters:
response- A Protobuf response- Returns:
- A map of
StringtoGlideString[] - Throws:
GlideException
-
handleXReadResponse
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String[][]>> handleXReadResponse(ResponseOuterClass.Response response) throws GlideException
- Parameters:
response- A Protobuf response- Returns:
- A map of a map of
String[][] - Throws:
GlideException
-
handleXReadResponseBinary
protected java.util.Map<GlideString,java.util.Map<GlideString,GlideString[][]>> handleXReadResponseBinary(ResponseOuterClass.Response response) throws GlideException
- Parameters:
response- A Protobuf response- Returns:
- A map of a map of
GlideString[][] - Throws:
GlideException
-
handleSetResponse
protected java.util.Set<java.lang.String> handleSetResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleSetBinaryResponse
protected java.util.Set<GlideString> handleSetBinaryResponse(ResponseOuterClass.Response response) throws GlideException
- Throws:
GlideException
-
handleFunctionListResponse
protected java.util.Map<java.lang.String,java.lang.Object>[] handleFunctionListResponse(java.lang.Object[] response)
Process aFUNCTION LISTstandalone response.
-
handleFunctionListResponseBinary
protected java.util.Map<GlideString,java.lang.Object>[] handleFunctionListResponseBinary(java.lang.Object[] response)
Process aFUNCTION LISTstandalone response.
-
handleFunctionStatsResponse
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> handleFunctionStatsResponse(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> response)
Process aFUNCTION STATSresponse from one node.
-
handleFunctionStatsBinaryResponse
protected java.util.Map<GlideString,java.util.Map<GlideString,java.lang.Object>> handleFunctionStatsBinaryResponse(java.util.Map<GlideString,java.util.Map<GlideString,java.lang.Object>> response)
Process aFUNCTION STATSresponse from one node.
-
handleFunctionStatsResponse
protected ClusterValue<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>> handleFunctionStatsResponse(ResponseOuterClass.Response response, boolean isSingleValue)
Process aFUNCTION STATScluster response.
-
handleFunctionStatsBinaryResponse
protected ClusterValue<java.util.Map<GlideString,java.util.Map<GlideString,java.lang.Object>>> handleFunctionStatsBinaryResponse(ResponseOuterClass.Response response, boolean isSingleValue)
Process aFUNCTION STATScluster response.
-
handleLcsIdxResponse
protected java.util.Map<java.lang.String,java.lang.Object> handleLcsIdxResponse(java.util.Map<java.lang.String,java.lang.Object> response) throws GlideExceptionProcess aLCS key1 key2 IDXresponse- Throws:
GlideException
-
updateConnectionPassword
public java.util.concurrent.CompletableFuture<java.lang.String> updateConnectionPassword(@NonNull @NonNull java.lang.String password, boolean immediateAuth)Update the current connection with a new password.This method is useful in scenarios where the server password has changed or when utilizing short-lived passwords for enhanced security. It allows the client to update its password to reconnect upon disconnection without the need to recreate the client instance. This ensures that the internal reconnection mechanism can handle reconnection seamlessly, preventing the loss of in-flight commands.
- Parameters:
immediateAuth- Abooleanflag. Iftrue, the client will authenticate immediately with the new password against all connections, UsingAUTHcommand.
If password supplied is an empty string, the client will not perform auth and a warning will be returned.
The default is `false`.password- A new password to set.- Returns:
"OK".- Throws:
ConfigurationError- if the client is using IAM authentication.- Example:
String response = client.resetConnectionPassword("new_password", RE_AUTHENTICATE).get(); assert response.equals("OK");
-
updateConnectionPassword
public java.util.concurrent.CompletableFuture<java.lang.String> updateConnectionPassword(boolean immediateAuth)
Update the current connection by removing the password.This method is useful in scenarios where the server password has changed or when utilizing short-lived passwords for enhanced security. It allows the client to update its password to reconnect upon disconnection without the need to recreate the client instance. This ensures that the internal reconnection mechanism can handle reconnection seamlessly, preventing the loss of in-flight commands.
- Parameters:
immediateAuth- Abooleanflag. Iftrue, the client will authenticate immediately with the new password against all connections, UsingAUTHcommand.
If password supplied is an empty string, the client will not perform auth and a warning will be returned.
The default is `false`.- Returns:
"OK".- Throws:
ConfigurationError- if the client is using IAM authentication.- Example:
String response = client.resetConnectionPassword(true).get(); assert response.equals("OK");
-
refreshIamToken
public java.util.concurrent.CompletableFuture<java.lang.String> refreshIamToken()
Manually refresh the IAM token for the current connection.This method is only available if the client was created with IAM authentication. It triggers an immediate refresh of the IAM token and updates the connection.
- Returns:
- A CompletableFuture that resolves to
"OK"on success. - Throws:
ConfigurationError- if the client is not using IAM authentication.- Example:
// Create client with IAM authentication GlideClientConfiguration config = GlideClientConfiguration.builder() .address(NodeAddress.builder().host("my-cluster.amazonaws.com").port(6379).build()) .credentials(ServerCredentials.builder() .username("myUser") .iamConfig(IamAuthConfig.builder() .clusterName("my-cluster") .service(ServiceType.ELASTICACHE) .region("us-east-1") .build()) .build()) .build(); GlideClient client = GlideClient.createClient(config).get(); // Manually refresh the IAM token String response = client.refreshIamToken().get(); assert response.equals("OK");
-
getCacheHitRate
public java.util.concurrent.CompletableFuture<java.lang.Double> getCacheHitRate()
Get the cache hit rate metric.This method returns the percentage of cache hits out of total cache requests. Only available when client-side caching is enabled with metrics collection.
- Returns:
- A CompletableFuture that resolves to the cache hit rate as a percentage (0.0 to 100.0).
- Throws:
RequestException- if caching is not enabled or metrics are disabled.- Example:
// Get cache hit rate Double hitRate = client.getCacheHitRate().get(); System.out.println("Cache hit rate: " + hitRate + "%");
-
getCacheMissRate
public java.util.concurrent.CompletableFuture<java.lang.Double> getCacheMissRate()
Get the cache miss rate metric.This method returns the percentage of cache misses out of total cache requests. Only available when client-side caching is enabled with metrics collection.
- Returns:
- A CompletableFuture that resolves to the cache miss rate as a percentage (0.0 to 100.0).
- Throws:
RequestException- if caching is not enabled or metrics are disabled.- Example:
// Get cache miss rate Double missRate = client.getCacheMissRate().get(); System.out.println("Cache miss rate: " + missRate + "%");
-
getCacheEntryCount
public java.util.concurrent.CompletableFuture<java.lang.Long> getCacheEntryCount()
Get the current number of entries in the cache.This method returns the total count of cached entries currently stored in the client-side cache. Available when client-side caching is enabled.
- Returns:
- A CompletableFuture that resolves to the number of cache entries.
- Throws:
RequestException- if caching is not enabled.- Example:
// Get cache entry count Long entryCount = client.getCacheEntryCount().get(); System.out.println("Cache entries: " + entryCount);
-
getCacheEvictions
public java.util.concurrent.CompletableFuture<java.lang.Long> getCacheEvictions()
Get the total number of cache evictions.This method returns the count of entries that have been evicted from the cache due to memory limits or eviction policies. Only available when client-side caching is enabled with metrics collection.
- Returns:
- A CompletableFuture that resolves to the total number of evictions.
- Throws:
RequestException- if caching is not enabled or metrics are disabled.- Example:
// Get cache evictions count Long evictions = client.getCacheEvictions().get(); System.out.println("Cache evictions: " + evictions);
-
getCacheExpirations
public java.util.concurrent.CompletableFuture<java.lang.Long> getCacheExpirations()
Get the total number of cache expirations.This method returns the count of entries that have expired from the cache due to TTL settings. Only available when client-side caching is enabled with metrics collection.
- Returns:
- A CompletableFuture that resolves to the total number of expirations.
- Throws:
RequestException- if caching is not enabled or metrics are disabled.- Example:
// Get cache expirations count Long expirations = client.getCacheExpirations().get(); System.out.println("Cache expirations: " + expirations);
-
getCacheTotalLookups
public java.util.concurrent.CompletableFuture<java.lang.Long> getCacheTotalLookups()
Get the total number of cache lookups (hits + misses).This method returns the sum of cache hits and misses, representing the total number of cache lookup operations performed. Only available when client-side caching is enabled with metrics collection.
- Returns:
- A CompletableFuture that resolves to the total number of cache lookups.
- Throws:
RequestException- if caching is not enabled or metrics are disabled.- Example:
// Get total cache lookups Long totalLookups = client.getCacheTotalLookups().get(); System.out.println("Total cache lookups: " + totalLookups);
-
del
public java.util.concurrent.CompletableFuture<java.lang.Long> del(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:GenericBaseCommandsRemoves the specifiedkeysfrom the database. A key is ignored if it does not exist.- Specified by:
delin interfaceGenericBaseCommands- Parameters:
keys- The keys we wanted to remove.- Returns:
- The number of keys that were removed.
- See Also:
- valkey.io for details.
-
del
public java.util.concurrent.CompletableFuture<java.lang.Long> del(@NonNull @NonNull GlideString[] keys)Description copied from interface:GenericBaseCommandsRemoves the specifiedkeysfrom the database. A key is ignored if it does not exist.- Specified by:
delin interfaceGenericBaseCommands- Parameters:
keys- The keys we wanted to remove.- Returns:
- The number of keys that were removed.
- See Also:
- valkey.io for details.
-
get
public java.util.concurrent.CompletableFuture<java.lang.String> get(@NonNull @NonNull java.lang.String key)Description copied from interface:StringBaseCommandsGets the value associated with the givenkey, ornullif no suchkeyexists.- Specified by:
getin interfaceStringBaseCommands- Parameters:
key- Thekeyto retrieve from the database.- Returns:
- If
keyexists, returns thevalueofkeyas aString. Otherwise, returnnull. - See Also:
- valkey.io for details.
-
get
public java.util.concurrent.CompletableFuture<GlideString> get(@NonNull @NonNull GlideString key)
Description copied from interface:StringBaseCommandsGets the value associated with the givenkey, ornullif no suchkeyexists.- Specified by:
getin interfaceStringBaseCommands- Parameters:
key- Thekeyto retrieve from the database.- Returns:
- If
keyexists, returns thevalueofkeyas aString. Otherwise, returnnull. - See Also:
- valkey.io for details.
-
getdel
public java.util.concurrent.CompletableFuture<java.lang.String> getdel(@NonNull @NonNull java.lang.String key)Description copied from interface:StringBaseCommandsGets a string value associated with the givenkeyand deletes the key.- Specified by:
getdelin interfaceStringBaseCommands- Parameters:
key- Thekeyto retrieve from the database.- Returns:
- If
keyexists, returns thevalueofkey. Otherwise, returnnull. - See Also:
- valkey.io for details.
-
getdel
public java.util.concurrent.CompletableFuture<GlideString> getdel(@NonNull @NonNull GlideString key)
Description copied from interface:StringBaseCommandsGets a string value associated with the givenkeyand deletes the key.- Specified by:
getdelin interfaceStringBaseCommands- Parameters:
key- Thekeyto retrieve from the database.- Returns:
- If
keyexists, returns thevalueofkey. Otherwise, returnnull. - See Also:
- valkey.io for details.
-
getex
public java.util.concurrent.CompletableFuture<java.lang.String> getex(@NonNull @NonNull java.lang.String key)Description copied from interface:StringBaseCommandsGets the value associated with the givenkey.- Specified by:
getexin interfaceStringBaseCommands- Parameters:
key- Thekeyto retrieve from the database.- Returns:
- If
keyexists, return thevalueof thekey. Otherwise, returnnull. - See Also:
- valkey.io for details.
-
getex
public java.util.concurrent.CompletableFuture<GlideString> getex(@NonNull @NonNull GlideString key)
Description copied from interface:StringBaseCommandsGets the value associated with the givenkey.- Specified by:
getexin interfaceStringBaseCommands- Parameters:
key- Thekeyto retrieve from the database.- Returns:
- If
keyexists, return thevalueof thekey. Otherwise, returnnull. - See Also:
- valkey.io for details.
-
getex
public java.util.concurrent.CompletableFuture<java.lang.String> getex(@NonNull @NonNull java.lang.String key, @NonNull @NonNull GetExOptions options)Description copied from interface:StringBaseCommandsGets the value associated with the givenkey.- Specified by:
getexin interfaceStringBaseCommands- Parameters:
key- Thekeyto retrieve from the database.options- TheGetExOptionsoptions.- Returns:
- If
keyexists, return thevalueof thekey. Otherwise, returnnull. - See Also:
- valkey.io for details.
-
getex
public java.util.concurrent.CompletableFuture<GlideString> getex(@NonNull @NonNull GlideString key, @NonNull @NonNull GetExOptions options)
Description copied from interface:StringBaseCommandsGets the value associated with the givenkey.- Specified by:
getexin interfaceStringBaseCommands- Parameters:
key- Thekeyto retrieve from the database.options- TheGetExOptionsoptions.- Returns:
- If
keyexists, return thevalueof thekey. Otherwise, returnnull. - See Also:
- valkey.io for details.
-
set
public java.util.concurrent.CompletableFuture<java.lang.String> set(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String value)Description copied from interface:StringBaseCommandsSets the givenkeywith the given value.- Specified by:
setin interfaceStringBaseCommands- Parameters:
key- Thekeyto store.value- The value to store with the givenkey.- Returns:
- A simple
"OK"response. - See Also:
- valkey.io for details.
-
set
public java.util.concurrent.CompletableFuture<java.lang.String> set(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString value)Description copied from interface:StringBaseCommandsSets the givenkeywith the given value.- Specified by:
setin interfaceStringBaseCommands- Parameters:
key- Thekeyto store.value- The value to store with the givenkey.- Returns:
- A simple
"OK"response. - See Also:
- valkey.io for details.
-
set
public java.util.concurrent.CompletableFuture<java.lang.String> set(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String value, @NonNull @NonNull SetOptions options)Description copied from interface:StringBaseCommandsSets the given key with the given value. Return value is dependent on the passed options.- Specified by:
setin interfaceStringBaseCommands- Parameters:
key- The key to store.value- The value to store with the given key.options- The Set options.- Returns:
- If the value is successfully set, return
"OK". If value isn't set because ofSetOptions.ConditionalSet.ONLY_IF_EXISTSorSetOptions.ConditionalSet.ONLY_IF_DOES_NOT_EXISTorSetOptions.ConditionalSet.ONLY_IF_EQUALconditions, returnnull. IfSetOptions.SetOptionsBuilder.returnOldValue(boolean)is set, return the old value as aString. - See Also:
- valkey.io for details.
-
set
public java.util.concurrent.CompletableFuture<java.lang.String> set(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString value, @NonNull @NonNull SetOptions options)Description copied from interface:StringBaseCommandsSets the given key with the given value. Return value is dependent on the passed options.- Specified by:
setin interfaceStringBaseCommands- Parameters:
key- The key to store.value- The value to store with the given key.options- The Set options.- Returns:
- If the value is successfully set, return
"OK". If value isn't set because ofSetOptions.ConditionalSet.ONLY_IF_EXISTSorSetOptions.ConditionalSet.ONLY_IF_DOES_NOT_EXISTorSetOptions.ConditionalSet.ONLY_IF_EQUALconditions, returnnull. IfSetOptions.SetOptionsBuilder.returnOldValue(boolean)is set, return the old value as aString. - See Also:
- valkey.io for details.
-
append
public java.util.concurrent.CompletableFuture<java.lang.Long> append(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String value)Description copied from interface:StringBaseCommandsAppends avalueto akey. Ifkeydoes not exist it is created and set as an empty string, soAPPENDwill be similar to {@see #set} in this special case.- Specified by:
appendin interfaceStringBaseCommands- Parameters:
key- The key of the string.value- The value to append.- Returns:
- The length of the string after appending the value.
- See Also:
- valkey.io for details.
-
append
public java.util.concurrent.CompletableFuture<java.lang.Long> append(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString value)Description copied from interface:StringBaseCommandsAppends avalueto akey. Ifkeydoes not exist it is created and set as an empty string, soAPPENDwill be similar to {@see #set} in this special case.- Specified by:
appendin interfaceStringBaseCommands- Parameters:
key- The key of the string.value- The value to append.- Returns:
- The length of the string after appending the value.
- See Also:
- valkey.io for details.
-
mget
public java.util.concurrent.CompletableFuture<java.lang.String[]> mget(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:StringBaseCommandsRetrieves the values of multiplekeys.- Specified by:
mgetin interfaceStringBaseCommands- Parameters:
keys- A list of keys to retrieve values for.- Returns:
- An array of values corresponding to the provided
keys.
If akeyis not found, its corresponding value in the list will benull. - See Also:
- valkey.io for details.
-
mget
public java.util.concurrent.CompletableFuture<GlideString[]> mget(@NonNull @NonNull GlideString[] keys)
Description copied from interface:StringBaseCommandsRetrieves the values of multiplekeys.- Specified by:
mgetin interfaceStringBaseCommands- Parameters:
keys- A list of keys to retrieve values for.- Returns:
- An array of values corresponding to the provided
keys.
If akeyis not found, its corresponding value in the list will benull. - See Also:
- valkey.io for details.
-
mset
public java.util.concurrent.CompletableFuture<java.lang.String> mset(@NonNull @NonNull java.util.Map<java.lang.String,java.lang.String> keyValueMap)Description copied from interface:StringBaseCommandsSets multiple keys to multiple values in a single operation.- Specified by:
msetin interfaceStringBaseCommands- Parameters:
keyValueMap- A key-value map consisting of keys and their respective values to set.- Returns:
- A simple
OKresponse. - See Also:
- valkey.io for details.
-
msetBinary
public java.util.concurrent.CompletableFuture<java.lang.String> msetBinary(@NonNull @NonNull java.util.Map<GlideString,GlideString> keyValueMap)Description copied from interface:StringBaseCommandsSets multiple keys to multiple values in a single operation.- Specified by:
msetBinaryin interfaceStringBaseCommands- Parameters:
keyValueMap- A key-value map consisting of keys and their respective values to set.- Returns:
- A simple
OKresponse. - See Also:
- valkey.io for details.
-
move
public java.util.concurrent.CompletableFuture<java.lang.Boolean> move(@NonNull @NonNull java.lang.String key, long dbIndex)Description copied from interface:GenericBaseCommandsMovekeyfrom the currently selected database to the database specified bydbIndex.- Specified by:
movein interfaceGenericBaseCommands- Parameters:
key- The key to move.dbIndex- The index of the database to movekeyto.- Returns:
trueifkeywas moved, orfalseif thekeyalready exists in the destination database or does not exist in the source database.- See Also:
- valkey.io for more details.
-
move
public java.util.concurrent.CompletableFuture<java.lang.Boolean> move(@NonNull @NonNull GlideString key, long dbIndex)Description copied from interface:GenericBaseCommandsMovekeyfrom the currently selected database to the database specified bydbIndex.- Specified by:
movein interfaceGenericBaseCommands- Parameters:
key- The key to move.dbIndex- The index of the database to movekeyto.- Returns:
trueifkeywas moved, orfalseif thekeyalready exists in the destination database or does not exist in the source database.- See Also:
- valkey.io for more details.
-
objectEncoding
public java.util.concurrent.CompletableFuture<java.lang.String> objectEncoding(@NonNull @NonNull java.lang.String key)Description copied from interface:GenericBaseCommandsReturns the internal encoding for the Valkey object stored atkey.- Specified by:
objectEncodingin interfaceGenericBaseCommands- Parameters:
key- Thekeyof the object to get the internal encoding of.- Returns:
- If
keyexists, returns the internal encoding of the object stored atkeyas aString. Otherwise, returnsnull. - See Also:
- valkey.io for details.
-
objectEncoding
public java.util.concurrent.CompletableFuture<java.lang.String> objectEncoding(@NonNull @NonNull GlideString key)Description copied from interface:GenericBaseCommandsReturns the internal encoding for the Valkey object stored atkey.- Specified by:
objectEncodingin interfaceGenericBaseCommands- Parameters:
key- Thekeyof the object to get the internal encoding of.- Returns:
- If
keyexists, returns the internal encoding of the object stored atkeyas aString. Otherwise, returnsnull. - See Also:
- valkey.io for details.
-
objectFreq
public java.util.concurrent.CompletableFuture<java.lang.Long> objectFreq(@NonNull @NonNull java.lang.String key)Description copied from interface:GenericBaseCommandsReturns the logarithmic access frequency counter of a Valkey object stored atkey.- Specified by:
objectFreqin interfaceGenericBaseCommands- Parameters:
key- Thekeyof the object to get the logarithmic access frequency counter of.- Returns:
- If
keyexists, returns the logarithmic access frequency counter of the object stored atkeyas aLong. Otherwise, returnsnull. - See Also:
- valkey.io for details.
-
objectFreq
public java.util.concurrent.CompletableFuture<java.lang.Long> objectFreq(@NonNull @NonNull GlideString key)Description copied from interface:GenericBaseCommandsReturns the logarithmic access frequency counter of a Valkey object stored atkey.- Specified by:
objectFreqin interfaceGenericBaseCommands- Parameters:
key- Thekeyof the object to get the logarithmic access frequency counter of.- Returns:
- If
keyexists, returns the logarithmic access frequency counter of the object stored atkeyas aLong. Otherwise, returnsnull. - See Also:
- valkey.io for details.
-
objectIdletime
public java.util.concurrent.CompletableFuture<java.lang.Long> objectIdletime(@NonNull @NonNull java.lang.String key)Description copied from interface:GenericBaseCommandsReturns the time in seconds since the last access to the value stored atkey.- Specified by:
objectIdletimein interfaceGenericBaseCommands- Parameters:
key- Thekeyof the object to get the idle time of.- Returns:
- If
keyexists, returns the idle time in seconds. Otherwise, returnsnull. - See Also:
- valkey.io for details.
-
objectIdletime
public java.util.concurrent.CompletableFuture<java.lang.Long> objectIdletime(@NonNull @NonNull GlideString key)Description copied from interface:GenericBaseCommandsReturns the time in seconds since the last access to the value stored atkey.- Specified by:
objectIdletimein interfaceGenericBaseCommands- Parameters:
key- Thekeyof the object to get the idle time of.- Returns:
- If
keyexists, returns the idle time in seconds. Otherwise, returnsnull. - See Also:
- valkey.io for details.
-
objectRefcount
public java.util.concurrent.CompletableFuture<java.lang.Long> objectRefcount(@NonNull @NonNull java.lang.String key)Description copied from interface:GenericBaseCommandsReturns the reference count of the object stored atkey.- Specified by:
objectRefcountin interfaceGenericBaseCommands- Parameters:
key- Thekeyof the object to get the reference count of.- Returns:
- If
keyexists, returns the reference count of the object stored atkeyas aLong. Otherwise, returnsnull. - See Also:
- valkey.io for details.
-
objectRefcount
public java.util.concurrent.CompletableFuture<java.lang.Long> objectRefcount(@NonNull @NonNull GlideString key)Description copied from interface:GenericBaseCommandsReturns the reference count of the object stored atkey.- Specified by:
objectRefcountin interfaceGenericBaseCommands- Parameters:
key- Thekeyof the object to get the reference count of.- Returns:
- If
keyexists, returns the reference count of the object stored atkeyas aLong. Otherwise, returnsnull. - See Also:
- valkey.io for details.
-
rename
public java.util.concurrent.CompletableFuture<java.lang.String> rename(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String newKey)Description copied from interface:GenericBaseCommandsRenameskeytonewKey.
IfnewKeyalready exists it is overwritten.- Specified by:
renamein interfaceGenericBaseCommands- Parameters:
key- The key to rename.newKey- The new name of the key.- Returns:
- If the
keywas successfully renamed, return"OK". Ifkeydoes not exist, an error is thrown. - See Also:
- valkey.io for details.
-
rename
public java.util.concurrent.CompletableFuture<java.lang.String> rename(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString newKey)Description copied from interface:GenericBaseCommandsRenameskeytonewKey.
IfnewKeyalready exists it is overwritten.- Specified by:
renamein interfaceGenericBaseCommands- Parameters:
key- The key to rename.newKey- The new name of the key.- Returns:
- If the
keywas successfully renamed, return"OK". Ifkeydoes not exist, an error is thrown. - See Also:
- valkey.io for details.
-
renamenx
public java.util.concurrent.CompletableFuture<java.lang.Boolean> renamenx(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String newKey)Description copied from interface:GenericBaseCommandsRenameskeytonewKeyifnewKeydoes not yet exist.- Specified by:
renamenxin interfaceGenericBaseCommands- Parameters:
key- The key to rename.newKey- The new key name.- Returns:
trueifkeywas renamed tonewKey,falseifnewKeyalready exists.- See Also:
- valkey.io for details.
-
renamenx
public java.util.concurrent.CompletableFuture<java.lang.Boolean> renamenx(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString newKey)Description copied from interface:GenericBaseCommandsRenameskeytonewKeyifnewKeydoes not yet exist.- Specified by:
renamenxin interfaceGenericBaseCommands- Parameters:
key- The key to rename.newKey- The new key name.- Returns:
trueifkeywas renamed tonewKey,falseifnewKeyalready exists.- See Also:
- valkey.io for details.
-
incr
public java.util.concurrent.CompletableFuture<java.lang.Long> incr(@NonNull @NonNull java.lang.String key)Description copied from interface:StringBaseCommandsIncrements the number stored atkeyby one. Ifkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
incrin interfaceStringBaseCommands- Parameters:
key- The key to increment its value.- Returns:
- The value of
keyafter the increment. - See Also:
- valkey.io for details.
-
incr
public java.util.concurrent.CompletableFuture<java.lang.Long> incr(@NonNull @NonNull GlideString key)Description copied from interface:StringBaseCommandsIncrements the number stored atkeyby one. Ifkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
incrin interfaceStringBaseCommands- Parameters:
key- The key to increment its value.- Returns:
- The value of
keyafter the increment. - See Also:
- valkey.io for details.
-
incrBy
public java.util.concurrent.CompletableFuture<java.lang.Long> incrBy(@NonNull @NonNull java.lang.String key, long amount)Description copied from interface:StringBaseCommandsIncrements the number stored atkeybyamount. Ifkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
incrByin interfaceStringBaseCommands- Parameters:
key- The key to increment its value.amount- The amount to increment.- Returns:
- The value of
keyafter the increment. - See Also:
- valkey.io for details.
-
incrBy
public java.util.concurrent.CompletableFuture<java.lang.Long> incrBy(@NonNull @NonNull GlideString key, long amount)Description copied from interface:StringBaseCommandsIncrements the number stored atkeybyamount. Ifkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
incrByin interfaceStringBaseCommands- Parameters:
key- The key to increment its value.amount- The amount to increment.- Returns:
- The value of
keyafter the increment. - See Also:
- valkey.io for details.
-
incrByFloat
public java.util.concurrent.CompletableFuture<java.lang.Double> incrByFloat(@NonNull @NonNull java.lang.String key, double amount)Description copied from interface:StringBaseCommandsIncrements the string representing a floating point number stored atkeybyamount. By using a negative increment value, the result is that the value stored atkeyis decremented. Ifkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
incrByFloatin interfaceStringBaseCommands- Parameters:
key- The key to increment its value.amount- The amount to increment.- Returns:
- The value of
keyafter the increment. - See Also:
- valkey.io for details.
-
incrByFloat
public java.util.concurrent.CompletableFuture<java.lang.Double> incrByFloat(@NonNull @NonNull GlideString key, double amount)Description copied from interface:StringBaseCommandsIncrements the string representing a floating point number stored atkeybyamount. By using a negative increment value, the result is that the value stored atkeyis decremented. Ifkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
incrByFloatin interfaceStringBaseCommands- Parameters:
key- The key to increment its value.amount- The amount to increment.- Returns:
- The value of
keyafter the increment. - See Also:
- valkey.io for details.
-
decr
public java.util.concurrent.CompletableFuture<java.lang.Long> decr(@NonNull @NonNull java.lang.String key)Description copied from interface:StringBaseCommandsDecrements the number stored atkeyby one. Ifkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
decrin interfaceStringBaseCommands- Parameters:
key- The key to decrement its value.- Returns:
- The value of
keyafter the decrement. - See Also:
- valkey.io for details.
-
decr
public java.util.concurrent.CompletableFuture<java.lang.Long> decr(@NonNull @NonNull GlideString key)Description copied from interface:StringBaseCommandsDecrements the number stored atkeyby one. Ifkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
decrin interfaceStringBaseCommands- Parameters:
key- The key to decrement its value.- Returns:
- The value of
keyafter the decrement. - See Also:
- valkey.io for details.
-
decrBy
public java.util.concurrent.CompletableFuture<java.lang.Long> decrBy(@NonNull @NonNull java.lang.String key, long amount)Description copied from interface:StringBaseCommandsDecrements the number stored atkeybyamount. Ifkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
decrByin interfaceStringBaseCommands- Parameters:
key- The key to decrement its value.amount- The amount to decrement.- Returns:
- The value of
keyafter the decrement. - See Also:
- valkey.io for details.
-
decrBy
public java.util.concurrent.CompletableFuture<java.lang.Long> decrBy(@NonNull @NonNull GlideString key, long amount)Description copied from interface:StringBaseCommandsDecrements the number stored atkeybyamount. Ifkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
decrByin interfaceStringBaseCommands- Parameters:
key- The key to decrement its value.amount- The amount to decrement.- Returns:
- The value of
keyafter the decrement. - See Also:
- valkey.io for details.
-
strlen
public java.util.concurrent.CompletableFuture<java.lang.Long> strlen(@NonNull @NonNull java.lang.String key)Description copied from interface:StringBaseCommandsReturns the length of the string value stored atkey.- Specified by:
strlenin interfaceStringBaseCommands- Parameters:
key- The key to check its length.- Returns:
- The length of the string value stored at key.
Ifkeydoes not exist, it is treated as an empty string, and the command returns0. - See Also:
- valkey.io for details.
-
strlen
public java.util.concurrent.CompletableFuture<java.lang.Long> strlen(@NonNull @NonNull GlideString key)Description copied from interface:StringBaseCommandsReturns the length of the string value stored atkey.- Specified by:
strlenin interfaceStringBaseCommands- Parameters:
key- The key to check its length.- Returns:
- The length of the string value stored at key.
Ifkeydoes not exist, it is treated as an empty string, and the command returns0. - See Also:
- valkey.io for details.
-
setrange
public java.util.concurrent.CompletableFuture<java.lang.Long> setrange(@NonNull @NonNull java.lang.String key, int offset, @NonNull @NonNull java.lang.String value)Description copied from interface:StringBaseCommandsOverwrites part of the string stored atkey, starting at the specifiedoffset, for the entire length ofvalue.
If theoffsetis larger than the current length of the string atkey, the string is padded with zero bytes to makeoffsetfit. Creates thekeyif it doesn't exist.- Specified by:
setrangein interfaceStringBaseCommands- Parameters:
key- The key of the string to update.offset- The position in the string wherevalueshould be written.value- The string written withoffset.- Returns:
- The length of the string stored at
keyafter it was modified. - See Also:
- valkey.io for details.
-
setrange
public java.util.concurrent.CompletableFuture<java.lang.Long> setrange(@NonNull @NonNull GlideString key, int offset, @NonNull @NonNull GlideString value)Description copied from interface:StringBaseCommandsOverwrites part of the GlideString stored atkey, starting at the specifiedoffset, for the entire length ofvalue.
If theoffsetis larger than the current length of the GlideString atkey, the GlideString is padded with zero bytes to makeoffsetfit. Creates thekeyif it doesn't exist.- Specified by:
setrangein interfaceStringBaseCommands- Parameters:
key- The key of the GlideString to update.offset- The position in the GlideString wherevalueshould be written.value- The GlideString written withoffset.- Returns:
- The length of the GlideString stored at
keyafter it was modified. - See Also:
- valkey.io for details.
-
getrange
public java.util.concurrent.CompletableFuture<java.lang.String> getrange(@NonNull @NonNull java.lang.String key, int start, int end)Description copied from interface:StringBaseCommandsReturns the substring of the string value stored atkey, determined by the offsetsstartandend(both are inclusive). Negative offsets can be used in order to provide an offset starting from the end of the string. So-1means the last character,-2the penultimate and so forth. Ifkeydoes not exist, an empty string is returned. Ifstartorendare out of range, returns the substring within the valid range of the string.- Specified by:
getrangein interfaceStringBaseCommands- Parameters:
key- The key of the string.start- The starting offset.end- The ending offset.- Returns:
- A substring extracted from the value stored at
key.. - See Also:
- valkey.io for details.
-
getrange
public java.util.concurrent.CompletableFuture<GlideString> getrange(@NonNull @NonNull GlideString key, int start, int end)
Description copied from interface:StringBaseCommandsReturns the subGlideString of the GlideString value stored atkey, determined by the offsetsstartandend(both are inclusive). Negative offsets can be used in order to provide an offset starting from the end of the GlideString. So-1means the last character,-2the penultimate and so forth. Ifkeydoes not exist, an empty GlideString is returned. Ifstartorendare out of range, returns the subGlideString within the valid range of the GlideString.- Specified by:
getrangein interfaceStringBaseCommands- Parameters:
key- The key of the GlideString.start- The starting offset.end- The ending offset.- Returns:
- A subGlideString extracted from the value stored at
key.. - See Also:
- valkey.io for details.
-
hget
public java.util.concurrent.CompletableFuture<java.lang.String> hget(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String field)Description copied from interface:HashBaseCommandsRetrieves the value associated withfieldin the hash stored atkey.- Specified by:
hgetin interfaceHashBaseCommands- Parameters:
key- The key of the hash.field- The field in the hash stored atkeyto retrieve from the database.- Returns:
- The value associated with
field, ornullwhenfieldis not present in the hash orkeydoes not exist. - See Also:
- valkey.io for details.
-
hget
public java.util.concurrent.CompletableFuture<GlideString> hget(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString field)
Description copied from interface:HashBaseCommandsRetrieves the value associated withfieldin the hash stored atkey.- Specified by:
hgetin interfaceHashBaseCommands- Parameters:
key- The key of the hash.field- The field in the hash stored atkeyto retrieve from the database.- Returns:
- The value associated with
field, ornullwhenfieldis not present in the hash orkeydoes not exist. - See Also:
- valkey.io for details.
-
hset
public java.util.concurrent.CompletableFuture<java.lang.Long> hset(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.util.Map<java.lang.String,java.lang.String> fieldValueMap)Description copied from interface:HashBaseCommandsSets the specified fields to their respective values in the hash stored atkey.- Specified by:
hsetin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fieldValueMap- A field-value map consisting of fields and their corresponding values to be set in the hash stored at the specified key.- Returns:
- The number of fields that were added.
- See Also:
- valkey.io for details.
-
hset
public java.util.concurrent.CompletableFuture<java.lang.Long> hset(@NonNull @NonNull GlideString key, @NonNull @NonNull java.util.Map<GlideString,GlideString> fieldValueMap)Description copied from interface:HashBaseCommandsSets the specified fields to their respective values in the hash stored atkey.- Specified by:
hsetin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fieldValueMap- A field-value map consisting of fields and their corresponding values to be set in the hash stored at the specified key.- Returns:
- The number of fields that were added.
- See Also:
- valkey.io for details.
-
hsetnx
public java.util.concurrent.CompletableFuture<java.lang.Boolean> hsetnx(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String field, @NonNull @NonNull java.lang.String value)Description copied from interface:HashBaseCommandsSetsfieldin the hash stored atkeytovalue, only iffielddoes not yet exist.
Ifkeydoes not exist, a new key holding a hash is created.
Iffieldalready exists, this operation has no effect.- Specified by:
hsetnxin interfaceHashBaseCommands- Parameters:
key- The key of the hash.field- The field to set the value for.value- The value to set.- Returns:
trueif the field was set,falseif the field already existed and was not set.- See Also:
- valkey.io for details.
-
hsetnx
public java.util.concurrent.CompletableFuture<java.lang.Boolean> hsetnx(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString field, @NonNull @NonNull GlideString value)Description copied from interface:HashBaseCommandsSetsfieldin the hash stored atkeytovalue, only iffielddoes not yet exist.
Ifkeydoes not exist, a new key holding a hash is created.
Iffieldalready exists, this operation has no effect.- Specified by:
hsetnxin interfaceHashBaseCommands- Parameters:
key- The key of the hash.field- The field to set the value for.value- The value to set.- Returns:
trueif the field was set,falseif the field already existed and was not set.- See Also:
- valkey.io for details.
-
hsetex
public java.util.concurrent.CompletableFuture<java.lang.Long> hsetex(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.util.Map<java.lang.String,java.lang.String> fieldValueMap, HSetExOptions options)Description copied from interface:HashBaseCommandsSets the specified fields to their respective values in the hash stored atkeywith optional expiration and conditional options.- Specified by:
hsetexin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fieldValueMap- A field-value map consisting of fields and their corresponding values to be set in the hash stored at the specified key.options- Optional parameters for the command including conditional changes and expiry settings. SeeHSetExOptions.- Returns:
1if all the fields' values and expiration times were set successfully,0otherwise.- See Also:
- valkey.io for details.
-
hsetex
public java.util.concurrent.CompletableFuture<java.lang.Long> hsetex(@NonNull @NonNull GlideString key, @NonNull @NonNull java.util.Map<GlideString,GlideString> fieldValueMap, HSetExOptions options)Description copied from interface:HashBaseCommandsSets the specified fields to their respective values in the hash stored atkeywith optional expiration and conditional options.- Specified by:
hsetexin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fieldValueMap- A field-value map consisting of fields and their corresponding values to be set in the hash stored at the specified key.options- Optional parameters for the command including conditional changes and expiry settings. SeeHSetExOptions.- Returns:
1if all the fields' values and expiration times were set successfully,0otherwise.- See Also:
- valkey.io for details.
-
hgetex
public java.util.concurrent.CompletableFuture<java.lang.String[]> hgetex(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] fields, HGetExOptions options)Description copied from interface:HashBaseCommandsRetrieves the values of specified fields from the hash stored atkeyand optionally sets their expiration or removes it.- Specified by:
hgetexin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields in the hash stored atkeyto retrieve from the database.options- Optional parameters for the command including expiry settings or persist option. SeeHGetExOptions.- Returns:
- 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.
Ifkeydoes not exist, it returnsnull. - See Also:
- valkey.io for details.
-
hgetex
public java.util.concurrent.CompletableFuture<GlideString[]> hgetex(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] fields, HGetExOptions options)
Description copied from interface:HashBaseCommandsRetrieves the values of specified fields from the hash stored atkeyand optionally sets their expiration or removes it.- Specified by:
hgetexin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields in the hash stored atkeyto retrieve from the database.options- Optional parameters for the command including expiry settings or persist option. SeeHGetExOptions.- Returns:
- 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.
Ifkeydoes not exist, it returnsnull. - See Also:
- valkey.io for details.
-
hexpire
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hexpire(@NonNull @NonNull java.lang.String key, long seconds, @NonNull @NonNull java.lang.String[] fields, HashFieldExpirationConditionOptions options)Description copied from interface:HashBaseCommandsSets expiration time for hash fields. HEXPIRE sets the expiration time in seconds for the specified fields of the hash stored atkey. You can specify whether to set the expiration only if the field has no expiration, only if the field has an existing expiration, only if the new expiration is greater than the current one, or only if the new expiration is less than the current one.- Specified by:
hexpirein interfaceHashBaseCommands- Parameters:
key- The key of the hash.seconds- The expiration time in seconds.fields- The fields in the hash stored atkeyto set expiration for.options- The expiration condition options. SeeHashFieldExpirationConditionOptions.- Returns:
- An array of
Longvalues indicating the result of setting expiration for each field:1if the expiration time was successfully set for the field.0if the specified condition was not met.-2if the field does not exist in the HASH, or key does not exist.2when called with 0 seconds.
- See Also:
- valkey.io for details.
-
hexpire
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hexpire(@NonNull @NonNull GlideString key, long seconds, @NonNull @NonNull GlideString[] fields, HashFieldExpirationConditionOptions options)Description copied from interface:HashBaseCommandsSets expiration time for hash fields. HEXPIRE sets the expiration time in seconds for the specified fields of the hash stored atkey. You can specify whether to set the expiration only if the field has no expiration, only if the field has an existing expiration, only if the new expiration is greater than the current one, or only if the new expiration is less than the current one.- Specified by:
hexpirein interfaceHashBaseCommands- Parameters:
key- The key of the hash.seconds- The expiration time in seconds.fields- The fields in the hash stored atkeyto set expiration for.options- The expiration condition options. SeeHashFieldExpirationConditionOptions.- Returns:
- An array of
Longvalues indicating the result of setting expiration for each field:1if the expiration time was successfully set for the field.0if the specified condition was not met.-2if the field does not exist in the HASH, or key does not exist.2when called with 0 seconds.
- See Also:
- valkey.io for details.
-
hpersist
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hpersist(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] fields)Description copied from interface:HashBaseCommandsRemoves the expiration time for each specified field, turning the field from volatile (a field with expiration time) to persistent (a field that will never expire as no expiration time is associated).- Specified by:
hpersistin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields to remove expiration from.- Returns:
- An array of
Longvalues, each corresponding to a field:1if the expiration time was successfully removed from the field.-1if the field exists but has no expiration time.-2if the field does not exist in the provided hash key, or the hash key does not exist.
- See Also:
- valkey.io for details.
-
hpersist
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hpersist(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] fields)Description copied from interface:HashBaseCommandsRemoves the expiration time for each specified field, turning the field from volatile (a field with expiration time) to persistent (a field that will never expire as no expiration time is associated).- Specified by:
hpersistin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields to remove expiration from.- Returns:
- An array of
Longvalues, each corresponding to a field:1if the expiration time was successfully removed from the field.-1if the field exists but has no expiration time.-2if the field does not exist in the provided hash key, or the hash key does not exist.
- See Also:
- valkey.io for details.
-
hpexpire
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hpexpire(@NonNull @NonNull java.lang.String key, long milliseconds, @NonNull @NonNull java.lang.String[] fields, HashFieldExpirationConditionOptions options)Description copied from interface:HashBaseCommandsSets expiration time for hash fields, in milliseconds. Creates the hash if it doesn't exist. If a field is already expired, it will be deleted rather than expired.- Specified by:
hpexpirein interfaceHashBaseCommands- Parameters:
key- The key of the hash.milliseconds- The expiration time to set for the fields, in milliseconds.fields- The fields to set expiration for.options- The expiration options. SeeHashFieldExpirationConditionOptions.- Returns:
- An array of
Longvalues, each corresponding to a field:1if the expiration time was successfully set for the field.0if the specified condition was not met.-2if the field does not exist in the HASH, or HASH is empty.2when called with 0 milliseconds.
- See Also:
- valkey.io for details.
-
hpexpire
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hpexpire(@NonNull @NonNull GlideString key, long milliseconds, @NonNull @NonNull GlideString[] fields, HashFieldExpirationConditionOptions options)Description copied from interface:HashBaseCommandsSets expiration time for hash fields, in milliseconds. Creates the hash if it doesn't exist. If a field is already expired, it will be deleted rather than expired.- Specified by:
hpexpirein interfaceHashBaseCommands- Parameters:
key- The key of the hash.milliseconds- The expiration time to set for the fields, in milliseconds.fields- The fields to set expiration for.options- The expiration options. SeeHashFieldExpirationConditionOptions.- Returns:
- An array of
Longvalues, each corresponding to a field:1if the expiration time was successfully set for the field.0if the specified condition was not met.-2if the field does not exist in the HASH, or HASH is empty.2when called with 0 milliseconds.
- See Also:
- valkey.io for details.
-
hexpireat
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hexpireat(@NonNull @NonNull java.lang.String key, long unixSeconds, @NonNull @NonNull java.lang.String[] fields, HashFieldExpirationConditionOptions options)Description copied from interface:HashBaseCommandsSets expiration time for hash fields, in seconds, using an absolute Unix timestamp. Creates the hash if it doesn't exist. If a field is already expired, it will be deleted rather than expired.- Specified by:
hexpireatin interfaceHashBaseCommands- Parameters:
key- The key of the hash.unixSeconds- The expiration time to set for the fields, as a Unix timestamp in seconds.fields- The fields to set expiration for.options- The expiration options. SeeHashFieldExpirationConditionOptions.- Returns:
- An array of
Longvalues, each corresponding to a field:1if the expiration time was successfully set for the field.0if the specified condition was not met.-2if the field does not exist in the HASH, or HASH is empty.2when called with 0 seconds or past Unix time.
- See Also:
- valkey.io for details.
-
hexpireat
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hexpireat(@NonNull @NonNull GlideString key, long unixSeconds, @NonNull @NonNull GlideString[] fields, HashFieldExpirationConditionOptions options)Description copied from interface:HashBaseCommandsSets expiration time for hash fields, in seconds, using an absolute Unix timestamp. Creates the hash if it doesn't exist. If a field is already expired, it will be deleted rather than expired.- Specified by:
hexpireatin interfaceHashBaseCommands- Parameters:
key- The key of the hash.unixSeconds- The expiration time to set for the fields, as a Unix timestamp in seconds.fields- The fields to set expiration for.options- The expiration options. SeeHashFieldExpirationConditionOptions.- Returns:
- An array of
Longvalues, each corresponding to a field:1if the expiration time was successfully set for the field.0if the specified condition was not met.-2if the field does not exist in the HASH, or HASH is empty.2when called with 0 seconds or past Unix time.
- See Also:
- valkey.io for details.
-
hpexpireat
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hpexpireat(@NonNull @NonNull java.lang.String key, long unixMilliseconds, @NonNull @NonNull java.lang.String[] fields, HashFieldExpirationConditionOptions options)Description copied from interface:HashBaseCommandsSets expiration time for hash fields, using an absolute Unix timestamp in milliseconds.HPEXPIREAThas the same effect and semantic asHEXPIREAT, but the Unix time at which the field will expire is specified in milliseconds instead of seconds.- Specified by:
hpexpireatin interfaceHashBaseCommands- Parameters:
key- The key of the hash.unixMilliseconds- The expiration time to set for the fields, as a Unix timestamp in milliseconds.fields- An array of hash field names for which to set the expiration.options- Optional conditions and configurations for the expiration. SeeHashFieldExpirationConditionOptions.- Returns:
- An array of
Longvalues indicating the result for each field:1if the expiration time was successfully set for the field.0if the specified condition was not met.-2if the field does not exist in the HASH, or HASH is empty.2when called with 0 seconds or past Unix time in milliseconds.
unixMillisecondsis in the past, the field will be deleted rather than expired. - See Also:
- valkey.io for details.
-
hpexpireat
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hpexpireat(@NonNull @NonNull GlideString key, long unixMilliseconds, @NonNull @NonNull GlideString[] fields, HashFieldExpirationConditionOptions options)Description copied from interface:HashBaseCommandsSets expiration time for hash fields, using an absolute Unix timestamp in milliseconds.HPEXPIREAThas the same effect and semantic asHEXPIREAT, but the Unix time at which the field will expire is specified in milliseconds instead of seconds.- Specified by:
hpexpireatin interfaceHashBaseCommands- Parameters:
key- The key of the hash.unixMilliseconds- The expiration time to set for the fields, as a Unix timestamp in milliseconds.fields- An array of hash field names for which to set the expiration.options- Optional conditions and configurations for the expiration. SeeHashFieldExpirationConditionOptions.- Returns:
- An array of
Longvalues indicating the result for each field:1if the expiration time was successfully set for the field.0if the specified condition was not met.-2if the field does not exist in the HASH, or HASH is empty.2when called with 0 seconds or past Unix time in milliseconds.
unixMillisecondsis in the past, the field will be deleted rather than expired. - See Also:
- valkey.io for details.
-
httl
public java.util.concurrent.CompletableFuture<java.lang.Long[]> httl(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] fields)Description copied from interface:HashBaseCommandsReturns the remaining time to live of hash fields that have a timeout, in seconds.- Specified by:
httlin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields to get the TTL for.- Returns:
- An array of
Longvalues, each corresponding to a field:- TTL in seconds if the field exists and has a timeout.
-1if the field exists but has no associated expire.-2if the field does not exist in the provided hash key, or the hash key is empty.
- See Also:
- valkey.io for details.
-
httl
public java.util.concurrent.CompletableFuture<java.lang.Long[]> httl(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] fields)Description copied from interface:HashBaseCommandsReturns the remaining time to live of hash fields that have a timeout, in seconds.- Specified by:
httlin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields to get the TTL for.- Returns:
- An array of
Longvalues, each corresponding to a field:- TTL in seconds if the field exists and has a timeout.
-1if the field exists but has no associated expire.-2if the field does not exist in the provided hash key, or the hash key is empty.
- See Also:
- valkey.io for details.
-
hpttl
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hpttl(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] fields)Description copied from interface:HashBaseCommandsReturns the remaining time to live of hash fields that have a timeout, in milliseconds.- Specified by:
hpttlin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields to get the TTL for.- Returns:
- An array of TTL values in milliseconds for the specified fields:
- For fields with a timeout, returns the remaining TTL in milliseconds.
- For fields that exist but have no associated expire, returns
-1. - For fields that do not exist in the provided hash key, or the hash key is empty,
returns
-2.
- See Also:
- valkey.io for details.
-
hpttl
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hpttl(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] fields)Description copied from interface:HashBaseCommandsReturns the remaining time to live of hash fields that have a timeout, in milliseconds.- Specified by:
hpttlin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields to get the TTL for.- Returns:
- An array of TTL values in milliseconds for the specified fields:
- For fields with a timeout, returns the remaining TTL in milliseconds.
- For fields that exist but have no associated expire, returns
-1. - For fields that do not exist in the provided hash key, or the hash key is empty,
returns
-2.
- See Also:
- valkey.io for details.
-
hexpiretime
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hexpiretime(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] fields)Description copied from interface:HashBaseCommandsReturns the absolute Unix timestamp (in seconds) at which the given hash fields will expire.- Specified by:
hexpiretimein interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields to get the expiration timestamp for.- Returns:
- An array of expiration timestamps in seconds for the specified fields:
- For fields with a timeout, returns the absolute Unix timestamp in seconds.
- For fields that exist but have no associated expire, returns
-1. - For fields that do not exist in the provided hash key, or the hash key is empty,
returns
-2.
- See Also:
- valkey.io for details.
-
hexpiretime
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hexpiretime(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] fields)Description copied from interface:HashBaseCommandsReturns the absolute Unix timestamp (in seconds) at which the given hash fields will expire.- Specified by:
hexpiretimein interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields to get the expiration timestamp for.- Returns:
- An array of expiration timestamps in seconds for the specified fields:
- For fields with a timeout, returns the absolute Unix timestamp in seconds.
- For fields that exist but have no associated expire, returns
-1. - For fields that do not exist in the provided hash key, or the hash key is empty,
returns
-2.
- See Also:
- valkey.io for details.
-
hpexpiretime
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hpexpiretime(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] fields)Description copied from interface:HashBaseCommandsReturns the absolute Unix timestamp (in milliseconds) at which the given hash fields will expire.- Specified by:
hpexpiretimein interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields to get the expiration timestamp for.- Returns:
- An array of expiration timestamps in milliseconds for the specified fields:
- For fields with a timeout, returns the absolute Unix timestamp in milliseconds.
- For fields that exist but have no associated expire, returns
-1. - For fields that do not exist in the provided hash key, or the hash key is empty,
returns
-2.
- See Also:
- valkey.io for details.
-
hpexpiretime
public java.util.concurrent.CompletableFuture<java.lang.Long[]> hpexpiretime(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] fields)Description copied from interface:HashBaseCommandsReturns the absolute Unix timestamp (in milliseconds) at which the given hash fields will expire.- Specified by:
hpexpiretimein interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields to get the expiration timestamp for.- Returns:
- An array of expiration timestamps in milliseconds for the specified fields:
- For fields with a timeout, returns the absolute Unix timestamp in milliseconds.
- For fields that exist but have no associated expire, returns
-1. - For fields that do not exist in the provided hash key, or the hash key is empty,
returns
-2.
- See Also:
- valkey.io for details.
-
hdel
public java.util.concurrent.CompletableFuture<java.lang.Long> hdel(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] fields)Description copied from interface:HashBaseCommandsRemoves the specified fields from the hash stored atkey. Specified fields that do not exist within this hash are ignored.- Specified by:
hdelin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields to remove from the hash stored atkey.- Returns:
- The number of fields that were removed from the hash, not including specified but
non-existing fields.
Ifkeydoes not exist, it is treated as an empty hash and it returns 0. - See Also:
- valkey.io for details.
-
hdel
public java.util.concurrent.CompletableFuture<java.lang.Long> hdel(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] fields)Description copied from interface:HashBaseCommandsRemoves the specified fields from the hash stored atkey. Specified fields that do not exist within this hash are ignored.- Specified by:
hdelin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields to remove from the hash stored atkey.- Returns:
- The number of fields that were removed from the hash, not including specified but
non-existing fields.
Ifkeydoes not exist, it is treated as an empty hash and it returns 0. - See Also:
- valkey.io for details.
-
hlen
public java.util.concurrent.CompletableFuture<java.lang.Long> hlen(@NonNull @NonNull java.lang.String key)Description copied from interface:HashBaseCommandsReturns the number of fields contained in the hash stored atkey.- Specified by:
hlenin interfaceHashBaseCommands- Parameters:
key- The key of the hash.- Returns:
- The number of fields in the hash, or
0when the key does not exist.
Ifkeyholds a value that is not a hash, an error is returned. - See Also:
- valkey.io for details.
-
hlen
public java.util.concurrent.CompletableFuture<java.lang.Long> hlen(@NonNull @NonNull GlideString key)Description copied from interface:HashBaseCommandsReturns the number of fields contained in the hash stored atkey.- Specified by:
hlenin interfaceHashBaseCommands- Parameters:
key- The key of the hash.- Returns:
- The number of fields in the hash, or
0when the key does not exist.
Ifkeyholds a value that is not a hash, an error is returned. - See Also:
- valkey.io for details.
-
hvals
public java.util.concurrent.CompletableFuture<java.lang.String[]> hvals(@NonNull @NonNull java.lang.String key)Description copied from interface:HashBaseCommandsReturns all values in the hash stored atkey.- Specified by:
hvalsin interfaceHashBaseCommands- Parameters:
key- The key of the hash.- Returns:
- An
arrayof values in the hash, or anempty arraywhen the key does not exist. - See Also:
- valkey.io for details.
-
hvals
public java.util.concurrent.CompletableFuture<GlideString[]> hvals(@NonNull @NonNull GlideString key)
Description copied from interface:HashBaseCommandsReturns all values in the hash stored atkey.- Specified by:
hvalsin interfaceHashBaseCommands- Parameters:
key- The key of the hash.- Returns:
- An
arrayof values in the hash, or anempty arraywhen the key does not exist. - See Also:
- valkey.io for details.
-
hmget
public java.util.concurrent.CompletableFuture<java.lang.String[]> hmget(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] fields)Description copied from interface:HashBaseCommandsReturns the values associated with the specified fields in the hash stored atkey.- Specified by:
hmgetin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields in the hash stored atkeyto retrieve from the database.- Returns:
- 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.
Ifkeydoes not exist, it is treated as an empty hash, and it returns an array of null values. - See Also:
- valkey.io for details.
-
hmget
public java.util.concurrent.CompletableFuture<GlideString[]> hmget(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] fields)
Description copied from interface:HashBaseCommandsReturns the values associated with the specified fields in the hash stored atkey.- Specified by:
hmgetin interfaceHashBaseCommands- Parameters:
key- The key of the hash.fields- The fields in the hash stored atkeyto retrieve from the database.- Returns:
- 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.
Ifkeydoes not exist, it is treated as an empty hash, and it returns an array of null values. - See Also:
- valkey.io for details.
-
hexists
public java.util.concurrent.CompletableFuture<java.lang.Boolean> hexists(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String field)Description copied from interface:HashBaseCommandsReturns iffieldis an existing field in the hash stored atkey.- Specified by:
hexistsin interfaceHashBaseCommands- Parameters:
key- The key of the hash.field- The field to check in the hash stored atkey.- Returns:
Trueif the hash contains the specified field. If the hash does not contain the field, or if the key does not exist, it returnsFalse.- See Also:
- valkey.io for details.
-
hexists
public java.util.concurrent.CompletableFuture<java.lang.Boolean> hexists(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString field)Description copied from interface:HashBaseCommandsReturns iffieldis an existing field in the hash stored atkey.- Specified by:
hexistsin interfaceHashBaseCommands- Parameters:
key- The key of the hash.field- The field to check in the hash stored atkey.- Returns:
Trueif the hash contains the specified field. If the hash does not contain the field, or if the key does not exist, it returnsFalse.- See Also:
- valkey.io for details.
-
hgetall
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String>> hgetall(@NonNull @NonNull java.lang.String key)Description copied from interface:HashBaseCommandsReturns all fields and values of the hash stored atkey.- Specified by:
hgetallin interfaceHashBaseCommands- Parameters:
key- The key of the hash.- Returns:
- A
Mapof fields and their values stored in the hash. Every field name in the map is associated with its corresponding value.
Ifkeydoes not exist, it returns an empty map. - See Also:
- valkey.io for details.
-
hgetall
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString>> hgetall(@NonNull @NonNull GlideString key)
Description copied from interface:HashBaseCommandsReturns all fields and values of the hash stored atkey.- Specified by:
hgetallin interfaceHashBaseCommands- Parameters:
key- The key of the hash.- Returns:
- A
Mapof fields and their values stored in the hash. Every field name in the map is associated with its corresponding value.
Ifkeydoes not exist, it returns an empty map. - See Also:
- valkey.io for details.
-
hincrBy
public java.util.concurrent.CompletableFuture<java.lang.Long> hincrBy(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String field, long amount)Description copied from interface:HashBaseCommandsIncrements the number stored atfieldin the hash stored atkeyby increment. By using a negative increment value, the value stored atfieldin the hash stored atkeyis decremented. Iffieldorkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
hincrByin interfaceHashBaseCommands- Parameters:
key- The key of the hash.field- The field in the hash stored atkeyto increment or decrement its value.amount- The amount by which to increment or decrement the field's value. Use a negative value to decrement.- Returns:
- The value of
fieldin the hash stored atkeyafter the increment or decrement. - See Also:
- valkey.io for details.
-
hincrBy
public java.util.concurrent.CompletableFuture<java.lang.Long> hincrBy(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString field, long amount)Description copied from interface:HashBaseCommandsIncrements the number stored atfieldin the hash stored atkeyby increment. By using a negative increment value, the value stored atfieldin the hash stored atkeyis decremented. Iffieldorkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
hincrByin interfaceHashBaseCommands- Parameters:
key- The key of the hash.field- The field in the hash stored atkeyto increment or decrement its value.amount- The amount by which to increment or decrement the field's value. Use a negative value to decrement.- Returns:
- The value of
fieldin the hash stored atkeyafter the increment or decrement. - See Also:
- valkey.io for details.
-
hincrByFloat
public java.util.concurrent.CompletableFuture<java.lang.Double> hincrByFloat(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String field, double amount)Description copied from interface:HashBaseCommandsIncrements the string representing a floating point number stored atfieldin the hash stored atkeyby increment. By using a negative increment value, the value stored atfieldin the hash stored atkeyis decremented. Iffieldorkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
hincrByFloatin interfaceHashBaseCommands- Parameters:
key- The key of the hash.field- The field in the hash stored atkeyto increment or decrement its value.amount- The amount by which to increment or decrement the field's value. Use a negative value to decrement.- Returns:
- The value of
fieldin the hash stored atkeyafter the increment or decrement. - See Also:
- valkey.io for details.
-
hincrByFloat
public java.util.concurrent.CompletableFuture<java.lang.Double> hincrByFloat(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString field, double amount)Description copied from interface:HashBaseCommandsIncrements the string representing a floating point number stored atfieldin the hash stored atkeyby increment. By using a negative increment value, the value stored atfieldin the hash stored atkeyis decremented. Iffieldorkeydoes not exist, it is set to 0 before performing the operation.- Specified by:
hincrByFloatin interfaceHashBaseCommands- Parameters:
key- The key of the hash.field- The field in the hash stored atkeyto increment or decrement its value.amount- The amount by which to increment or decrement the field's value. Use a negative value to decrement.- Returns:
- The value of
fieldin the hash stored atkeyafter the increment or decrement. - See Also:
- valkey.io for details.
-
hkeys
public java.util.concurrent.CompletableFuture<java.lang.String[]> hkeys(@NonNull @NonNull java.lang.String key)Description copied from interface:HashBaseCommandsReturns all field names in the hash stored atkey.- Specified by:
hkeysin interfaceHashBaseCommands- Parameters:
key- The key of the hash.- Returns:
- An
arrayof field names in the hash, or anempty arraywhen the key does not exist. - See Also:
- valkey.io for details.
-
hkeys
public java.util.concurrent.CompletableFuture<GlideString[]> hkeys(@NonNull @NonNull GlideString key)
Description copied from interface:HashBaseCommandsReturns all field names in the hash stored atkey.- Specified by:
hkeysin interfaceHashBaseCommands- Parameters:
key- The key of the hash.- Returns:
- An
arrayof field names in the hash, or anempty arraywhen the key does not exist. - See Also:
- valkey.io for details.
-
hstrlen
public java.util.concurrent.CompletableFuture<java.lang.Long> hstrlen(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String field)Description copied from interface:HashBaseCommandsReturns the string length of the value associated withfieldin the hash stored atkey.- Specified by:
hstrlenin interfaceHashBaseCommands- Parameters:
key- The key of the hash.field- The field in the hash.- Returns:
- The string length or
0iffieldorkeydoes not exist. - See Also:
- valkey.io for details.
-
hstrlen
public java.util.concurrent.CompletableFuture<java.lang.Long> hstrlen(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString field)Description copied from interface:HashBaseCommandsReturns the string length of the value associated withfieldin the hash stored atkey.- Specified by:
hstrlenin interfaceHashBaseCommands- Parameters:
key- The key of the hash.field- The field in the hash.- Returns:
- The string length or
0iffieldorkeydoes not exist. - See Also:
- valkey.io for details.
-
hrandfield
public java.util.concurrent.CompletableFuture<java.lang.String> hrandfield(@NonNull @NonNull java.lang.String key)Description copied from interface:HashBaseCommandsReturns a random field name from the hash value stored atkey.- Specified by:
hrandfieldin interfaceHashBaseCommands- Parameters:
key- The key of the hash.- Returns:
- A random field name from the hash stored at
key, ornullwhen the key does not exist. - See Also:
- valkey.io for details.
-
hrandfield
public java.util.concurrent.CompletableFuture<GlideString> hrandfield(@NonNull @NonNull GlideString key)
Description copied from interface:HashBaseCommandsReturns a random field name from the hash value stored atkey.- Specified by:
hrandfieldin interfaceHashBaseCommands- Parameters:
key- The key of the hash.- Returns:
- A random field name from the hash stored at
key, ornullwhen the key does not exist. - See Also:
- valkey.io for details.
-
hrandfieldWithCount
public java.util.concurrent.CompletableFuture<java.lang.String[]> hrandfieldWithCount(@NonNull @NonNull java.lang.String key, long count)Description copied from interface:HashBaseCommandsRetrieves up tocountrandom field names from the hash value stored atkey.- Specified by:
hrandfieldWithCountin interfaceHashBaseCommands- Parameters:
key- The key of the hash.count- The number of field names to return.
Ifcountis positive, returns unique elements.
If negative, allows for duplicates.- Returns:
- An
arrayof random field names from the hash stored atkey, or anempty arraywhen the key does not exist. - See Also:
- valkey.io for details.
-
hrandfieldWithCount
public java.util.concurrent.CompletableFuture<GlideString[]> hrandfieldWithCount(@NonNull @NonNull GlideString key, long count)
Description copied from interface:HashBaseCommandsRetrieves up tocountrandom field names from the hash value stored atkey.- Specified by:
hrandfieldWithCountin interfaceHashBaseCommands- Parameters:
key- The key of the hash.count- The number of field names to return.
Ifcountis positive, returns unique elements.
If negative, allows for duplicates.- Returns:
- An
arrayof random field names from the hash stored atkey, or anempty arraywhen the key does not exist. - See Also:
- valkey.io for details.
-
hrandfieldWithCountWithValues
public java.util.concurrent.CompletableFuture<java.lang.String[][]> hrandfieldWithCountWithValues(@NonNull @NonNull java.lang.String key, long count)Description copied from interface:HashBaseCommandsRetrieves up tocountrandom field names along with their values from the hash value stored atkey.- Specified by:
hrandfieldWithCountWithValuesin interfaceHashBaseCommands- Parameters:
key- The key of the hash.count- The number of field names to return.
Ifcountis positive, returns unique elements.
If negative, allows for duplicates.- Returns:
- A 2D
arrayof[fieldName, value]arrays, wherefieldNameis a random field name from the hash andvalueis the associated value of the field name.
If the hash does not exist or is empty, the response will be an emptyarray. - See Also:
- valkey.io for details.
-
hrandfieldWithCountWithValues
public java.util.concurrent.CompletableFuture<GlideString[][]> hrandfieldWithCountWithValues(@NonNull @NonNull GlideString key, long count)
Description copied from interface:HashBaseCommandsRetrieves up tocountrandom field names along with their values from the hash value stored atkey.- Specified by:
hrandfieldWithCountWithValuesin interfaceHashBaseCommands- Parameters:
key- The key of the hash.count- The number of field names to return.
Ifcountis positive, returns unique elements.
If negative, allows for duplicates.- Returns:
- A 2D
arrayof[fieldName, value]arrays, wherefieldNameis a random field name from the hash andvalueis the associated value of the field name.
If the hash does not exist or is empty, the response will be an emptyarray. - See Also:
- valkey.io for details.
-
lpush
public java.util.concurrent.CompletableFuture<java.lang.Long> lpush(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] elements)Description copied from interface:ListBaseCommandsInserts all the specified values at the head of the list stored atkey.elementsare inserted one after the other to the head of the list, from the leftmost element to the rightmost element. Ifkeydoes not exist, it is created as an empty list before performing the push operation.- Specified by:
lpushin interfaceListBaseCommands- Parameters:
key- The key of the list.elements- The elements to insert at the head of the list stored atkey.- Returns:
- The length of the list after the push operation.
- See Also:
- valkey.io for details.
-
lpush
public java.util.concurrent.CompletableFuture<java.lang.Long> lpush(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] elements)Description copied from interface:ListBaseCommandsInserts all the specified values at the head of the list stored atkey.elementsare inserted one after the other to the head of the list, from the leftmost element to the rightmost element. Ifkeydoes not exist, it is created as an empty list before performing the push operation.- Specified by:
lpushin interfaceListBaseCommands- Parameters:
key- The key of the list.elements- The elements to insert at the head of the list stored atkey.- Returns:
- The length of the list after the push operation.
- See Also:
- valkey.io for details.
-
lpop
public java.util.concurrent.CompletableFuture<java.lang.String> lpop(@NonNull @NonNull java.lang.String key)Description copied from interface:ListBaseCommandsRemoves and returns the first elements of the list stored atkey. The command pops a single element from the beginning of the list.- Specified by:
lpopin interfaceListBaseCommands- Parameters:
key- The key of the list.- Returns:
- The value of the first element.
Ifkeydoes not exist, null will be returned. - See Also:
- valkey.io for details.
-
lpop
public java.util.concurrent.CompletableFuture<GlideString> lpop(@NonNull @NonNull GlideString key)
Description copied from interface:ListBaseCommandsRemoves and returns the first elements of the list stored atkey. The command pops a single element from the beginning of the list.- Specified by:
lpopin interfaceListBaseCommands- Parameters:
key- The key of the list.- Returns:
- The value of the first element.
Ifkeydoes not exist, null will be returned. - See Also:
- valkey.io for details.
-
lpopCount
public java.util.concurrent.CompletableFuture<java.lang.String[]> lpopCount(@NonNull @NonNull java.lang.String key, long count)Description copied from interface:ListBaseCommandsRemoves and returns up tocountelements of the list stored atkey, depending on the list's length.- Specified by:
lpopCountin interfaceListBaseCommands- Parameters:
key- The key of the list.count- The count of the elements to pop from the list.- Returns:
- An array of the popped elements will be returned depending on the list's length.
Ifkeydoes not exist, null will be returned. - See Also:
- valkey.io for details.
-
lpopCount
public java.util.concurrent.CompletableFuture<GlideString[]> lpopCount(@NonNull @NonNull GlideString key, long count)
Description copied from interface:ListBaseCommandsRemoves and returns up tocountelements of the list stored atkey, depending on the list's length.- Specified by:
lpopCountin interfaceListBaseCommands- Parameters:
key- The key of the list.count- The count of the elements to pop from the list.- Returns:
- An array of the popped elements will be returned depending on the list's length.
Ifkeydoes not exist, null will be returned. - See Also:
- valkey.io for details.
-
lpos
public java.util.concurrent.CompletableFuture<java.lang.Long> lpos(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String element)Description copied from interface:ListBaseCommandsReturns the index of the first occurrence ofelementinside the list specified bykey. If no match is found,nullis returned.- Specified by:
lposin interfaceListBaseCommands- Parameters:
key- The name of the list.element- The value to search for within the list.- Returns:
- The index of the first occurrence of
element, ornullifelementis not in the list. - See Also:
- valkey.io for details.
-
lpos
public java.util.concurrent.CompletableFuture<java.lang.Long> lpos(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString element)Description copied from interface:ListBaseCommandsReturns the index of the first occurrence ofelementinside the list specified bykey. If no match is found,nullis returned.- Specified by:
lposin interfaceListBaseCommands- Parameters:
key- The name of the list.element- The value to search for within the list.- Returns:
- The index of the first occurrence of
element, ornullifelementis not in the list. - See Also:
- valkey.io for details.
-
lpos
public java.util.concurrent.CompletableFuture<java.lang.Long> lpos(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String element, @NonNull @NonNull LPosOptions options)Description copied from interface:ListBaseCommandsReturns the index of an occurrence ofelementwithin a list based on the givenoptions. If no match is found,nullis returned.- Specified by:
lposin interfaceListBaseCommands- Parameters:
key- The name of the list.element- The value to search for within the list.options- The LPos options.- Returns:
- The index of
element, ornullifelementis not in the list. - See Also:
- valkey.io for details.
-
lpos
public java.util.concurrent.CompletableFuture<java.lang.Long> lpos(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString element, @NonNull @NonNull LPosOptions options)Description copied from interface:ListBaseCommandsReturns the index of an occurrence ofelementwithin a list based on the givenoptions. If no match is found,nullis returned.- Specified by:
lposin interfaceListBaseCommands- Parameters:
key- The name of the list.element- The value to search for within the list.options- The LPos options.- Returns:
- The index of
element, ornullifelementis not in the list. - See Also:
- valkey.io for details.
-
lposCount
public java.util.concurrent.CompletableFuture<java.lang.Long[]> lposCount(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String element, long count)Description copied from interface:ListBaseCommandsReturns anarrayof indices of matching elements within a list.- Specified by:
lposCountin interfaceListBaseCommands- Parameters:
key- The name of the list.element- The value to search for within the list.count- The number of matches wanted.- Returns:
- An
arraythat holds the indices of the matching elements within the list. - See Also:
- valkey.io for details.
-
lposCount
public java.util.concurrent.CompletableFuture<java.lang.Long[]> lposCount(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString element, long count)Description copied from interface:ListBaseCommandsReturns anarrayof indices of matching elements within a list.- Specified by:
lposCountin interfaceListBaseCommands- Parameters:
key- The name of the list.element- The value to search for within the list.count- The number of matches wanted.- Returns:
- An
arraythat holds the indices of the matching elements within the list. - See Also:
- valkey.io for details.
-
lposCount
public java.util.concurrent.CompletableFuture<java.lang.Long[]> lposCount(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String element, long count, @NonNull @NonNull LPosOptions options)Description copied from interface:ListBaseCommandsReturns anarrayof indices of matching elements within a list based on the givenoptions. If no match is found, an emptyarrayis returned.- Specified by:
lposCountin interfaceListBaseCommands- Parameters:
key- The name of the list.element- The value to search for within the list.count- The number of matches wanted.options- The LPos options.- Returns:
- An
arraythat holds the indices of the matching elements within the list. - See Also:
- valkey.io for details.
-
lposCount
public java.util.concurrent.CompletableFuture<java.lang.Long[]> lposCount(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString element, long count, @NonNull @NonNull LPosOptions options)Description copied from interface:ListBaseCommandsReturns anarrayof indices of matching elements within a list based on the givenoptions. If no match is found, an emptyarrayis returned.- Specified by:
lposCountin interfaceListBaseCommands- Parameters:
key- The name of the list.element- The value to search for within the list.count- The number of matches wanted.options- The LPos options.- Returns:
- An
arraythat holds the indices of the matching elements within the list. - See Also:
- valkey.io for details.
-
lrange
public java.util.concurrent.CompletableFuture<java.lang.String[]> lrange(@NonNull @NonNull java.lang.String key, long start, long end)Description copied from interface:ListBaseCommandsReturns the specified elements of the list stored atkey.
The offsetsstartandendare zero-based indexes, with0being the first element of the list,1being the next element and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list, with-1being the last element of the list,-2being the penultimate, and so on.- Specified by:
lrangein interfaceListBaseCommands- Parameters:
key- The key of the list.start- The starting point of the range.end- The end of the range.- Returns:
- Array of elements in the specified range.
Ifstartexceeds the end of the list, or ifstartis greater thanend, an empty array will be returned.
Ifendexceeds the actual end of the list, the range will stop at the actual end of the list.
Ifkeydoes not exist an empty array will be returned. - See Also:
- valkey.io for details.
-
lrange
public java.util.concurrent.CompletableFuture<GlideString[]> lrange(@NonNull @NonNull GlideString key, long start, long end)
Description copied from interface:ListBaseCommandsReturns the specified elements of the list stored atkey.
The offsetsstartandendare zero-based indexes, with0being the first element of the list,1being the next element and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list, with-1being the last element of the list,-2being the penultimate, and so on.- Specified by:
lrangein interfaceListBaseCommands- Parameters:
key- The key of the list.start- The starting point of the range.end- The end of the range.- Returns:
- Array of elements in the specified range.
Ifstartexceeds the end of the list, or ifstartis greater thanend, an empty array will be returned.
Ifendexceeds the actual end of the list, the range will stop at the actual end of the list.
Ifkeydoes not exist an empty array will be returned. - See Also:
- valkey.io for details.
-
lindex
public java.util.concurrent.CompletableFuture<java.lang.String> lindex(@NonNull @NonNull java.lang.String key, long index)Description copied from interface:ListBaseCommandsReturns the element atindexfrom the list stored atkey.
The index is zero-based, so0means the first element,1the second element and so on. Negative indices can be used to designate elements starting at the tail of the list. Here,-1means the last element,-2means the penultimate and so forth.- Specified by:
lindexin interfaceListBaseCommands- Parameters:
key- The key of the list.index- The index of the element in the list to retrieve.- Returns:
- The element at
indexin the list stored atkey.
Ifindexis out of range or ifkeydoes not exist,nullis returned. - See Also:
- valkey.io for details.
-
lindex
public java.util.concurrent.CompletableFuture<GlideString> lindex(@NonNull @NonNull GlideString key, long index)
Description copied from interface:ListBaseCommandsReturns the element atindexfrom the list stored atkey.
The index is zero-based, so0means the first element,1the second element and so on. Negative indices can be used to designate elements starting at the tail of the list. Here,-1means the last element,-2means the penultimate and so forth.- Specified by:
lindexin interfaceListBaseCommands- Parameters:
key- The key of the list.index- The index of the element in the list to retrieve.- Returns:
- The element at
indexin the list stored atkey.
Ifindexis out of range or ifkeydoes not exist,nullis returned. - See Also:
- valkey.io for details.
-
ltrim
public java.util.concurrent.CompletableFuture<java.lang.String> ltrim(@NonNull @NonNull java.lang.String key, long start, long end)Description copied from interface:ListBaseCommandsTrims an existing list so that it will contain only the specified range of elements specified.
The offsetsstartandendare zero-based indexes, with 0 being the first element of the list, 1 being the next element and so on.
These offsets can also be negative numbers indicating offsets starting at the end of the list, with -1 being the last element of the list, -2 being the penultimate, and so on.- Specified by:
ltrimin interfaceListBaseCommands- Parameters:
key- The key of the list.start- The starting point of the range.end- The end of the range.- Returns:
- Always
OK.
Ifstartexceeds the end of the list, or ifstartis greater thanend, the list is emptied and the key is removed.
Ifendexceeds the actual end of the list, it will be treated like the last element of the list.
Ifkeydoes not exist, OK will be returned without changes to the database. - See Also:
- valkey.io for details.
-
ltrim
public java.util.concurrent.CompletableFuture<java.lang.String> ltrim(@NonNull @NonNull GlideString key, long start, long end)Description copied from interface:ListBaseCommandsTrims an existing list so that it will contain only the specified range of elements specified.
The offsetsstartandendare zero-based indexes, with 0 being the first element of the list, 1 being the next element and so on.
These offsets can also be negative numbers indicating offsets starting at the end of the list, with -1 being the last element of the list, -2 being the penultimate, and so on.- Specified by:
ltrimin interfaceListBaseCommands- Parameters:
key- The key of the list.start- The starting point of the range.end- The end of the range.- Returns:
- Always
OK.
Ifstartexceeds the end of the list, or ifstartis greater thanend, the result will be an empty list (which causes key to be removed).
Ifendexceeds the actual end of the list, it will be treated like the last element of the list.
Ifkeydoes not exist, OK will be returned without changes to the database. - See Also:
- valkey.io for details.
-
llen
public java.util.concurrent.CompletableFuture<java.lang.Long> llen(@NonNull @NonNull java.lang.String key)Description copied from interface:ListBaseCommandsReturns the length of the list stored atkey.- Specified by:
llenin interfaceListBaseCommands- Parameters:
key- The key of the list.- Returns:
- The length of the list at
key.
Ifkeydoes not exist, it is interpreted as an empty list and0is returned. - See Also:
- valkey.io for details.
-
llen
public java.util.concurrent.CompletableFuture<java.lang.Long> llen(@NonNull @NonNull GlideString key)Description copied from interface:ListBaseCommandsReturns the length of the list stored atkey.- Specified by:
llenin interfaceListBaseCommands- Parameters:
key- The key of the list.- Returns:
- The length of the list at
key.
Ifkeydoes not exist, it is interpreted as an empty list and0is returned. - See Also:
- valkey.io for details.
-
lrem
public java.util.concurrent.CompletableFuture<java.lang.Long> lrem(@NonNull @NonNull java.lang.String key, long count, @NonNull @NonNull java.lang.String element)Description copied from interface:ListBaseCommandsRemoves the firstcountoccurrences of elements equal toelementfrom the list stored atkey.- Specified by:
lremin interfaceListBaseCommands- Parameters:
key- The key of the list.count- The count of the occurrences of elements equal toelementto remove. Ifcountis positive: Removes elements equal toelementmoving from head to tail.
Ifcountis negative: Removes elements equal toelementmoving from tail to head.
Ifcountis 0 orcountis greater than the occurrences of elements equal toelement, it removes all elements equal toelement.`element- The element to remove from the list.- Returns:
- The number of the removed elements.
Ifkeydoes not exist,0is returned. - See Also:
- valkey.io for details.
-
lrem
public java.util.concurrent.CompletableFuture<java.lang.Long> lrem(@NonNull @NonNull GlideString key, long count, @NonNull @NonNull GlideString element)Description copied from interface:ListBaseCommandsRemoves the firstcountoccurrences of elements equal toelementfrom the list stored atkey.- Specified by:
lremin interfaceListBaseCommands- Parameters:
key- The key of the list.count- The count of the occurrences of elements equal toelementto remove. Ifcountis positive: Removes elements equal toelementmoving from head to tail.
Ifcountis negative: Removes elements equal toelementmoving from tail to head.
Ifcountis 0 orcountis greater than the occurrences of elements equal toelement, it removes all elements equal toelement.`element- The element to remove from the list.- Returns:
- The number of the removed elements.
Ifkeydoes not exist,0is returned. - See Also:
- valkey.io for details.
-
rpush
public java.util.concurrent.CompletableFuture<java.lang.Long> rpush(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] elements)Description copied from interface:ListBaseCommandsInserts all the specified values at the tail of the list stored atkey.
elementsare inserted one after the other to the tail of the list, from the leftmost element to the rightmost element. Ifkeydoes not exist, it is created as an empty list before performing the push operation.- Specified by:
rpushin interfaceListBaseCommands- Parameters:
key- The key of the list.elements- The elements to insert at the tail of the list stored atkey.- Returns:
- The length of the list after the push operation.
- See Also:
- valkey.io for details.
-
rpush
public java.util.concurrent.CompletableFuture<java.lang.Long> rpush(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] elements)Description copied from interface:ListBaseCommandsInserts all the specified values at the tail of the list stored atkey.
elementsare inserted one after the other to the tail of the list, from the leftmost element to the rightmost element. Ifkeydoes not exist, it is created as an empty list before performing the push operation.- Specified by:
rpushin interfaceListBaseCommands- Parameters:
key- The key of the list.elements- The elements to insert at the tail of the list stored atkey.- Returns:
- The length of the list after the push operation.
- See Also:
- valkey.io for details.
-
rpop
public java.util.concurrent.CompletableFuture<java.lang.String> rpop(@NonNull @NonNull java.lang.String key)Description copied from interface:ListBaseCommandsRemoves and returns the last elements of the list stored atkey.
The command pops a single element from the end of the list.- Specified by:
rpopin interfaceListBaseCommands- Parameters:
key- The key of the list.- Returns:
- The value of the last element.
Ifkeydoes not exist,nullwill be returned. - See Also:
- valkey.io for details.
-
rpop
public java.util.concurrent.CompletableFuture<GlideString> rpop(@NonNull @NonNull GlideString key)
Description copied from interface:ListBaseCommandsRemoves and returns the last elements of the list stored atkey.
The command pops a single element from the end of the list.- Specified by:
rpopin interfaceListBaseCommands- Parameters:
key- The key of the list.- Returns:
- The value of the last element.
Ifkeydoes not exist,nullwill be returned. - See Also:
- valkey.io for details.
-
rpopCount
public java.util.concurrent.CompletableFuture<java.lang.String[]> rpopCount(@NonNull @NonNull java.lang.String key, long count)Description copied from interface:ListBaseCommandsRemoves and returns up tocountelements from the list stored atkey, depending on the list's length.- Specified by:
rpopCountin interfaceListBaseCommands- Parameters:
key- The key of the list.count- The count of the elements to pop from the list.- Returns:
- An array of popped elements will be returned depending on the list's length.
Ifkeydoes not exist,nullwill be returned. - See Also:
- valkey.io for details.
-
rpopCount
public java.util.concurrent.CompletableFuture<GlideString[]> rpopCount(@NonNull @NonNull GlideString key, long count)
Description copied from interface:ListBaseCommandsRemoves and returns up tocountelements from the list stored atkey, depending on the list's length.- Specified by:
rpopCountin interfaceListBaseCommands- Parameters:
key- The key of the list.count- The count of the elements to pop from the list.- Returns:
- An array of popped elements will be returned depending on the list's length.
Ifkeydoes not exist,nullwill be returned. - See Also:
- valkey.io for details.
-
sadd
public java.util.concurrent.CompletableFuture<java.lang.Long> sadd(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] members)Description copied from interface:SetBaseCommandsAdds specified members to the set stored atkey. Specified members that are already a member of this set are ignored.- Specified by:
saddin interfaceSetBaseCommands- Parameters:
key- Thekeywhere members will be added to its set.members- A list of members to add to the set stored atkey.- Returns:
- The number of members that were added to the set, excluding members already present.
- See Also:
- valkey.io for details.
-
sadd
public java.util.concurrent.CompletableFuture<java.lang.Long> sadd(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] members)Description copied from interface:SetBaseCommandsAdds specified members to the set stored atkey. Specified members that are already a member of this set are ignored.- Specified by:
saddin interfaceSetBaseCommands- Parameters:
key- Thekeywhere members will be added to its set.members- A list of members to add to the set stored atkey.- Returns:
- The number of members that were added to the set, excluding members already present.
- See Also:
- valkey.io for details.
-
sismember
public java.util.concurrent.CompletableFuture<java.lang.Boolean> sismember(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String member)Description copied from interface:SetBaseCommandsReturns ifmemberis a member of the set stored atkey.- Specified by:
sismemberin interfaceSetBaseCommands- Parameters:
key- The key of the set.member- The member to check for existence in the set.- Returns:
trueif the member exists in the set,falseotherwise. Ifkeydoesn't exist, it is treated as anempty setand the command returnsfalse.- See Also:
- valkey.io for details.
-
sismember
public java.util.concurrent.CompletableFuture<java.lang.Boolean> sismember(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString member)Description copied from interface:SetBaseCommandsReturns ifmemberis a member of the set stored atkey.- Specified by:
sismemberin interfaceSetBaseCommands- Parameters:
key- The key of the set.member- The member to check for existence in the set.- Returns:
trueif the member exists in the set,falseotherwise. Ifkeydoesn't exist, it is treated as anempty setand the command returnsfalse.- See Also:
- valkey.io for details.
-
srem
public java.util.concurrent.CompletableFuture<java.lang.Long> srem(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] members)Description copied from interface:SetBaseCommandsRemoves specified members from the set stored atkey. Specified members that are not a member of this set are ignored.- Specified by:
sremin interfaceSetBaseCommands- Parameters:
key- Thekeyfrom which members will be removed.members- A list of members to remove from the set stored atkey.- Returns:
- The number of members that were removed from the set, excluding non-existing members.
- See Also:
- valkey.io for details.
-
srem
public java.util.concurrent.CompletableFuture<java.lang.Long> srem(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] members)Description copied from interface:SetBaseCommandsRemoves specified members from the set stored atkey. Specified members that are not a member of this set are ignored.- Specified by:
sremin interfaceSetBaseCommands- Parameters:
key- Thekeyfrom which members will be removed.members- A list of members to remove from the set stored atkey.- Returns:
- The number of members that were removed from the set, excluding non-existing members.
- See Also:
- valkey.io for details.
-
smembers
public java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>> smembers(@NonNull @NonNull java.lang.String key)Description copied from interface:SetBaseCommandsRetrieves all the members of the set value stored atkey.- Specified by:
smembersin interfaceSetBaseCommands- Parameters:
key- The key from which to retrieve the set members.- Returns:
- A
Setof all members of the set. - See Also:
- valkey.io for details.
-
smembers
public java.util.concurrent.CompletableFuture<java.util.Set<GlideString>> smembers(@NonNull @NonNull GlideString key)
Description copied from interface:SetBaseCommandsRetrieves all the members of the set value stored atkey.- Specified by:
smembersin interfaceSetBaseCommands- Parameters:
key- The key from which to retrieve the set members.- Returns:
- A
Setof all members of the set. - See Also:
- valkey.io for details.
-
scard
public java.util.concurrent.CompletableFuture<java.lang.Long> scard(@NonNull @NonNull java.lang.String key)Description copied from interface:SetBaseCommandsRetrieves the set cardinality (number of elements) of the set stored atkey.- Specified by:
scardin interfaceSetBaseCommands- Parameters:
key- The key from which to retrieve the number of set members.- Returns:
- The cardinality (number of elements) of the set, or 0 if the key does not exist.
- See Also:
- valkey.io for details.
-
scard
public java.util.concurrent.CompletableFuture<java.lang.Long> scard(@NonNull @NonNull GlideString key)Description copied from interface:SetBaseCommandsRetrieves the set cardinality (number of elements) of the set stored atkey.- Specified by:
scardin interfaceSetBaseCommands- Parameters:
key- The key from which to retrieve the number of set members.- Returns:
- The cardinality (number of elements) of the set, or 0 if the key does not exist.
- See Also:
- valkey.io for details.
-
sdiff
public java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>> sdiff(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:SetBaseCommandsComputes the difference between the first set and all the successive sets inkeys.- Specified by:
sdiffin interfaceSetBaseCommands- Parameters:
keys- The keys of the sets to diff.- Returns:
- A
Setof elements representing the difference between the sets.
If the akeydoes not exist, it is treated as an empty set. - See Also:
- valkey.io for details.
-
sdiff
public java.util.concurrent.CompletableFuture<java.util.Set<GlideString>> sdiff(@NonNull @NonNull GlideString[] keys)
Description copied from interface:SetBaseCommandsComputes the difference between the first set and all the successive sets inkeys.- Specified by:
sdiffin interfaceSetBaseCommands- Parameters:
keys- The keys of the sets to diff.- Returns:
- A
Setof elements representing the difference between the sets.
If the akeydoes not exist, it is treated as an empty set. - See Also:
- valkey.io for details.
-
smismember
public java.util.concurrent.CompletableFuture<java.lang.Boolean[]> smismember(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] members)Description copied from interface:SetBaseCommandsChecks whether each member is contained in the members of the set stored atkey.- Specified by:
smismemberin interfaceSetBaseCommands- Parameters:
key- The key of the set to check.members- A list of members to check for existence in the set.- Returns:
- An
arrayofBooleanvalues, each indicating if the respective member exists in the set. - See Also:
- valkey.io for details.
-
smismember
public java.util.concurrent.CompletableFuture<java.lang.Boolean[]> smismember(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] members)Description copied from interface:SetBaseCommandsChecks whether each member is contained in the members of the set stored atkey.- Specified by:
smismemberin interfaceSetBaseCommands- Parameters:
key- The key of the set to check.members- A list of members to check for existence in the set.- Returns:
- An
arrayofBooleanvalues, each indicating if the respective member exists in the set. - See Also:
- valkey.io for details.
-
sdiffstore
public java.util.concurrent.CompletableFuture<java.lang.Long> sdiffstore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String[] keys)Description copied from interface:SetBaseCommandsStores the difference between the first set and all the successive sets inkeysinto a new set atdestination.- Specified by:
sdiffstorein interfaceSetBaseCommands- Parameters:
destination- The key of the destination set.keys- The keys of the sets to diff.- Returns:
- The number of elements in the resulting set.
- See Also:
- valkey.io for details.
-
sdiffstore
public java.util.concurrent.CompletableFuture<java.lang.Long> sdiffstore(@NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString[] keys)Description copied from interface:SetBaseCommandsStores the difference between the first set and all the successive sets inkeysinto a new set atdestination.- Specified by:
sdiffstorein interfaceSetBaseCommands- Parameters:
destination- The key of the destination set.keys- The keys of the sets to diff.- Returns:
- The number of elements in the resulting set.
- See Also:
- valkey.io for details.
-
smove
public java.util.concurrent.CompletableFuture<java.lang.Boolean> smove(@NonNull @NonNull java.lang.String source, @NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String member)Description copied from interface:SetBaseCommandsMovesmemberfrom the set atsourceto the set atdestination, removing it from the source set. Creates a new destination set if needed. The operation is atomic.- Specified by:
smovein interfaceSetBaseCommands- Parameters:
source- The key of the set to remove the element from.destination- The key of the set to add the element to.member- The set element to move.- Returns:
trueon success, orfalseif thesourceset does not exist or the element is not a member of the source set.- See Also:
- valkey.io for details.
-
smove
public java.util.concurrent.CompletableFuture<java.lang.Boolean> smove(@NonNull @NonNull GlideString source, @NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString member)Description copied from interface:SetBaseCommandsMovesmemberfrom the set atsourceto the set atdestination, removing it from the source set. Creates a new destination set if needed. The operation is atomic.- Specified by:
smovein interfaceSetBaseCommands- Parameters:
source- The key of the set to remove the element from.destination- The key of the set to add the element to.member- The set element to move.- Returns:
trueon success, orfalseif thesourceset does not exist or the element is not a member of the source set.- See Also:
- valkey.io for details.
-
sinterstore
public java.util.concurrent.CompletableFuture<java.lang.Long> sinterstore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String[] keys)Description copied from interface:SetBaseCommandsStores the members of the intersection of all given sets specified bykeysinto a new set atdestination.- Specified by:
sinterstorein interfaceSetBaseCommands- Parameters:
destination- The key of the destination set.keys- The keys from which to retrieve the set members.- Returns:
- The number of elements in the resulting set.
- See Also:
- valkey.io for details.
-
sinterstore
public java.util.concurrent.CompletableFuture<java.lang.Long> sinterstore(@NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString[] keys)Description copied from interface:SetBaseCommandsStores the members of the intersection of all given sets specified bykeysinto a new set atdestination.- Specified by:
sinterstorein interfaceSetBaseCommands- Parameters:
destination- The key of the destination set.keys- The keys from which to retrieve the set members.- Returns:
- The number of elements in the resulting set.
- See Also:
- valkey.io for details.
-
sinter
public java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>> sinter(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:SetBaseCommandsGets the intersection of all the given sets.- Specified by:
sinterin interfaceSetBaseCommands- Parameters:
keys- The keys of the sets.- Returns:
- A
Setof members which are present in all given sets.
If one or more sets do not exist, an empty set will be returned. - See Also:
- valkey.io for details.
-
sinter
public java.util.concurrent.CompletableFuture<java.util.Set<GlideString>> sinter(@NonNull @NonNull GlideString[] keys)
Description copied from interface:SetBaseCommandsGets the intersection of all the given sets.- Specified by:
sinterin interfaceSetBaseCommands- Parameters:
keys- The keys of the sets.- Returns:
- A
Setof members which are present in all given sets.
If one or more sets do not exist, an empty set will be returned. - See Also:
- valkey.io for details.
-
sunionstore
public java.util.concurrent.CompletableFuture<java.lang.Long> sunionstore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String[] keys)Description copied from interface:SetBaseCommandsStores the members of the union of all given sets specified bykeysinto a new set atdestination.- Specified by:
sunionstorein interfaceSetBaseCommands- Parameters:
destination- The key of the destination set.keys- The keys from which to retrieve the set members.- Returns:
- The number of elements in the resulting set.
- See Also:
- valkey.io for details.
-
sunionstore
public java.util.concurrent.CompletableFuture<java.lang.Long> sunionstore(@NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString[] keys)Description copied from interface:SetBaseCommandsStores the members of the union of all given sets specified bykeysinto a new set atdestination.- Specified by:
sunionstorein interfaceSetBaseCommands- Parameters:
destination- The key of the destination set.keys- The keys from which to retrieve the set members.- Returns:
- The number of elements in the resulting set.
- See Also:
- valkey.io for details.
-
exists
public java.util.concurrent.CompletableFuture<java.lang.Long> exists(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:GenericBaseCommandsReturns the number of keys inkeysthat exist in the database.- Specified by:
existsin interfaceGenericBaseCommands- Parameters:
keys- The keys list to check.- Returns:
- The number of keys that exist. If the same existing key is mentioned in
keysmultiple times, it will be counted multiple times. - See Also:
- valkey.io for details.
-
exists
public java.util.concurrent.CompletableFuture<java.lang.Long> exists(@NonNull @NonNull GlideString[] keys)Description copied from interface:GenericBaseCommandsReturns the number of keys inkeysthat exist in the database.- Specified by:
existsin interfaceGenericBaseCommands- Parameters:
keys- The keys list to check.- Returns:
- The number of keys that exist. If the same existing key is mentioned in
keysmultiple times, it will be counted multiple times. - See Also:
- valkey.io for details.
-
unlink
public java.util.concurrent.CompletableFuture<java.lang.Long> unlink(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:GenericBaseCommandsUnlink (delete) multiplekeysfrom the database. A key is ignored if it does not exist. This command, similar to DEL, removes specified keys and ignores non-existent ones. However, this command does not block the server, while DEL does.- Specified by:
unlinkin interfaceGenericBaseCommands- Parameters:
keys- The list of keys to unlink.- Returns:
- The number of
keysthat were unlinked. - See Also:
- valkey.io for details.
-
unlink
public java.util.concurrent.CompletableFuture<java.lang.Long> unlink(@NonNull @NonNull GlideString[] keys)Description copied from interface:GenericBaseCommandsUnlink (delete) multiplekeysfrom the database. A key is ignored if it does not exist. This command, similar to DEL, removes specified keys and ignores non-existent ones. However, this command does not block the server, while DEL does.- Specified by:
unlinkin interfaceGenericBaseCommands- Parameters:
keys- The list of keys to unlink.- Returns:
- The number of
keysthat were unlinked. - See Also:
- valkey.io for details.
-
expire
public java.util.concurrent.CompletableFuture<java.lang.Boolean> expire(@NonNull @NonNull java.lang.String key, long seconds)Description copied from interface:GenericBaseCommandsSets a timeout onkeyin seconds. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
Ifsecondsis a non-positive number, thekeywill be deleted rather than expired.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
expirein interfaceGenericBaseCommands- Parameters:
key- The key to set timeout on it.seconds- The timeout in seconds.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist.- See Also:
- valkey.io for details.
-
expire
public java.util.concurrent.CompletableFuture<java.lang.Boolean> expire(@NonNull @NonNull GlideString key, long seconds)Description copied from interface:GenericBaseCommandsSets a timeout onkeyin seconds. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
Ifsecondsis a non-positive number, thekeywill be deleted rather than expired.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
expirein interfaceGenericBaseCommands- Parameters:
key- The key to set timeout on it.seconds- The timeout in seconds.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist.- See Also:
- valkey.io for details.
-
expire
public java.util.concurrent.CompletableFuture<java.lang.Boolean> expire(@NonNull @NonNull java.lang.String key, long seconds, @NonNull @NonNull ExpireOptions expireOptions)Description copied from interface:GenericBaseCommandsSets a timeout onkeyin seconds. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
Ifsecondsis a non-positive number, thekeywill be deleted rather than expired.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
expirein interfaceGenericBaseCommands- Parameters:
key- The key to set timeout on it.seconds- The timeout in seconds.expireOptions- The expire options.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist, or operation skipped due to the provided arguments.- See Also:
- valkey.io for details.
-
expire
public java.util.concurrent.CompletableFuture<java.lang.Boolean> expire(@NonNull @NonNull GlideString key, long seconds, @NonNull @NonNull ExpireOptions expireOptions)Description copied from interface:GenericBaseCommandsSets a timeout onkeyin seconds. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
Ifsecondsis a non-positive number, thekeywill be deleted rather than expired.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
expirein interfaceGenericBaseCommands- Parameters:
key- The key to set timeout on it.seconds- The timeout in seconds.expireOptions- The expire options.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist, or operation skipped due to the provided arguments.- See Also:
- valkey.io for details.
-
expireAt
public java.util.concurrent.CompletableFuture<java.lang.Boolean> expireAt(@NonNull @NonNull java.lang.String key, long unixSeconds)Description copied from interface:GenericBaseCommandsSets a timeout onkey. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of specifying the number of seconds.
A timestamp in the past will delete thekeyimmediately. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
expireAtin interfaceGenericBaseCommands- Parameters:
key- The key to set timeout on it.unixSeconds- The timeout in an absolute Unix timestamp.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist.- See Also:
- valkey.io for details.
-
expireAt
public java.util.concurrent.CompletableFuture<java.lang.Boolean> expireAt(@NonNull @NonNull GlideString key, long unixSeconds)Description copied from interface:GenericBaseCommandsSets a timeout onkey. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of specifying the number of seconds.
A timestamp in the past will delete thekeyimmediately. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
expireAtin interfaceGenericBaseCommands- Parameters:
key- The key to set timeout on it.unixSeconds- The timeout in an absolute Unix timestamp.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist.- See Also:
- valkey.io for details.
-
expireAt
public java.util.concurrent.CompletableFuture<java.lang.Boolean> expireAt(@NonNull @NonNull java.lang.String key, long unixSeconds, @NonNull @NonNull ExpireOptions expireOptions)Description copied from interface:GenericBaseCommandsSets a timeout onkey. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of specifying the number of seconds.
A timestamp in the past will delete thekeyimmediately. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
expireAtin interfaceGenericBaseCommands- Parameters:
key- The key to set timeout on it.unixSeconds- The timeout in an absolute Unix timestamp.expireOptions- The expire options.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist, or operation skipped due to the provided arguments.- See Also:
- valkey.io for details.
-
expireAt
public java.util.concurrent.CompletableFuture<java.lang.Boolean> expireAt(@NonNull @NonNull GlideString key, long unixSeconds, @NonNull @NonNull ExpireOptions expireOptions)Description copied from interface:GenericBaseCommandsSets a timeout onkey. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of specifying the number of seconds.
A timestamp in the past will delete thekeyimmediately. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
expireAtin interfaceGenericBaseCommands- Parameters:
key- The key to set timeout on it.unixSeconds- The timeout in an absolute Unix timestamp.expireOptions- The expire options.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist, or operation skipped due to the provided arguments.- See Also:
- valkey.io for details.
-
pexpire
public java.util.concurrent.CompletableFuture<java.lang.Boolean> pexpire(@NonNull @NonNull java.lang.String key, long milliseconds)Description copied from interface:GenericBaseCommandsSets a timeout onkeyin milliseconds. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
Ifmillisecondsis a non-positive number, thekeywill be deleted rather than expired.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
pexpirein interfaceGenericBaseCommands- Parameters:
key- The key to set timeout on it.milliseconds- The timeout in milliseconds.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist.- See Also:
- valkey.io for details.
-
pexpire
public java.util.concurrent.CompletableFuture<java.lang.Boolean> pexpire(@NonNull @NonNull GlideString key, long milliseconds)Description copied from interface:GenericBaseCommandsSets a timeout onkeyin milliseconds. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
Ifmillisecondsis a non-positive number, thekeywill be deleted rather than expired.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
pexpirein interfaceGenericBaseCommands- Parameters:
key- The key to set timeout on it.milliseconds- The timeout in milliseconds.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist.- See Also:
- valkey.io for details.
-
pexpire
public java.util.concurrent.CompletableFuture<java.lang.Boolean> pexpire(@NonNull @NonNull java.lang.String key, long milliseconds, @NonNull @NonNull ExpireOptions expireOptions)Description copied from interface:GenericBaseCommandsSets a timeout onkeyin milliseconds. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existing expire set, the time to live is updated to the new value.
Ifmillisecondsis a non-positive number, thekeywill be deleted rather than expired.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
pexpirein interfaceGenericBaseCommands- Parameters:
key- The key to set timeout on it.milliseconds- The timeout in milliseconds.expireOptions- The expire options.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist, or operation skipped due to the provided arguments.- See Also:
- valkey.io for details.
-
pexpire
public java.util.concurrent.CompletableFuture<java.lang.Boolean> pexpire(@NonNull @NonNull GlideString key, long milliseconds, @NonNull @NonNull ExpireOptions expireOptions)Description copied from interface:GenericBaseCommandsSets a timeout onkeyin milliseconds. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existing expire set, the time to live is updated to the new value.
Ifmillisecondsis a non-positive number, thekeywill be deleted rather than expired.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
pexpirein interfaceGenericBaseCommands- Parameters:
key- The key to set timeout on it.milliseconds- The timeout in milliseconds.expireOptions- The expire options.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist, or operation skipped due to the provided arguments.- See Also:
- valkey.io for details.
-
pexpireAt
public java.util.concurrent.CompletableFuture<java.lang.Boolean> pexpireAt(@NonNull @NonNull java.lang.String key, long unixMilliseconds)Description copied from interface:GenericBaseCommandsSets a timeout onkey. It takes an absolute Unix timestamp (milliseconds since January 1, 1970) instead of specifying the number of milliseconds.
A timestamp in the past will delete thekeyimmediately. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
pexpireAtin interfaceGenericBaseCommands- Parameters:
key- Thekeyto set timeout on it.unixMilliseconds- The timeout in an absolute Unix timestamp.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist.- See Also:
- valkey.io for details.
-
pexpireAt
public java.util.concurrent.CompletableFuture<java.lang.Boolean> pexpireAt(@NonNull @NonNull GlideString key, long unixMilliseconds)Description copied from interface:GenericBaseCommandsSets a timeout onkey. It takes an absolute Unix timestamp (milliseconds since January 1, 1970) instead of specifying the number of milliseconds.
A timestamp in the past will delete thekeyimmediately. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
pexpireAtin interfaceGenericBaseCommands- Parameters:
key- Thekeyto set timeout on it.unixMilliseconds- The timeout in an absolute Unix timestamp.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist.- See Also:
- valkey.io for details.
-
pexpireAt
public java.util.concurrent.CompletableFuture<java.lang.Boolean> pexpireAt(@NonNull @NonNull java.lang.String key, long unixMilliseconds, @NonNull @NonNull ExpireOptions expireOptions)Description copied from interface:GenericBaseCommandsSets a timeout onkey. It takes an absolute Unix timestamp (milliseconds since January 1, 1970) instead of specifying the number of milliseconds.
A timestamp in the past will delete thekeyimmediately. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
pexpireAtin interfaceGenericBaseCommands- Parameters:
key- Thekeyto set timeout on it.unixMilliseconds- The timeout in an absolute Unix timestamp.expireOptions- The expire option.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist, or operation skipped due to the provided arguments.- See Also:
- valkey.io for details.
-
pexpireAt
public java.util.concurrent.CompletableFuture<java.lang.Boolean> pexpireAt(@NonNull @NonNull GlideString key, long unixMilliseconds, @NonNull @NonNull ExpireOptions expireOptions)Description copied from interface:GenericBaseCommandsSets a timeout onkey. It takes an absolute Unix timestamp (milliseconds since January 1, 1970) instead of specifying the number of milliseconds.
A timestamp in the past will delete thekeyimmediately. After the timeout has expired, thekeywill automatically be deleted.
Ifkeyalready has an existingexpireset, the time to live is updated to the new value.
The timeout will only be cleared by commands that delete or overwrite the contents ofkey.- Specified by:
pexpireAtin interfaceGenericBaseCommands- Parameters:
key- Thekeyto set timeout on it.unixMilliseconds- The timeout in an absolute Unix timestamp.expireOptions- The expire option.- Returns:
trueif the timeout was set.falseif the timeout was not set. e.g.keydoesn't exist, or operation skipped due to the provided arguments.- See Also:
- valkey.io for details.
-
ttl
public java.util.concurrent.CompletableFuture<java.lang.Long> ttl(@NonNull @NonNull java.lang.String key)Description copied from interface:GenericBaseCommandsReturns the remaining time to live ofkeythat has a timeout, in seconds.- Specified by:
ttlin interfaceGenericBaseCommands- Parameters:
key- Thekeyto return its timeout.- Returns:
- TTL in seconds,
-2ifkeydoes not exist, or-1ifkeyexists but has no associated expiration. - See Also:
- valkey.io for details.
-
ttl
public java.util.concurrent.CompletableFuture<java.lang.Long> ttl(@NonNull @NonNull GlideString key)Description copied from interface:GenericBaseCommandsReturns the remaining time to live ofkeythat has a timeout, in seconds.- Specified by:
ttlin interfaceGenericBaseCommands- Parameters:
key- Thekeyto return its timeout.- Returns:
- TTL in seconds,
-2ifkeydoes not exist, or-1ifkeyexists but has no associated expiration. - See Also:
- valkey.io for details.
-
expiretime
public java.util.concurrent.CompletableFuture<java.lang.Long> expiretime(@NonNull @NonNull java.lang.String key)Description copied from interface:GenericBaseCommandsReturns the absolute Unix timestamp (since January 1, 1970) at which the givenkeywill expire, in seconds.
To get the expiration with millisecond precision, useGenericBaseCommands.pexpiretime(String).- Specified by:
expiretimein interfaceGenericBaseCommands- Parameters:
key- Thekeyto determine the expiration value of.- Returns:
- The expiration Unix timestamp in seconds.
-2ifkeydoes not exist, or-1ifkeyexists but has no associated expiration. - See Also:
- valkey.io for details.
-
expiretime
public java.util.concurrent.CompletableFuture<java.lang.Long> expiretime(@NonNull @NonNull GlideString key)Description copied from interface:GenericBaseCommandsReturns the absolute Unix timestamp (since January 1, 1970) at which the givenkeywill expire, in seconds.
To get the expiration with millisecond precision, useGenericBaseCommands.pexpiretime(String).- Specified by:
expiretimein interfaceGenericBaseCommands- Parameters:
key- Thekeyto determine the expiration value of.- Returns:
- The expiration Unix timestamp in seconds.
-2ifkeydoes not exist, or-1ifkeyexists but has no associated expiration. - See Also:
- valkey.io for details.
-
pexpiretime
public java.util.concurrent.CompletableFuture<java.lang.Long> pexpiretime(@NonNull @NonNull java.lang.String key)Description copied from interface:GenericBaseCommandsReturns the absolute Unix timestamp (since January 1, 1970) at which the givenkeywill expire, in milliseconds.- Specified by:
pexpiretimein interfaceGenericBaseCommands- Parameters:
key- Thekeyto determine the expiration value of.- Returns:
- The expiration Unix timestamp in milliseconds.
-2ifkeydoes not exist, or-1ifkeyexists but has no associated expiration. - See Also:
- valkey.io for details.
-
pexpiretime
public java.util.concurrent.CompletableFuture<java.lang.Long> pexpiretime(@NonNull @NonNull GlideString key)Description copied from interface:GenericBaseCommandsReturns the absolute Unix timestamp (since January 1, 1970) at which the givenkeywill expire, in milliseconds.- Specified by:
pexpiretimein interfaceGenericBaseCommands- Parameters:
key- Thekeyto determine the expiration value of.- Returns:
- The expiration Unix timestamp in milliseconds.
-2ifkeydoes not exist, or-1ifkeyexists but has no associated expiration. - See Also:
- valkey.io for details.
-
invokeScript
public java.util.concurrent.CompletableFuture<java.lang.Object> invokeScript(@NonNull @NonNull Script script)Description copied from interface:ScriptingAndFunctionsBaseCommandsInvokes a Lua script.
This method simplifies the process of invoking scripts on the server by using an object that represents a Lua script. The script loading and execution will all be handled internally. If the script has not already been loaded, it will be loaded automatically using theSCRIPT LOADcommand. After that, it will be invoked using theEVALSHAcommand.- Specified by:
invokeScriptin interfaceScriptingAndFunctionsBaseCommands- Parameters:
script- The Lua script to execute.- Returns:
- A value that depends on the script that was executed.
- See Also:
- SCRIPT LOAD and EVALSHA for details.
-
invokeScript
public java.util.concurrent.CompletableFuture<java.lang.Object> invokeScript(@NonNull @NonNull Script script, @NonNull @NonNull ScriptOptions options)Description copied from interface:ScriptingAndFunctionsBaseCommandsInvokes a Lua script with its keys and arguments.
This method simplifies the process of invoking scripts on the server by using an object that represents a Lua script. The script loading, argument preparation, and execution will all be handled internally. If the script has not already been loaded, it will be loaded automatically using theSCRIPT LOADcommand. After that, it will be invoked using theEVALSHAcommand.- Specified by:
invokeScriptin interfaceScriptingAndFunctionsBaseCommands- Parameters:
script- The Lua script to execute.options- The script option that contains keys and arguments for the script.- Returns:
- A value that depends on the script that was executed.
- See Also:
- SCRIPT LOAD and EVALSHA for details.
-
invokeScript
public java.util.concurrent.CompletableFuture<java.lang.Object> invokeScript(@NonNull @NonNull Script script, @NonNull @NonNull ScriptOptionsGlideString options)Description copied from interface:ScriptingAndFunctionsBaseCommandsInvokes a Lua script with its keys and arguments.
This method simplifies the process of invoking scripts on the server by using an object that represents a Lua script. The script loading, argument preparation, and execution will all be handled internally. If the script has not already been loaded, it will be loaded automatically using theSCRIPT LOADcommand. After that, it will be invoked using theEVALSHAcommand.- Specified by:
invokeScriptin interfaceScriptingAndFunctionsBaseCommands- Parameters:
script- The Lua script to execute.options- The script option that contains keys and arguments for the script.- Returns:
- A value that depends on the script that was executed.
- See Also:
- SCRIPT LOAD and EVALSHA for details.
-
scriptShow
public java.util.concurrent.CompletableFuture<java.lang.String> scriptShow(@NonNull @NonNull java.lang.String sha1)Description copied from interface:ScriptingAndFunctionsBaseCommandsReturns the original source code of a script in the script cache.- Specified by:
scriptShowin interfaceScriptingAndFunctionsBaseCommands- Parameters:
sha1- The SHA1 digest of the script.- Returns:
- The original source code of the script, if present in the cache. If the script is not found in the cache, an error is thrown.
- See Also:
- valkey.io for details.
-
scriptShow
public java.util.concurrent.CompletableFuture<GlideString> scriptShow(@NonNull @NonNull GlideString sha1)
Description copied from interface:ScriptingAndFunctionsBaseCommandsReturns the original source code of a script in the script cache.- Specified by:
scriptShowin interfaceScriptingAndFunctionsBaseCommands- Parameters:
sha1- The SHA1 digest of the script.- Returns:
- The original source code of the script, if present in the cache. If the script is not found in the cache, an error is thrown.
- See Also:
- valkey.io for details.
-
scriptExists
public java.util.concurrent.CompletableFuture<java.lang.Boolean[]> scriptExists(@NonNull @NonNull java.lang.String[] sha1s)
-
scriptExists
public java.util.concurrent.CompletableFuture<java.lang.Boolean[]> scriptExists(@NonNull @NonNull GlideString[] sha1s)
-
scriptFlush
public java.util.concurrent.CompletableFuture<java.lang.String> scriptFlush()
-
scriptFlush
public java.util.concurrent.CompletableFuture<java.lang.String> scriptFlush(@NonNull @NonNull FlushMode flushMode)
-
scriptKill
public java.util.concurrent.CompletableFuture<java.lang.String> scriptKill()
-
zadd
public java.util.concurrent.CompletableFuture<java.lang.Long> zadd(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.util.Map<java.lang.String,java.lang.Double> membersScoresMap, @NonNull @NonNull ZAddOptions options, boolean changed)Description copied from interface:SortedSetBaseCommandsAdds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.- Specified by:
zaddin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.membersScoresMap- AMapof members to their corresponding scores.options- The ZAdd options.changed- Modify the return value from the number of new elements added, to the total number of elements changed.- Returns:
- The number of elements added to the sorted set.
Ifchangedis set, returns the number of elements updated in the sorted set. - See Also:
- valkey.io for more details.
-
zadd
public java.util.concurrent.CompletableFuture<java.lang.Long> zadd(@NonNull @NonNull GlideString key, @NonNull @NonNull java.util.Map<GlideString,java.lang.Double> membersScoresMap, @NonNull @NonNull ZAddOptions options, boolean changed)Description copied from interface:SortedSetBaseCommandsAdds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.- Specified by:
zaddin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.membersScoresMap- AMapof members to their corresponding scores.options- The ZAdd options.changed- Modify the return value from the number of new elements added, to the total number of elements changed.- Returns:
- The number of elements added to the sorted set.
Ifchangedis set, returns the number of elements updated in the sorted set. - See Also:
- valkey.io for more details.
-
zadd
public java.util.concurrent.CompletableFuture<java.lang.Long> zadd(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.util.Map<java.lang.String,java.lang.Double> membersScoresMap, @NonNull @NonNull ZAddOptions options)Description copied from interface:SortedSetBaseCommandsAdds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.- Specified by:
zaddin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.membersScoresMap- AMapof members to their corresponding scores.options- The ZAdd options.- Returns:
- The number of elements added to the sorted set.
- See Also:
- valkey.io for more details.
-
zadd
public java.util.concurrent.CompletableFuture<java.lang.Long> zadd(@NonNull @NonNull GlideString key, @NonNull @NonNull java.util.Map<GlideString,java.lang.Double> membersScoresMap, @NonNull @NonNull ZAddOptions options)Description copied from interface:SortedSetBaseCommandsAdds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.- Specified by:
zaddin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.membersScoresMap- AMapof members to their corresponding scores.options- The ZAdd options.- Returns:
- The number of elements added to the sorted set.
- See Also:
- valkey.io for more details.
-
zadd
public java.util.concurrent.CompletableFuture<java.lang.Long> zadd(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.util.Map<java.lang.String,java.lang.Double> membersScoresMap, boolean changed)Description copied from interface:SortedSetBaseCommandsAdds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.- Specified by:
zaddin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.membersScoresMap- AMapof members to their corresponding scores.changed- Modify the return value from the number of new elements added, to the total number of elements changed.- Returns:
- The number of elements added to the sorted set.
Ifchangedis set, returns the number of elements updated in the sorted set. - See Also:
- valkey.io for more details.
-
zadd
public java.util.concurrent.CompletableFuture<java.lang.Long> zadd(@NonNull @NonNull GlideString key, @NonNull @NonNull java.util.Map<GlideString,java.lang.Double> membersScoresMap, boolean changed)Description copied from interface:SortedSetBaseCommandsAdds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.- Specified by:
zaddin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.membersScoresMap- AMapof members to their corresponding scores.changed- Modify the return value from the number of new elements added, to the total number of elements changed.- Returns:
- The number of elements added to the sorted set.
Ifchangedis set, returns the number of elements updated in the sorted set. - See Also:
- valkey.io for more details.
-
zadd
public java.util.concurrent.CompletableFuture<java.lang.Long> zadd(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.util.Map<java.lang.String,java.lang.Double> membersScoresMap)Description copied from interface:SortedSetBaseCommandsAdds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.- Specified by:
zaddin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.membersScoresMap- AMapof members to their corresponding scores.- Returns:
- The number of elements added to the sorted set.
- See Also:
- valkey.io for more details.
-
zadd
public java.util.concurrent.CompletableFuture<java.lang.Long> zadd(@NonNull @NonNull GlideString key, @NonNull @NonNull java.util.Map<GlideString,java.lang.Double> membersScoresMap)Description copied from interface:SortedSetBaseCommandsAdds members with their scores to the sorted set stored atkey.
If a member is already a part of the sorted set, its score is updated.- Specified by:
zaddin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.membersScoresMap- AMapof members to their corresponding scores.- Returns:
- The number of elements added to the sorted set.
- See Also:
- valkey.io for more details.
-
zaddIncr
public java.util.concurrent.CompletableFuture<java.lang.Double> zaddIncr(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String member, double increment, @NonNull @NonNull ZAddOptions options)Description copied from interface:SortedSetBaseCommandsIncrements the score of member in the sorted set stored atkeybyincrement.
Ifmemberdoes not exist in the sorted set, it is added withincrementas its score (as if its previous score was0.0).
Ifkeydoes not exist, a new sorted set with the specified member as its sole member is created.
zaddIncrwith empty option acts asSortedSetBaseCommands.zincrby(String, double, String).- Specified by:
zaddIncrin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- A member in the sorted set to increment.increment- The score to increment the member.options- The ZAdd options.- Returns:
- The score of the member.
If there was a conflict with the options, the operation aborts andnullis returned. - See Also:
- valkey.io for more details.
-
zaddIncr
public java.util.concurrent.CompletableFuture<java.lang.Double> zaddIncr(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString member, double increment, @NonNull @NonNull ZAddOptions options)Description copied from interface:SortedSetBaseCommandsIncrements the score of member in the sorted set stored atkeybyincrement.
Ifmemberdoes not exist in the sorted set, it is added withincrementas its score (as if its previous score was0.0).
Ifkeydoes not exist, a new sorted set with the specified member as its sole member is created.
zaddIncrwith empty option acts asSortedSetBaseCommands.zincrby(GlideString, double, GlideString).- Specified by:
zaddIncrin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- A member in the sorted set to increment.increment- The score to increment the member.options- The ZAdd options.- Returns:
- The score of the member.
If there was a conflict with the options, the operation aborts andnullis returned. - See Also:
- valkey.io for more details.
-
zaddIncr
public java.util.concurrent.CompletableFuture<java.lang.Double> zaddIncr(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String member, double increment)Description copied from interface:SortedSetBaseCommandsIncrements the score of member in the sorted set stored atkeybyincrement.
Ifmemberdoes not exist in the sorted set, it is added withincrementas its score (as if its previous score was0.0).
Ifkeydoes not exist, a new sorted set with the specified member as its sole member is created.
zaddIncrwith empty option acts asSortedSetBaseCommands.zincrby(GlideString, double, GlideString).- Specified by:
zaddIncrin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- A member in the sorted set to increment.increment- The score to increment the member.- Returns:
- The score of the member.
- See Also:
- valkey.io for more details.
-
zaddIncr
public java.util.concurrent.CompletableFuture<java.lang.Double> zaddIncr(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString member, double increment)Description copied from interface:SortedSetBaseCommandsIncrements the score of member in the sorted set stored atkeybyincrement.
Ifmemberdoes not exist in the sorted set, it is added withincrementas its score (as if its previous score was0.0).
Ifkeydoes not exist, a new sorted set with the specified member as its sole member is created.- Specified by:
zaddIncrin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- A member in the sorted set to increment.increment- The score to increment the member.- Returns:
- The score of the member.
- See Also:
- valkey.io for more details.
-
zrem
public java.util.concurrent.CompletableFuture<java.lang.Long> zrem(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] members)Description copied from interface:SortedSetBaseCommandsRemoves the specified members from the sorted set stored atkey.
Specified members that are not a member of this set are ignored.- Specified by:
zremin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.members- An array of members to remove from the sorted set.- Returns:
- The number of members that were removed from the sorted set, not including non-existing
members.
Ifkeydoes not exist, it is treated as an empty sorted set, and this command returns0. - See Also:
- valkey.io for more details.
-
zrem
public java.util.concurrent.CompletableFuture<java.lang.Long> zrem(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] members)Description copied from interface:SortedSetBaseCommandsRemoves the specified members from the sorted set stored atkey.
Specified members that are not a member of this set are ignored.- Specified by:
zremin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.members- An array of members to remove from the sorted set.- Returns:
- The number of members that were removed from the sorted set, not including non-existing
members.
Ifkeydoes not exist, it is treated as an empty sorted set, and this command returns0. - See Also:
- valkey.io for more details.
-
zcard
public java.util.concurrent.CompletableFuture<java.lang.Long> zcard(@NonNull @NonNull java.lang.String key)Description copied from interface:SortedSetBaseCommandsReturns the cardinality (number of elements) of the sorted set stored atkey.- Specified by:
zcardin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.- Returns:
- The number of elements in the sorted set.
Ifkeydoes not exist, it is treated as an empty sorted set, and this command return0. - See Also:
- valkey.io for more details.
-
zcard
public java.util.concurrent.CompletableFuture<java.lang.Long> zcard(@NonNull @NonNull GlideString key)Description copied from interface:SortedSetBaseCommandsReturns the cardinality (number of elements) of the sorted set stored atkey.- Specified by:
zcardin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.- Returns:
- The number of elements in the sorted set.
Ifkeydoes not exist, it is treated as an empty sorted set, and this command return0. - See Also:
- valkey.io for more details.
-
zpopmin
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>> zpopmin(@NonNull @NonNull java.lang.String key, long count)Description copied from interface:SortedSetBaseCommandsRemoves and returns up tocountmembers with the lowest scores from the sorted set stored at the specifiedkey.- Specified by:
zpopminin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.count- Specifies the quantity of members to pop.
Ifcountis higher than the sorted set's cardinality, returns all members and their scores, ordered from lowest to highest.- Returns:
- A map of the removed members and their scores, ordered from the one with the lowest
score to the one with the highest.
Ifkeydoesn't exist, it will be treated as an empty sorted set and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
zpopmin
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>> zpopmin(@NonNull @NonNull GlideString key, long count)
Description copied from interface:SortedSetBaseCommandsRemoves and returns up tocountmembers with the lowest scores from the sorted set stored at the specifiedkey.- Specified by:
zpopminin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.count- Specifies the quantity of members to pop.
Ifcountis higher than the sorted set's cardinality, returns all members and their scores, ordered from lowest to highest.- Returns:
- A map of the removed members and their scores, ordered from the one with the lowest
score to the one with the highest.
Ifkeydoesn't exist, it will be treated as an empty sorted set and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
zpopmin
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>> zpopmin(@NonNull @NonNull java.lang.String key)Description copied from interface:SortedSetBaseCommandsRemoves and returns the member with the lowest score from the sorted set stored at the specifiedkey.- Specified by:
zpopminin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.- Returns:
- A map containing the removed member and its corresponding score.
Ifkeydoesn't exist, it will be treated as an empty sorted set and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
zpopmin
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>> zpopmin(@NonNull @NonNull GlideString key)
Description copied from interface:SortedSetBaseCommandsRemoves and returns the member with the lowest score from the sorted set stored at the specifiedkey.- Specified by:
zpopminin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.- Returns:
- A map containing the removed member and its corresponding score.
Ifkeydoesn't exist, it will be treated as an empty sorted set and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
bzpopmin
public java.util.concurrent.CompletableFuture<java.lang.Object[]> bzpopmin(@NonNull @NonNull java.lang.String[] keys, double timeout)Description copied from interface:SortedSetBaseCommandsBlocks the connection until it removes and returns a member with the lowest score from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZPOPMINis the blocking variant ofSortedSetBaseCommands.zpopmin(String).- Specified by:
bzpopminin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- An
arraycontaining the key where the member was popped out, the member itself, and the member score.
If no member could be popped and thetimeoutexpired, returnsnull. - See Also:
- valkey.io for more details.
-
bzpopmin
public java.util.concurrent.CompletableFuture<java.lang.Object[]> bzpopmin(@NonNull @NonNull GlideString[] keys, double timeout)Description copied from interface:SortedSetBaseCommandsBlocks the connection until it removes and returns a member with the lowest score from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZPOPMINis the blocking variant ofSortedSetBaseCommands.zpopmin(String).- Specified by:
bzpopminin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- An
arraycontaining the key where the member was popped out, the member itself, and the member score.
If no member could be popped and thetimeoutexpired, returnsnull. - See Also:
- valkey.io for more details.
-
zpopmax
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>> zpopmax(@NonNull @NonNull java.lang.String key, long count)Description copied from interface:SortedSetBaseCommandsRemoves and returns up tocountmembers with the highest scores from the sorted set stored at the specifiedkey.- Specified by:
zpopmaxin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.count- Specifies the quantity of members to pop.
Ifcountis higher than the sorted set's cardinality, returns all members and their scores, ordered from highest to lowest.- Returns:
- A map of the removed members and their scores, ordered from the one with the highest
score to the one with the lowest.
Ifkeydoesn't exist, it will be treated as an empty sorted set and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
zpopmax
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>> zpopmax(@NonNull @NonNull GlideString key, long count)
Description copied from interface:SortedSetBaseCommandsRemoves and returns up tocountmembers with the highest scores from the sorted set stored at the specifiedkey.- Specified by:
zpopmaxin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.count- Specifies the quantity of members to pop.
Ifcountis higher than the sorted set's cardinality, returns all members and their scores, ordered from highest to lowest.- Returns:
- A map of the removed members and their scores, ordered from the one with the highest
score to the one with the lowest.
Ifkeydoesn't exist, it will be treated as an empty sorted set and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
zpopmax
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>> zpopmax(@NonNull @NonNull java.lang.String key)Description copied from interface:SortedSetBaseCommandsRemoves and returns the member with the highest score from the sorted set stored at the specifiedkey.- Specified by:
zpopmaxin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.- Returns:
- A map containing the removed member and its corresponding score.
Ifkeydoesn't exist, it will be treated as an empty sorted set and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
zpopmax
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>> zpopmax(@NonNull @NonNull GlideString key)
Description copied from interface:SortedSetBaseCommandsRemoves and returns the member with the highest score from the sorted set stored at the specifiedkey.- Specified by:
zpopmaxin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.- Returns:
- A map containing the removed member and its corresponding score.
Ifkeydoesn't exist, it will be treated as an empty sorted set and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
bzpopmax
public java.util.concurrent.CompletableFuture<java.lang.Object[]> bzpopmax(@NonNull @NonNull java.lang.String[] keys, double timeout)Description copied from interface:SortedSetBaseCommandsBlocks the connection until it removes and returns a member with the highest score from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZPOPMAXis the blocking variant ofSortedSetBaseCommands.zpopmax(String).- Specified by:
bzpopmaxin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- An
arraycontaining the key where the member was popped out, the member itself, and the member score.
If no member could be popped and thetimeoutexpired, returnsnull. - See Also:
- valkey.io for more details.
-
bzpopmax
public java.util.concurrent.CompletableFuture<java.lang.Object[]> bzpopmax(@NonNull @NonNull GlideString[] keys, double timeout)Description copied from interface:SortedSetBaseCommandsBlocks the connection until it removes and returns a member with the highest score from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZPOPMAXis the blocking variant ofSortedSetBaseCommands.zpopmax(String).- Specified by:
bzpopmaxin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- An
arraycontaining the key where the member was popped out, the member itself, and the member score.
If no member could be popped and thetimeoutexpired, returnsnull. - See Also:
- valkey.io for more details.
-
zscore
public java.util.concurrent.CompletableFuture<java.lang.Double> zscore(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String member)Description copied from interface:SortedSetBaseCommandsReturns the score ofmemberin the sorted set stored atkey.- Specified by:
zscorein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- The member whose score is to be retrieved.- Returns:
- The score of the member.
Ifmemberdoes not exist in the sorted set,nullis returned.
Ifkeydoes not exist,nullis returned. - See Also:
- valkey.io for more details.
-
zscore
public java.util.concurrent.CompletableFuture<java.lang.Double> zscore(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString member)Description copied from interface:SortedSetBaseCommandsReturns the score ofmemberin the sorted set stored atkey.- Specified by:
zscorein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- The member whose score is to be retrieved.- Returns:
- The score of the member.
Ifmemberdoes not exist in the sorted set,nullis returned.
Ifkeydoes not exist,nullis returned. - See Also:
- valkey.io for more details.
-
zrank
public java.util.concurrent.CompletableFuture<java.lang.Long> zrank(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String member)Description copied from interface:SortedSetBaseCommandsReturns the rank ofmemberin the sorted set stored atkey, with scores ordered from low to high, starting from0.
To get the rank ofmemberwith its score, seeSortedSetBaseCommands.zrankWithScore(java.lang.String, java.lang.String).- Specified by:
zrankin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- The member whose rank is to be retrieved.- Returns:
- The rank of
memberin the sorted set.
Ifkeydoesn't exist, or ifmemberis not present in the set,nullwill be returned. - See Also:
- valkey.io for more details.
-
zrank
public java.util.concurrent.CompletableFuture<java.lang.Long> zrank(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString member)Description copied from interface:SortedSetBaseCommandsReturns the rank ofmemberin the sorted set stored atkey, with scores ordered from low to high, starting from0.
To get the rank ofmemberwith its score, seeSortedSetBaseCommands.zrankWithScore(java.lang.String, java.lang.String).- Specified by:
zrankin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- The member whose rank is to be retrieved.- Returns:
- The rank of
memberin the sorted set.
Ifkeydoesn't exist, or ifmemberis not present in the set,nullwill be returned. - See Also:
- valkey.io for more details.
-
zrankWithScore
public java.util.concurrent.CompletableFuture<java.lang.Object[]> zrankWithScore(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String member)Description copied from interface:SortedSetBaseCommandsReturns the rank ofmemberin the sorted set stored atkeywith its score, where scores are ordered from the lowest to highest, starting from0.- Specified by:
zrankWithScorein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- The member whose rank is to be retrieved.- Returns:
- An array containing the rank (as
Long) and score (asDouble) ofmemberin the sorted set.
Ifkeydoesn't exist, or ifmemberis not present in the set,nullwill be returned. - See Also:
- valkey.io for more details.
-
zrankWithScore
public java.util.concurrent.CompletableFuture<java.lang.Object[]> zrankWithScore(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString member)Description copied from interface:SortedSetBaseCommandsReturns the rank ofmemberin the sorted set stored atkeywith its score, where scores are ordered from the lowest to highest, starting from0.- Specified by:
zrankWithScorein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- The member whose rank is to be retrieved.- Returns:
- An array containing the rank (as
Long) and score (asDouble) ofmemberin the sorted set.
Ifkeydoesn't exist, or ifmemberis not present in the set,nullwill be returned. - See Also:
- valkey.io for more details.
-
zrevrank
public java.util.concurrent.CompletableFuture<java.lang.Long> zrevrank(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String member)Description copied from interface:SortedSetBaseCommandsReturns the rank ofmemberin the sorted set stored atkey, where scores are ordered from the highest to lowest, starting from0.
To get the rank ofmemberwith its score, seeSortedSetBaseCommands.zrevrankWithScore(java.lang.String, java.lang.String).- Specified by:
zrevrankin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- The member whose rank is to be retrieved.- Returns:
- The rank of
memberin the sorted set, where ranks are ordered from high to low based on scores.
Ifkeydoesn't exist, or ifmemberis not present in the set,nullwill be returned. - See Also:
- valkey.io for more details.
-
zrevrank
public java.util.concurrent.CompletableFuture<java.lang.Long> zrevrank(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString member)Description copied from interface:SortedSetBaseCommandsReturns the rank ofmemberin the sorted set stored atkey, where scores are ordered from the highest to lowest, starting from0.
To get the rank ofmemberwith its score, seeSortedSetBaseCommands.zrevrankWithScore(java.lang.String, java.lang.String).- Specified by:
zrevrankin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- The member whose rank is to be retrieved.- Returns:
- The rank of
memberin the sorted set, where ranks are ordered from high to low based on scores.
Ifkeydoesn't exist, or ifmemberis not present in the set,nullwill be returned. - See Also:
- valkey.io for more details.
-
zrevrankWithScore
public java.util.concurrent.CompletableFuture<java.lang.Object[]> zrevrankWithScore(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String member)Description copied from interface:SortedSetBaseCommandsReturns the rank ofmemberin the sorted set stored atkeywith its score, where scores are ordered from the highest to lowest, starting from0.- Specified by:
zrevrankWithScorein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- The member whose rank is to be retrieved.- Returns:
- An array containing the rank (as
Long) and score (asDouble) ofmemberin the sorted set, where ranks are ordered from high to low based on scores.
Ifkeydoesn't exist, or ifmemberis not present in the set,nullwill be returned. - See Also:
- valkey.io for more details.
-
zrevrankWithScore
public java.util.concurrent.CompletableFuture<java.lang.Object[]> zrevrankWithScore(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString member)Description copied from interface:SortedSetBaseCommandsReturns the rank ofmemberin the sorted set stored atkeywith its score, where scores are ordered from the highest to lowest, starting from0.- Specified by:
zrevrankWithScorein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.member- The member whose rank is to be retrieved.- Returns:
- An array containing the rank (as
Long) and score (asDouble) ofmemberin the sorted set, where ranks are ordered from high to low based on scores.
Ifkeydoesn't exist, or ifmemberis not present in the set,nullwill be returned. - See Also:
- valkey.io for more details.
-
zmscore
public java.util.concurrent.CompletableFuture<java.lang.Double[]> zmscore(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] members)Description copied from interface:SortedSetBaseCommandsReturns the scores associated with the specifiedmembersin the sorted set stored atkey.- Specified by:
zmscorein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.members- An array of members in the sorted set.- Returns:
- An
Arrayof scores of themembers.
If amemberdoes not exist, the corresponding value in theArraywill benull. - See Also:
- valkey.io for more details.
-
zmscore
public java.util.concurrent.CompletableFuture<java.lang.Double[]> zmscore(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] members)Description copied from interface:SortedSetBaseCommandsReturns the scores associated with the specifiedmembersin the sorted set stored atkey.- Specified by:
zmscorein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.members- An array of members in the sorted set.- Returns:
- An
Arrayof scores of themembers.
If amemberdoes not exist, the corresponding value in theArraywill benull. - See Also:
- valkey.io for more details.
-
zdiff
public java.util.concurrent.CompletableFuture<java.lang.String[]> zdiff(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:SortedSetBaseCommandsReturns the difference between the first sorted set and all the successive sorted sets.
To get the elements with their scores, seeSortedSetBaseCommands.zdiffWithScores(java.lang.String[]).- Specified by:
zdiffin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.- Returns:
- An
arrayof elements representing the difference between the sorted sets.
If the firstkeydoes not exist, it is treated as an empty sorted set, and the command returns an emptyarray. - See Also:
- valkey.io for more details.
-
zdiff
public java.util.concurrent.CompletableFuture<GlideString[]> zdiff(@NonNull @NonNull GlideString[] keys)
Description copied from interface:SortedSetBaseCommandsReturns the difference between the first sorted set and all the successive sorted sets.
To get the elements with their scores, seeSortedSetBaseCommands.zdiffWithScores(java.lang.String[]).- Specified by:
zdiffin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.- Returns:
- An
arrayof elements representing the difference between the sorted sets.
If the firstkeydoes not exist, it is treated as an empty sorted set, and the command returns an emptyarray. - See Also:
- valkey.io for more details.
-
zdiffWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>> zdiffWithScores(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:SortedSetBaseCommandsReturns the difference between the first sorted set and all the successive sorted sets.- Specified by:
zdiffWithScoresin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.- Returns:
- A
Mapof elements and their scores representing the difference between the sorted sets.
If the firstkeydoes not exist, it is treated as an empty sorted set, and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
zdiffWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>> zdiffWithScores(@NonNull @NonNull GlideString[] keys)
Description copied from interface:SortedSetBaseCommandsReturns the difference between the first sorted set and all the successive sorted sets.- Specified by:
zdiffWithScoresin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.- Returns:
- A
Mapof elements and their scores representing the difference between the sorted sets.
If the firstkeydoes not exist, it is treated as an empty sorted set, and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
zdiffstore
public java.util.concurrent.CompletableFuture<java.lang.Long> zdiffstore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String[] keys)Description copied from interface:SortedSetBaseCommandsCalculates the difference between the first sorted set and all the successive sorted sets atkeysand stores the difference as a sorted set todestination, overwriting it if it already exists. Non-existent keys are treated as empty sets.- Specified by:
zdiffstorein interfaceSortedSetBaseCommands- Parameters:
destination- The key for the resulting sorted set.keys- The keys of the sorted sets to compare.- Returns:
- The number of members in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
zdiffstore
public java.util.concurrent.CompletableFuture<java.lang.Long> zdiffstore(@NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString[] keys)Description copied from interface:SortedSetBaseCommandsCalculates the difference between the first sorted set and all the successive sorted sets atkeysand stores the difference as a sorted set todestination, overwriting it if it already exists. Non-existent keys are treated as empty sets.- Specified by:
zdiffstorein interfaceSortedSetBaseCommands- Parameters:
destination- The key for the resulting sorted set.keys- The keys of the sorted sets to compare.- Returns:
- The number of members in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
zcount
public java.util.concurrent.CompletableFuture<java.lang.Long> zcount(@NonNull @NonNull java.lang.String key, @NonNull @NonNull RangeOptions.ScoreRange minScore, @NonNull @NonNull RangeOptions.ScoreRange maxScore)Description copied from interface:SortedSetBaseCommandsReturns the number of members in the sorted set stored atkeywith scores betweenminScoreandmaxScore.- Specified by:
zcountin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.minScore- The minimum score to count from. Can be an implementation ofRangeOptions.InfScoreBoundrepresenting positive/negative infinity, orRangeOptions.ScoreBoundaryrepresenting a specific score and inclusivity.maxScore- The maximum score to count up to. Can be an implementation ofRangeOptions.InfScoreBoundrepresenting positive/negative infinity, orRangeOptions.ScoreBoundaryrepresenting a specific score and inclusivity.- Returns:
- The number of members in the specified score range.
Ifkeydoes not exist, it is treated as an empty sorted set, and the command returns0.
IfmaxScore < minScore,0is returned. - See Also:
- valkey.io for more details.
-
zcount
public java.util.concurrent.CompletableFuture<java.lang.Long> zcount(@NonNull @NonNull GlideString key, @NonNull @NonNull RangeOptions.ScoreRange minScore, @NonNull @NonNull RangeOptions.ScoreRange maxScore)Description copied from interface:SortedSetBaseCommandsReturns the number of members in the sorted set stored atkeywith scores betweenminScoreandmaxScore.- Specified by:
zcountin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.minScore- The minimum score to count from. Can be an implementation ofRangeOptions.InfScoreBoundrepresenting positive/negative infinity, orRangeOptions.ScoreBoundaryrepresenting a specific score and inclusivity.maxScore- The maximum score to count up to. Can be an implementation ofRangeOptions.InfScoreBoundrepresenting positive/negative infinity, orRangeOptions.ScoreBoundaryrepresenting a specific score and inclusivity.- Returns:
- The number of members in the specified score range.
Ifkeydoes not exist, it is treated as an empty sorted set, and the command returns0.
IfmaxScore < minScore,0is returned. - See Also:
- valkey.io for more details.
-
zremrangebyrank
public java.util.concurrent.CompletableFuture<java.lang.Long> zremrangebyrank(@NonNull @NonNull java.lang.String key, long start, long end)Description copied from interface:SortedSetBaseCommandsRemoves all elements in the sorted set stored atkeywith rank betweenstartandend. Bothstartandendare zero-based indexes with0being the element with the lowest score. These indexes can be negative numbers, where they indicate offsets starting at the element with the highest score.- Specified by:
zremrangebyrankin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.start- The starting point of the range.end- The end of the range.- Returns:
- The number of elements removed.
Ifstartexceeds the end of the sorted set, or ifstartis greater thanend,0returned.
Ifendexceeds the actual end of the sorted set, the range will stop at the actual end of the sorted set.
Ifkeydoes not exist0will be returned. - See Also:
- valkey.io for more details.
-
zremrangebyrank
public java.util.concurrent.CompletableFuture<java.lang.Long> zremrangebyrank(@NonNull @NonNull GlideString key, long start, long end)Description copied from interface:SortedSetBaseCommandsRemoves all elements in the sorted set stored atkeywith rank betweenstartandend. Bothstartandendare zero-based indexes with0being the element with the lowest score. These indexes can be negative numbers, where they indicate offsets starting at the element with the highest score.- Specified by:
zremrangebyrankin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.start- The starting point of the range.end- The end of the range.- Returns:
- The number of elements removed.
Ifstartexceeds the end of the sorted set, or ifstartis greater thanend,0returned.
Ifendexceeds the actual end of the sorted set, the range will stop at the actual end of the sorted set.
Ifkeydoes not exist0will be returned. - See Also:
- valkey.io for more details.
-
zremrangebylex
public java.util.concurrent.CompletableFuture<java.lang.Long> zremrangebylex(@NonNull @NonNull java.lang.String key, @NonNull @NonNull RangeOptions.LexRange minLex, @NonNull @NonNull RangeOptions.LexRange maxLex)Description copied from interface:SortedSetBaseCommandsRemoves all elements in the sorted set stored atkeywith a lexicographical order betweenminLexandmaxLex.- Specified by:
zremrangebylexin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.minLex- The minimum bound of the lexicographical range. Can be an implementation ofRangeOptions.InfLexBoundrepresenting positive/negative infinity, orRangeOptions.LexBoundaryrepresenting a specific lex and inclusivity.maxLex- The maximum bound of the lexicographical range. Can be an implementation ofRangeOptions.InfLexBoundrepresenting positive/negative infinity, orRangeOptions.LexBoundaryrepresenting a specific lex and inclusivity.- Returns:
- The number of members removed from the sorted set.
Ifkeydoes not exist, it is treated as an empty sorted set, and the command returns0.
IfminLexis greater thanmaxLex,0is returned. - See Also:
- valkey.io for more details.
-
zremrangebylex
public java.util.concurrent.CompletableFuture<java.lang.Long> zremrangebylex(@NonNull @NonNull GlideString key, @NonNull @NonNull RangeOptions.LexRange minLex, @NonNull @NonNull RangeOptions.LexRange maxLex)Description copied from interface:SortedSetBaseCommandsRemoves all elements in the sorted set stored atkeywith a lexicographical order betweenminLexandmaxLex.- Specified by:
zremrangebylexin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.minLex- The minimum bound of the lexicographical range. Can be an implementation ofRangeOptions.InfLexBoundrepresenting positive/negative infinity, orRangeOptions.LexBoundaryrepresenting a specific lex and inclusivity.maxLex- The maximum bound of the lexicographical range. Can be an implementation ofRangeOptions.InfLexBoundrepresenting positive/negative infinity, orRangeOptions.LexBoundaryrepresenting a specific lex and inclusivity.- Returns:
- The number of members removed from the sorted set.
Ifkeydoes not exist, it is treated as an empty sorted set, and the command returns0.
IfminLexis greater thanmaxLex,0is returned. - See Also:
- valkey.io for more details.
-
zremrangebyscore
public java.util.concurrent.CompletableFuture<java.lang.Long> zremrangebyscore(@NonNull @NonNull java.lang.String key, @NonNull @NonNull RangeOptions.ScoreRange minScore, @NonNull @NonNull RangeOptions.ScoreRange maxScore)Description copied from interface:SortedSetBaseCommandsRemoves all elements in the sorted set stored atkeywith a score betweenminScoreandmaxScore.- Specified by:
zremrangebyscorein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.minScore- The minimum score to remove from. Can be an implementation ofRangeOptions.InfScoreBoundrepresenting positive/negative infinity, orRangeOptions.ScoreBoundaryrepresenting a specific score and inclusivity.maxScore- The maximum score to remove to. Can be an implementation ofRangeOptions.InfScoreBoundrepresenting positive/negative infinity, orRangeOptions.ScoreBoundaryrepresenting a specific score and inclusivity.- Returns:
- The number of members removed.
Ifkeydoes not exist, it is treated as an empty sorted set, and the command returns0.
IfminScoreis greater thanmaxScore,0is returned. - See Also:
- valkey.io for more details.
-
zremrangebyscore
public java.util.concurrent.CompletableFuture<java.lang.Long> zremrangebyscore(@NonNull @NonNull GlideString key, @NonNull @NonNull RangeOptions.ScoreRange minScore, @NonNull @NonNull RangeOptions.ScoreRange maxScore)Description copied from interface:SortedSetBaseCommandsRemoves all elements in the sorted set stored atkeywith a score betweenminScoreandmaxScore.- Specified by:
zremrangebyscorein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.minScore- The minimum score to remove from. Can be an implementation ofRangeOptions.InfScoreBoundrepresenting positive/negative infinity, orRangeOptions.ScoreBoundaryrepresenting a specific score and inclusivity.maxScore- The maximum score to remove to. Can be an implementation ofRangeOptions.InfScoreBoundrepresenting positive/negative infinity, orRangeOptions.ScoreBoundaryrepresenting a specific score and inclusivity.- Returns:
- The number of members removed.
Ifkeydoes not exist, it is treated as an empty sorted set, and the command returns0.
IfminScoreis greater thanmaxScore,0is returned. - See Also:
- valkey.io for more details.
-
zlexcount
public java.util.concurrent.CompletableFuture<java.lang.Long> zlexcount(@NonNull @NonNull java.lang.String key, @NonNull @NonNull RangeOptions.LexRange minLex, @NonNull @NonNull RangeOptions.LexRange maxLex)Description copied from interface:SortedSetBaseCommandsReturns the number of members in the sorted set stored atkeywith scores betweenminLexandmaxLex.- Specified by:
zlexcountin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.minLex- The minimum lex to count from. Can be an implementation ofRangeOptions.InfLexBoundrepresenting positive/negative infinity, orRangeOptions.LexBoundaryrepresenting a specific lex and inclusivity.maxLex- The maximum lex to count up to. Can be an implementation ofRangeOptions.InfLexBoundrepresenting positive/negative infinity, orRangeOptions.LexBoundaryrepresenting a specific lex and inclusivity.- Returns:
- The number of members in the specified lex range.
Ifkeydoes not exist, it is treated as an empty sorted set, and the command returns0.
IfmaxLex < minLex,0is returned. - See Also:
- valkey.io for more details.
-
zlexcount
public java.util.concurrent.CompletableFuture<java.lang.Long> zlexcount(@NonNull @NonNull GlideString key, @NonNull @NonNull RangeOptions.LexRange minLex, @NonNull @NonNull RangeOptions.LexRange maxLex)Description copied from interface:SortedSetBaseCommandsReturns the number of members in the sorted set stored atkeywith scores betweenminLexandmaxLex.- Specified by:
zlexcountin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.minLex- The minimum lex to count from. Can be an implementation ofRangeOptions.InfLexBoundrepresenting positive/negative infinity, orRangeOptions.LexBoundaryrepresenting a specific lex and inclusivity.maxLex- The maximum lex to count up to. Can be an implementation ofRangeOptions.InfLexBoundrepresenting positive/negative infinity, orRangeOptions.LexBoundaryrepresenting a specific lex and inclusivity.- Returns:
- The number of members in the specified lex range.
Ifkeydoes not exist, it is treated as an empty sorted set, and the command returns0.
IfmaxLex < minLex,0is returned. - See Also:
- valkey.io for more details.
-
zrangestore
public java.util.concurrent.CompletableFuture<java.lang.Long> zrangestore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String source, @NonNull @NonNull RangeOptions.RangeQuery rangeQuery, boolean reverse)Description copied from interface:SortedSetBaseCommandsStores a specified range of elements from the sorted set atsource, into a new sorted set atdestination. Ifdestinationdoesn't exist, a new sorted set is created; if it exists, it's overwritten.- Specified by:
zrangestorein interfaceSortedSetBaseCommands- Parameters:
destination- The key for the destination sorted set.source- The key of the source sorted set.rangeQuery- The range query object representing the type of range query to perform.
- For range queries by index (rank), use
RangeOptions.RangeByIndex. - For range queries by lexicographical order, use
RangeOptions.RangeByLex. - For range queries by score, use
RangeOptions.RangeByScore.
- For range queries by index (rank), use
reverse- Iftrue, reverses the sorted set, with index0as the element with the highest score.- Returns:
- The number of elements in the resulting sorted set.
- See Also:
- valkey.io for more details.
-
zrangestore
public java.util.concurrent.CompletableFuture<java.lang.Long> zrangestore(@NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString source, @NonNull @NonNull RangeOptions.RangeQuery rangeQuery, boolean reverse)Description copied from interface:SortedSetBaseCommandsStores a specified range of elements from the sorted set atsource, into a new sorted set atdestination. Ifdestinationdoesn't exist, a new sorted set is created; if it exists, it's overwritten.- Specified by:
zrangestorein interfaceSortedSetBaseCommands- Parameters:
destination- The key for the destination sorted set.source- The key of the source sorted set.rangeQuery- The range query object representing the type of range query to perform.
- For range queries by index (rank), use
RangeOptions.RangeByIndex. - For range queries by lexicographical order, use
RangeOptions.RangeByLex. - For range queries by score, use
RangeOptions.RangeByScore.
- For range queries by index (rank), use
reverse- Iftrue, reverses the sorted set, with index0as the element with the highest score.- Returns:
- The number of elements in the resulting sorted set.
- See Also:
- valkey.io for more details.
-
zrangestore
public java.util.concurrent.CompletableFuture<java.lang.Long> zrangestore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String source, @NonNull @NonNull RangeOptions.RangeQuery rangeQuery)Description copied from interface:SortedSetBaseCommandsStores a specified range of elements from the sorted set atsource, into a new sorted set atdestination. Ifdestinationdoesn't exist, a new sorted set is created; if it exists, it's overwritten.- Specified by:
zrangestorein interfaceSortedSetBaseCommands- Parameters:
destination- The key for the destination sorted set.source- The key of the source sorted set.rangeQuery- The range query object representing the type of range query to perform.
- For range queries by index (rank), use
RangeOptions.RangeByIndex. - For range queries by lexicographical order, use
RangeOptions.RangeByLex. - For range queries by score, use
RangeOptions.RangeByScore.
- For range queries by index (rank), use
- Returns:
- The number of elements in the resulting sorted set.
- See Also:
- valkey.io for more details.
-
zrangestore
public java.util.concurrent.CompletableFuture<java.lang.Long> zrangestore(@NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString source, @NonNull @NonNull RangeOptions.RangeQuery rangeQuery)Description copied from interface:SortedSetBaseCommandsStores a specified range of elements from the sorted set atsource, into a new sorted set atdestination. Ifdestinationdoesn't exist, a new sorted set is created; if it exists, it's overwritten.- Specified by:
zrangestorein interfaceSortedSetBaseCommands- Parameters:
destination- The key for the destination sorted set.source- The key of the source sorted set.rangeQuery- The range query object representing the type of range query to perform.
- For range queries by index (rank), use
RangeOptions.RangeByIndex. - For range queries by lexicographical order, use
RangeOptions.RangeByLex. - For range queries by score, use
RangeOptions.RangeByScore.
- For range queries by index (rank), use
- Returns:
- The number of elements in the resulting sorted set.
- See Also:
- valkey.io for more details.
-
zunionstore
public java.util.concurrent.CompletableFuture<java.lang.Long> zunionstore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys, @NonNull @NonNull WeightAggregateOptions.Aggregate aggregate)Description copied from interface:SortedSetBaseCommandsComputes the union of sorted sets given by the specifiedKeysOrWeightedKeys, and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created.- Specified by:
zunionstorein interfaceSortedSetBaseCommands- Parameters:
destination- The key of the destination sorted set.keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayfor keys only. - Use
WeightAggregateOptions.WeightedKeysfor weighted keys with score multipliers.
- Use
aggregate- Specifies the aggregation strategy to apply when combining the scores of elements.- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
zunionstore
public java.util.concurrent.CompletableFuture<java.lang.Long> zunionstore(@NonNull @NonNull GlideString destination, @NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys, @NonNull @NonNull WeightAggregateOptions.Aggregate aggregate)Description copied from interface:SortedSetBaseCommandsComputes the union of sorted sets given by the specifiedKeysOrWeightedKeys, and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created.- Specified by:
zunionstorein interfaceSortedSetBaseCommands- Parameters:
destination- The key of the destination sorted set.keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayBinaryfor keys only. - Use
WeightedKeysBinaryfor weighted keys with score multipliers.
- Use
aggregate- Specifies the aggregation strategy to apply when combining the scores of elements.- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
zunionstore
public java.util.concurrent.CompletableFuture<java.lang.Long> zunionstore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys)Description copied from interface:SortedSetBaseCommandsComputes the union of sorted sets given by the specifiedKeysOrWeightedKeys, and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created.- Specified by:
zunionstorein interfaceSortedSetBaseCommands- Parameters:
destination- The key of the destination sorted set.keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayfor keys only. - Use
WeightAggregateOptions.WeightedKeysfor weighted keys with score multipliers.
- Use
- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
zunionstore
public java.util.concurrent.CompletableFuture<java.lang.Long> zunionstore(@NonNull @NonNull GlideString destination, @NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys)Description copied from interface:SortedSetBaseCommandsComputes the union of sorted sets given by the specifiedKeysOrWeightedKeys, and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created.- Specified by:
zunionstorein interfaceSortedSetBaseCommands- Parameters:
destination- The key of the destination sorted set.keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayBinaryfor keys only. - Use
WeightedKeysBinaryfor weighted keys with score multipliers.
- Use
- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
zinterstore
public java.util.concurrent.CompletableFuture<java.lang.Long> zinterstore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys, @NonNull @NonNull WeightAggregateOptions.Aggregate aggregate)Description copied from interface:SortedSetBaseCommandsComputes the intersection of sorted sets given by the specifiedkeysOrWeightedKeys, and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created.- Specified by:
zinterstorein interfaceSortedSetBaseCommands- Parameters:
destination- The key of the destination sorted set.keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayfor keys only. - Use
WeightAggregateOptions.WeightedKeysfor weighted keys with score multipliers.
- Use
aggregate- Specifies the aggregation strategy to apply when combining the scores of elements.- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
zinterstore
public java.util.concurrent.CompletableFuture<java.lang.Long> zinterstore(@NonNull @NonNull GlideString destination, @NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys, @NonNull @NonNull WeightAggregateOptions.Aggregate aggregate)Description copied from interface:SortedSetBaseCommandsComputes the intersection of sorted sets given by the specifiedkeysOrWeightedKeys, and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created.- Specified by:
zinterstorein interfaceSortedSetBaseCommands- Parameters:
destination- The key of the destination sorted set.keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayBinaryfor keys only. - Use
WeightedKeysBinaryfor weighted keys with score multipliers.
- Use
aggregate- Specifies the aggregation strategy to apply when combining the scores of elements.- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
zinterstore
public java.util.concurrent.CompletableFuture<java.lang.Long> zinterstore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys)Description copied from interface:SortedSetBaseCommandsComputes the intersection of sorted sets given by the specifiedkeysOrWeightedKeys, and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created.- Specified by:
zinterstorein interfaceSortedSetBaseCommands- Parameters:
destination- The key of the destination sorted set.keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayfor keys only. - Use
WeightAggregateOptions.WeightedKeysfor weighted keys with score multipliers.
- Use
- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
zinterstore
public java.util.concurrent.CompletableFuture<java.lang.Long> zinterstore(@NonNull @NonNull GlideString destination, @NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys)Description copied from interface:SortedSetBaseCommandsComputes the intersection of sorted sets given by the specifiedkeysOrWeightedKeys, and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created.- Specified by:
zinterstorein interfaceSortedSetBaseCommands- Parameters:
destination- The key of the destination sorted set.keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayfor keys only. - Use
WeightAggregateOptions.WeightedKeysfor weighted keys with score multipliers.
- Use
- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
zunion
public java.util.concurrent.CompletableFuture<java.lang.String[]> zunion(@NonNull @NonNull WeightAggregateOptions.KeyArray keys)Description copied from interface:SortedSetBaseCommandsReturns the union of members from sorted sets specified by the givenkeys.
To get the elements with their scores, seeSortedSetBaseCommands.zunionWithScores(glide.api.models.commands.WeightAggregateOptions.KeysOrWeightedKeys, glide.api.models.commands.WeightAggregateOptions.Aggregate).- Specified by:
zunionin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.- Returns:
- The resulting sorted set from the union.
- See Also:
- valkey.io for more details.
-
zunion
public java.util.concurrent.CompletableFuture<GlideString[]> zunion(@NonNull @NonNull WeightAggregateOptions.KeyArrayBinary keys)
Description copied from interface:SortedSetBaseCommandsReturns the union of members from sorted sets specified by the givenkeys.
To get the elements with their scores, seeSortedSetBaseCommands.zunionWithScores(glide.api.models.commands.WeightAggregateOptions.KeysOrWeightedKeys, glide.api.models.commands.WeightAggregateOptions.Aggregate).- Specified by:
zunionin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.- Returns:
- The resulting sorted set from the union.
- See Also:
- valkey.io for more details.
-
zunionWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>> zunionWithScores(@NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys, @NonNull @NonNull WeightAggregateOptions.Aggregate aggregate)Description copied from interface:SortedSetBaseCommandsReturns the union of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.- Specified by:
zunionWithScoresin interfaceSortedSetBaseCommands- Parameters:
keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayfor keys only. - Use
WeightAggregateOptions.WeightedKeysfor weighted keys with score multipliers.
- Use
aggregate- Specifies the aggregation strategy to apply when combining the scores of elements.- Returns:
- The resulting sorted set from the union.
- See Also:
- valkey.io for more details.
-
zunionWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>> zunionWithScores(@NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys, @NonNull @NonNull WeightAggregateOptions.Aggregate aggregate)
Description copied from interface:SortedSetBaseCommandsReturns the union of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.- Specified by:
zunionWithScoresin interfaceSortedSetBaseCommands- Parameters:
keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayBinaryfor keys only. - Use
WeightedKeysBinaryfor weighted keys with score multipliers.
- Use
aggregate- Specifies the aggregation strategy to apply when combining the scores of elements.- Returns:
- The resulting sorted set from the union.
- See Also:
- valkey.io for more details.
-
zunionWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>> zunionWithScores(@NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys)Description copied from interface:SortedSetBaseCommandsReturns the union of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.
To perform azunionoperation while specifying aggregation settings, useSortedSetBaseCommands.zunionWithScores(KeysOrWeightedKeys, Aggregate).- Specified by:
zunionWithScoresin interfaceSortedSetBaseCommands- Parameters:
keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayfor keys only. - Use
WeightAggregateOptions.WeightedKeysfor weighted keys with score multipliers.
- Use
- Returns:
- The resulting sorted set from the union.
- See Also:
- valkey.io for more details.
-
zunionWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>> zunionWithScores(@NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys)
Description copied from interface:SortedSetBaseCommandsReturns the union of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.
To perform azunionoperation while specifying aggregation settings, useSortedSetBaseCommands.zunionWithScores(KeysOrWeightedKeys, Aggregate).- Specified by:
zunionWithScoresin interfaceSortedSetBaseCommands- Parameters:
keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayfor keys only. - Use
WeightAggregateOptions.WeightedKeysfor weighted keys with score multipliers.
- Use
- Returns:
- The resulting sorted set from the union.
- See Also:
- valkey.io for more details.
-
zinter
public java.util.concurrent.CompletableFuture<java.lang.String[]> zinter(@NonNull @NonNull WeightAggregateOptions.KeyArray keys)Description copied from interface:SortedSetBaseCommandsReturns the intersection of members from sorted sets specified by the givenkeys.
To get the elements with their scores, seeSortedSetBaseCommands.zinterWithScores(glide.api.models.commands.WeightAggregateOptions.KeysOrWeightedKeys).- Specified by:
zinterin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.- Returns:
- The resulting sorted set from the intersection.
- See Also:
- valkey.io for more details.
-
zinter
public java.util.concurrent.CompletableFuture<GlideString[]> zinter(@NonNull @NonNull WeightAggregateOptions.KeyArrayBinary keys)
Description copied from interface:SortedSetBaseCommandsReturns the intersection of members from sorted sets specified by the givenkeys.
To get the elements with their scores, seeSortedSetBaseCommands.zinterWithScores(glide.api.models.commands.WeightAggregateOptions.KeysOrWeightedKeys).- Specified by:
zinterin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.- Returns:
- The resulting sorted set from the intersection.
- See Also:
- valkey.io for more details.
-
zinterWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>> zinterWithScores(@NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys, @NonNull @NonNull WeightAggregateOptions.Aggregate aggregate)Description copied from interface:SortedSetBaseCommandsReturns the intersection of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.- Specified by:
zinterWithScoresin interfaceSortedSetBaseCommands- Parameters:
keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayfor keys only. - Use
WeightAggregateOptions.WeightedKeysfor weighted keys with score multipliers.
- Use
aggregate- Specifies the aggregation strategy to apply when combining the scores of elements.- Returns:
- The resulting sorted set from the intersection.
- See Also:
- valkey.io for more details.
-
zinterWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>> zinterWithScores(@NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys, @NonNull @NonNull WeightAggregateOptions.Aggregate aggregate)
Description copied from interface:SortedSetBaseCommandsReturns the intersection of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys.- Specified by:
zinterWithScoresin interfaceSortedSetBaseCommands- Parameters:
keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayBinaryfor keys only. - Use
WeightedKeysBinaryfor weighted keys with score multipliers.
- Use
aggregate- Specifies the aggregation strategy to apply when combining the scores of elements.- Returns:
- The resulting sorted set from the intersection.
- See Also:
- valkey.io for more details.
-
zinterWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>> zinterWithScores(@NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeys keysOrWeightedKeys)Description copied from interface:SortedSetBaseCommandsReturns the intersection of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys. To perform azinteroperation while specifying aggregation settings, useSortedSetBaseCommands.zinterWithScores(KeysOrWeightedKeys, Aggregate).- Specified by:
zinterWithScoresin interfaceSortedSetBaseCommands- Parameters:
keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayfor keys only. - Use
WeightAggregateOptions.WeightedKeysfor weighted keys with score multipliers.
- Use
- Returns:
- The resulting sorted set from the intersection.
- See Also:
- valkey.io for more details.
-
zinterWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>> zinterWithScores(@NonNull @NonNull WeightAggregateOptions.KeysOrWeightedKeysBinary keysOrWeightedKeys)
Description copied from interface:SortedSetBaseCommandsReturns the intersection of members and their scores from sorted sets specified by the givenkeysOrWeightedKeys. To perform azinteroperation while specifying aggregation settings, useSortedSetBaseCommands.zinterWithScores(KeysOrWeightedKeys, Aggregate).- Specified by:
zinterWithScoresin interfaceSortedSetBaseCommands- Parameters:
keysOrWeightedKeys- The keys of the sorted sets with possible formats:- Use
WeightAggregateOptions.KeyArrayfor keys only. - Use
WeightAggregateOptions.WeightedKeysfor weighted keys with score multipliers.
- Use
- Returns:
- The resulting sorted set from the intersection.
- See Also:
- valkey.io for more details.
-
zrandmember
public java.util.concurrent.CompletableFuture<java.lang.String> zrandmember(@NonNull @NonNull java.lang.String key)Description copied from interface:SortedSetBaseCommandsReturns a random element from the sorted set stored atkey.- Specified by:
zrandmemberin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.- Returns:
- A
Stringrepresenting a random element from the sorted set.
If the sorted set does not exist or is empty, the response will benull. - See Also:
- valkey.io for more details.
-
zrandmember
public java.util.concurrent.CompletableFuture<GlideString> zrandmember(@NonNull @NonNull GlideString key)
Description copied from interface:SortedSetBaseCommandsReturns a random element from the sorted set stored atkey.- Specified by:
zrandmemberin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.- Returns:
- A
Stringrepresenting a random element from the sorted set.
If the sorted set does not exist or is empty, the response will benull. - See Also:
- valkey.io for more details.
-
zrandmemberWithCount
public java.util.concurrent.CompletableFuture<java.lang.String[]> zrandmemberWithCount(@NonNull @NonNull java.lang.String key, long count)Description copied from interface:SortedSetBaseCommandsReturns a random element from the sorted set stored atkey.- Specified by:
zrandmemberWithCountin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.count- The number of elements to return.
Ifcountis positive, returns unique elements.
If negative, allows for duplicates.- Returns:
- An
arrayof elements from the sorted set.
If the sorted set does not exist or is empty, the response will be an emptyarray. - See Also:
- valkey.io for more details.
-
zrandmemberWithCount
public java.util.concurrent.CompletableFuture<GlideString[]> zrandmemberWithCount(@NonNull @NonNull GlideString key, long count)
Description copied from interface:SortedSetBaseCommandsRetrieves random elements from the sorted set stored atkey.- Specified by:
zrandmemberWithCountin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.count- The number of elements to return.
Ifcountis positive, returns unique elements.
If negative, allows for duplicates.- Returns:
- An
arrayof elements from the sorted set.
If the sorted set does not exist or is empty, the response will be an emptyarray. - See Also:
- valkey.io for more details.
-
zrandmemberWithCountWithScores
public java.util.concurrent.CompletableFuture<java.lang.Object[][]> zrandmemberWithCountWithScores(@NonNull @NonNull java.lang.String key, long count)Description copied from interface:SortedSetBaseCommandsRetrieves random elements along with their scores from the sorted set stored atkey.- Specified by:
zrandmemberWithCountWithScoresin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.count- The number of elements to return.
Ifcountis positive, returns unique elements.
If negative, allows duplicates.- Returns:
- An
arrayof[element, score]arrays, where element is aStringand score is aDouble.
If the sorted set does not exist or is empty, the response will be an emptyarray. - See Also:
- valkey.io for more details.
-
zrandmemberWithCountWithScores
public java.util.concurrent.CompletableFuture<java.lang.Object[][]> zrandmemberWithCountWithScores(@NonNull @NonNull GlideString key, long count)Description copied from interface:SortedSetBaseCommandsRetrieves random elements along with their scores from the sorted set stored atkey.- Specified by:
zrandmemberWithCountWithScoresin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.count- The number of elements to return.
Ifcountis positive, returns unique elements.
If negative, allows duplicates.- Returns:
- An
arrayof[element, score]arrays, where element is aStringand score is aDouble.
If the sorted set does not exist or is empty, the response will be an emptyarray. - See Also:
- valkey.io for more details.
-
zincrby
public java.util.concurrent.CompletableFuture<java.lang.Double> zincrby(@NonNull @NonNull java.lang.String key, double increment, @NonNull @NonNull java.lang.String member)Description copied from interface:SortedSetBaseCommandsIncrements the score ofmemberin the sorted set stored atkeybyincrement.
Ifmemberdoes not exist in the sorted set, it is added withincrementas its score. Ifkeydoes not exist, a new sorted set with the specified member as its sole member is created.- Specified by:
zincrbyin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.increment- The score increment.member- A member of the sorted set.- Returns:
- The new score of
member. - See Also:
- valkey.io for more details.
-
zincrby
public java.util.concurrent.CompletableFuture<java.lang.Double> zincrby(@NonNull @NonNull GlideString key, double increment, @NonNull @NonNull GlideString member)Description copied from interface:SortedSetBaseCommandsIncrements the score ofmemberin the sorted set stored atkeybyincrement.
Ifmemberdoes not exist in the sorted set, it is added withincrementas its score. Ifkeydoes not exist, a new sorted set with the specified member as its sole member is created.- Specified by:
zincrbyin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.increment- The score increment.member- A member of the sorted set.- Returns:
- The new score of
member. - See Also:
- valkey.io for more details.
-
zintercard
public java.util.concurrent.CompletableFuture<java.lang.Long> zintercard(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:SortedSetBaseCommandsReturns the cardinality of the intersection of the sorted sets specified bykeys.- Specified by:
zintercardin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets to intersect.- Returns:
- The cardinality of the intersection of the given sorted sets.
- See Also:
- valkey.io for more details.
-
zintercard
public java.util.concurrent.CompletableFuture<java.lang.Long> zintercard(@NonNull @NonNull GlideString[] keys)Description copied from interface:SortedSetBaseCommandsReturns the cardinality of the intersection of the sorted sets specified bykeys.- Specified by:
zintercardin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets to intersect.- Returns:
- The cardinality of the intersection of the given sorted sets.
- See Also:
- valkey.io for more details.
-
zintercard
public java.util.concurrent.CompletableFuture<java.lang.Long> zintercard(@NonNull @NonNull java.lang.String[] keys, long limit)Description copied from interface:SortedSetBaseCommandsReturns the cardinality of the intersection of the sorted sets specified bykeys. If the intersection cardinality reacheslimitpartway through the computation, the algorithm will exit early and yieldlimitas the cardinality.- Specified by:
zintercardin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets to intersect.limit- Specifies a maximum number for the intersection cardinality. If limit is set to0the range will be unlimited.- Returns:
- The cardinality of the intersection of the given sorted sets, or the
limitif reached. - See Also:
- valkey.io for more details.
-
zintercard
public java.util.concurrent.CompletableFuture<java.lang.Long> zintercard(@NonNull @NonNull GlideString[] keys, long limit)Description copied from interface:SortedSetBaseCommandsReturns the cardinality of the intersection of the sorted sets specified bykeys. If the intersection cardinality reacheslimitpartway through the computation, the algorithm will exit early and yieldlimitas the cardinality.- Specified by:
zintercardin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets to intersect.limit- Specifies a maximum number for the intersection cardinality. If limit is set to0the range will be unlimited.- Returns:
- The cardinality of the intersection of the given sorted sets, or the
limitif reached. - See Also:
- valkey.io for more details.
-
xadd
public java.util.concurrent.CompletableFuture<java.lang.String> xadd(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.util.Map<java.lang.String,java.lang.String> values)Description copied from interface:StreamBaseCommandsAdds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created. To add entries with duplicate keys, useStreamBaseCommands.xadd(String, String[][]).- Specified by:
xaddin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.values- Field-value pairs to be added to the entry.- Returns:
- The id of the added entry.
- See Also:
- valkey.io for details.
-
xadd
public java.util.concurrent.CompletableFuture<java.lang.String> xadd(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[][] values)Description copied from interface:StreamBaseCommandsAdds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created. This method overload allows entries with duplicate keys to be added.- Specified by:
xaddin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.values- Field-value pairs to be added to the entry.- Returns:
- The id of the added entry.
- See Also:
- valkey.io for details.
-
xadd
public java.util.concurrent.CompletableFuture<GlideString> xadd(@NonNull @NonNull GlideString key, @NonNull @NonNull java.util.Map<GlideString,GlideString> values)
Description copied from interface:StreamBaseCommandsAdds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created. To add entries with duplicate keys, useStreamBaseCommands.xadd(GlideString, GlideString[][]).- Specified by:
xaddin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.values- Field-value pairs to be added to the entry.- Returns:
- The id of the added entry.
- See Also:
- valkey.io for details.
-
xadd
public java.util.concurrent.CompletableFuture<GlideString> xadd(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[][] values)
Description copied from interface:StreamBaseCommandsAdds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created. This method overload allows entries with duplicate keys to be added.- Specified by:
xaddin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.values- Field-value pairs to be added to the entry.- Returns:
- The id of the added entry.
- See Also:
- valkey.io for details.
-
xadd
public java.util.concurrent.CompletableFuture<java.lang.String> xadd(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.util.Map<java.lang.String,java.lang.String> values, @NonNull @NonNull StreamAddOptions options)Description copied from interface:StreamBaseCommandsAdds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created. To add entries with duplicate keys, useStreamBaseCommands.xadd(String, String[][], StreamAddOptions).- Specified by:
xaddin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.values- Field-value pairs to be added to the entry.options- Stream add optionsStreamAddOptions.- Returns:
- The id of the added entry, or
nullifStreamAddOptions.StreamAddOptionsBuilder.makeStream(Boolean)is set tofalseand no stream with the matchingkeyexists. - See Also:
- valkey.io for details.
-
xadd
public java.util.concurrent.CompletableFuture<java.lang.String> xadd(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[][] values, @NonNull @NonNull StreamAddOptions options)Description copied from interface:StreamBaseCommandsAdds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created. This method overload allows entries with duplicate keys to be added.- Specified by:
xaddin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.values- Field-value pairs to be added to the entry.options- Stream add optionsStreamAddOptions.- Returns:
- The id of the added entry, or
nullifStreamAddOptions.StreamAddOptionsBuilder.makeStream(Boolean)is set tofalseand no stream with the matchingkeyexists. - See Also:
- valkey.io for details.
-
xadd
public java.util.concurrent.CompletableFuture<GlideString> xadd(@NonNull @NonNull GlideString key, @NonNull @NonNull java.util.Map<GlideString,GlideString> values, @NonNull @NonNull StreamAddOptionsBinary options)
Description copied from interface:StreamBaseCommandsAdds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created. To add entries with duplicate keys, useStreamBaseCommands.xadd(GlideString, GlideString[][], StreamAddOptionsBinary).- Specified by:
xaddin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.values- Field-value pairs to be added to the entry.options- Stream add optionsStreamAddOptions.- Returns:
- The id of the added entry, or
nullifStreamAddOptionsBinary.StreamAddOptionsBinaryBuilder.makeStream(Boolean)is set tofalseand no stream with the matchingkeyexists. - See Also:
- valkey.io for details.
-
xadd
public java.util.concurrent.CompletableFuture<GlideString> xadd(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[][] values, @NonNull @NonNull StreamAddOptionsBinary options)
Description copied from interface:StreamBaseCommandsAdds an entry to the specified stream stored atkey.
If thekeydoesn't exist, the stream is created. This method overload allows entries with duplicate keys to be added.- Specified by:
xaddin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.values- Field-value pairs to be added to the entry.options- Stream add optionsStreamAddOptions.- Returns:
- The id of the added entry, or
nullifStreamAddOptionsBinary.StreamAddOptionsBinaryBuilder.makeStream(Boolean)is set tofalseand no stream with the matchingkeyexists. - See Also:
- valkey.io for details.
-
xread
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String[][]>>> xread(@NonNull @NonNull java.util.Map<java.lang.String,java.lang.String> keysAndIds)Description copied from interface:StreamBaseCommandsReads entries from the given streams.- Specified by:
xreadin interfaceStreamBaseCommands- Parameters:
keysAndIds- AMapof keys and entry IDs to read from.- Returns:
- A
Map<String, Map<String, String[][]>>with stream keys, toMapof stream entry IDs, to an array of pairings with format[[field, entry], [field, entry], ...]. - See Also:
- valkey.io for details.
-
xreadBinary
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.util.Map<GlideString,GlideString[][]>>> xreadBinary(@NonNull @NonNull java.util.Map<GlideString,GlideString> keysAndIds)
Description copied from interface:StreamBaseCommandsReads entries from the given streams.- Specified by:
xreadBinaryin interfaceStreamBaseCommands- Parameters:
keysAndIds- AMapof keys and entry IDs to read from.- Returns:
- A
Map<String, Map<String, String[][]>>with stream keys, toMapof stream entry IDs, to an array of pairings with format[[field, entry], [field, entry], ...]. - See Also:
- valkey.io for details.
-
xread
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String[][]>>> xread(@NonNull @NonNull java.util.Map<java.lang.String,java.lang.String> keysAndIds, @NonNull @NonNull StreamReadOptions options)Description copied from interface:StreamBaseCommandsReads entries from the given streams.- Specified by:
xreadin interfaceStreamBaseCommands- Parameters:
keysAndIds- AMapof keys and entry IDs to read from.options- Options detailing how to read the streamStreamReadOptions.- Returns:
- A
Map<String, Map<String, String[][]>>with stream keys, toMapof stream entry IDs, to an array of pairings with format[[field, entry], [field, entry], ...]. Returnsnullif all key-ID pairs inkeys_and_idshave either a non-existing key or a non-existing ID, or there are no entries after the given ID, or a timeout is hit in the block option. - See Also:
- valkey.io for details.
-
xreadBinary
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.util.Map<GlideString,GlideString[][]>>> xreadBinary(@NonNull @NonNull java.util.Map<GlideString,GlideString> keysAndIds, @NonNull @NonNull StreamReadOptions options)
Description copied from interface:StreamBaseCommandsReads entries from the given streams.- Specified by:
xreadBinaryin interfaceStreamBaseCommands- Parameters:
keysAndIds- AMapof keys and entry IDs to read from.options- Options detailing how to read the streamStreamReadOptions.- Returns:
- A
Map<GlideString, Map<GlideString, GlideString[][]>>with stream keys, toMapof stream entry IDs, to an array of pairings with format[[field, entry], [field, entry], ...]. - See Also:
- valkey.io for details.
-
xtrim
public java.util.concurrent.CompletableFuture<java.lang.Long> xtrim(@NonNull @NonNull java.lang.String key, @NonNull @NonNull StreamTrimOptions options)Description copied from interface:StreamBaseCommandsTrims the stream by evicting older entries.- Specified by:
xtrimin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.options- Stream trim optionsStreamTrimOptions.- Returns:
- The number of entries deleted from the stream.
- See Also:
- valkey.io for details.
-
xtrim
public java.util.concurrent.CompletableFuture<java.lang.Long> xtrim(@NonNull @NonNull GlideString key, @NonNull @NonNull StreamTrimOptions options)Description copied from interface:StreamBaseCommandsTrims the stream by evicting older entries.- Specified by:
xtrimin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.options- Stream trim optionsStreamTrimOptions.- Returns:
- The number of entries deleted from the stream.
- See Also:
- valkey.io for details.
-
xlen
public java.util.concurrent.CompletableFuture<java.lang.Long> xlen(@NonNull @NonNull java.lang.String key)Description copied from interface:StreamBaseCommandsReturns the number of entries in the stream stored atkey.- Specified by:
xlenin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.- Returns:
- The number of entries in the stream. If
keydoes not exist, return0. - See Also:
- valkey.io for details.
-
xlen
public java.util.concurrent.CompletableFuture<java.lang.Long> xlen(@NonNull @NonNull GlideString key)Description copied from interface:StreamBaseCommandsReturns the number of entries in the stream stored atkey.- Specified by:
xlenin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.- Returns:
- The number of entries in the stream. If
keydoes not exist, return0. - See Also:
- valkey.io for details.
-
xdel
public java.util.concurrent.CompletableFuture<java.lang.Long> xdel(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] ids)Description copied from interface:StreamBaseCommandsRemoves the specified entries by id from a stream, and returns the number of entries deleted.- Specified by:
xdelin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.ids- An array of entry ids.- Returns:
- The number of entries removed from the stream. This number may be less than the number
of entries in
ids, if the specifiedidsdon't exist in the stream. - See Also:
- valkey.io for details.
-
xdel
public java.util.concurrent.CompletableFuture<java.lang.Long> xdel(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] ids)Description copied from interface:StreamBaseCommandsRemoves the specified entries by id from a stream, and returns the number of entries deleted.- Specified by:
xdelin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.ids- An array of entry ids.- Returns:
- The number of entries removed from the stream. This number may be less than the number
of entries in
ids, if the specifiedidsdon't exist in the stream. - See Also:
- valkey.io for details.
-
xrange
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[][]>> xrange(@NonNull @NonNull java.lang.String key, @NonNull @NonNull StreamRange start, @NonNull @NonNull StreamRange end)Description copied from interface:StreamBaseCommandsReturns stream entries matching a given range of IDs.- Specified by:
xrangein interfaceStreamBaseCommands- Parameters:
key- The key of the stream.start- Starting stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MINto start with the minimum available ID.
- Use
end- Ending stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MAXto end with the maximum available ID.
- Use
- Returns:
- A
Mapof key to stream entry data, where entry data is an array of pairings with format[[field, entry], [field, entry], ...]. - See Also:
- valkey.io for details.
-
xrange
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[][]>> xrange(@NonNull @NonNull GlideString key, @NonNull @NonNull StreamRange start, @NonNull @NonNull StreamRange end)
Description copied from interface:StreamBaseCommandsReturns stream entries matching a given range of IDs.- Specified by:
xrangein interfaceStreamBaseCommands- Parameters:
key- The key of the stream.start- Starting stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MINto start with the minimum available ID.
- Use
end- Ending stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MAXto end with the maximum available ID.
- Use
- Returns:
- A
Mapof key to stream entry data, where entry data is an array of pairings with format[[field, entry], [field, entry], ...]. - See Also:
- valkey.io for details.
-
xrange
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[][]>> xrange(@NonNull @NonNull java.lang.String key, @NonNull @NonNull StreamRange start, @NonNull @NonNull StreamRange end, long count)Description copied from interface:StreamBaseCommandsReturns stream entries matching a given range of IDs.- Specified by:
xrangein interfaceStreamBaseCommands- Parameters:
key- The key of the stream.start- Starting stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MINto start with the minimum available ID.
- Use
end- Ending stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MAXto end with the maximum available ID.
- Use
count- Maximum count of stream entries to return.- Returns:
- A
Mapof key to stream entry data, where entry data is an array of pairings with format[[field, entry], [field, entry], ...]. Returns ornullifcountis non-positive. - See Also:
- valkey.io for details.
-
xrange
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[][]>> xrange(@NonNull @NonNull GlideString key, @NonNull @NonNull StreamRange start, @NonNull @NonNull StreamRange end, long count)
Description copied from interface:StreamBaseCommandsReturns stream entries matching a given range of IDs.- Specified by:
xrangein interfaceStreamBaseCommands- Parameters:
key- The key of the stream.start- Starting stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MINto start with the minimum available ID.
- Use
end- Ending stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MAXto end with the maximum available ID.
- Use
count- Maximum count of stream entries to return.- Returns:
- A
Mapof key to stream entry data, where entry data is an array of pairings with format[[field, entry], [field, entry], ...]. Returns ornullifcountis non-positive. - See Also:
- valkey.io for details.
-
xrevrange
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[][]>> xrevrange(@NonNull @NonNull java.lang.String key, @NonNull @NonNull StreamRange end, @NonNull @NonNull StreamRange start)Description copied from interface:StreamBaseCommandsReturns stream entries matching a given range of IDs in reverse order.
Equivalent toStreamBaseCommands.xrange(String, StreamRange, StreamRange)but returns the entries in reverse order.- Specified by:
xrevrangein interfaceStreamBaseCommands- Parameters:
key- The key of the stream.end- Ending stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MAXto end with the maximum available ID.
- Use
start- Starting stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MINto start with the minimum available ID.
- Use
- Returns:
- A
Mapof key to stream entry data, where entry data is an array of pairings with format[[field, entry], [field, entry], ...]. - See Also:
- valkey.io for details.
-
xrevrange
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[][]>> xrevrange(@NonNull @NonNull GlideString key, @NonNull @NonNull StreamRange end, @NonNull @NonNull StreamRange start)
Description copied from interface:StreamBaseCommandsReturns stream entries matching a given range of IDs in reverse order.
Equivalent toStreamBaseCommands.xrange(GlideString, StreamRange, StreamRange)but returns the entries in reverse order.- Specified by:
xrevrangein interfaceStreamBaseCommands- Parameters:
key- The key of the stream.end- Ending stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MAXto end with the maximum available ID.
- Use
start- Starting stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MINto start with the minimum available ID.
- Use
- Returns:
- A
Mapof key to stream entry data, where entry data is an array of pairings with format[[field, entry], [field, entry], ...]. - See Also:
- valkey.io for details.
-
xrevrange
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[][]>> xrevrange(@NonNull @NonNull java.lang.String key, @NonNull @NonNull StreamRange end, @NonNull @NonNull StreamRange start, long count)Description copied from interface:StreamBaseCommandsReturns stream entries matching a given range of IDs in reverse order.
Equivalent toStreamBaseCommands.xrange(String, StreamRange, StreamRange, long)but returns the entries in reverse order.- Specified by:
xrevrangein interfaceStreamBaseCommands- Parameters:
key- The key of the stream.end- Ending stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MAXto end with the maximum available ID.
- Use
start- Starting stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MINto start with the minimum available ID.
- Use
count- Maximum count of stream entries to return.- Returns:
- A
Mapof key to stream entry data, where entry data is an array of pairings with format[[field, entry], [field, entry], ...]. Returns ornullifcountis non-positive. - See Also:
- valkey.io for details.
-
xrevrange
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[][]>> xrevrange(@NonNull @NonNull GlideString key, @NonNull @NonNull StreamRange end, @NonNull @NonNull StreamRange start, long count)
Description copied from interface:StreamBaseCommandsReturns stream entries matching a given range of IDs in reverse order.
Equivalent toStreamBaseCommands.xrange(GlideString, StreamRange, StreamRange, long)but returns the entries in reverse order.- Specified by:
xrevrangein interfaceStreamBaseCommands- Parameters:
key- The key of the stream.end- Ending stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MAXto end with the maximum available ID.
- Use
start- Starting stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Since Valkey 6.2.0, use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MINto start with the minimum available ID.
- Use
count- Maximum count of stream entries to return.- Returns:
- A
Mapof key to stream entry data, where entry data is an array of pairings with format[[field, entry], [field, entry], ...]. Returns ornullifcountis non-positive. - See Also:
- valkey.io for details.
-
xgroupCreate
public java.util.concurrent.CompletableFuture<java.lang.String> xgroupCreate(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String groupName, @NonNull @NonNull java.lang.String id)Description copied from interface:StreamBaseCommandsCreates a new consumer group uniquely identified bygroupnamefor the stream stored atkey.- Specified by:
xgroupCreatein interfaceStreamBaseCommands- Parameters:
key- The key of the stream.groupName- The newly created consumer group name.id- Stream entry ID that specifies the last delivered entry in the stream from the new group's perspective. The special ID"$"can be used to specify the last entry in the stream.- Returns:
OK.- See Also:
- valkey.io for details.
-
xgroupCreate
public java.util.concurrent.CompletableFuture<java.lang.String> xgroupCreate(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString groupName, @NonNull @NonNull GlideString id)Description copied from interface:StreamBaseCommandsCreates a new consumer group uniquely identified bygroupnamefor the stream stored atkey.- Specified by:
xgroupCreatein interfaceStreamBaseCommands- Parameters:
key- The key of the stream.groupName- The newly created consumer group name.id- Stream entry ID that specifies the last delivered entry in the stream from the new group's perspective. The special ID"$"can be used to specify the last entry in the stream.- Returns:
OK.- See Also:
- valkey.io for details.
-
xgroupCreate
public java.util.concurrent.CompletableFuture<java.lang.String> xgroupCreate(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String groupName, @NonNull @NonNull java.lang.String id, @NonNull @NonNull StreamGroupOptions options)Description copied from interface:StreamBaseCommandsCreates a new consumer group uniquely identified bygroupnamefor the stream stored atkey.- Specified by:
xgroupCreatein interfaceStreamBaseCommands- Parameters:
key- The key of the stream.groupName- The newly created consumer group name.id- Stream entry ID that specifies the last delivered entry in the stream from the new group's perspective. The special ID"$"can be used to specify the last entry in the stream.options- The group optionsStreamGroupOptions.- Returns:
OK.- See Also:
- valkey.io for details.
-
xgroupCreate
public java.util.concurrent.CompletableFuture<java.lang.String> xgroupCreate(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString groupName, @NonNull @NonNull GlideString id, @NonNull @NonNull StreamGroupOptions options)Description copied from interface:StreamBaseCommandsCreates a new consumer group uniquely identified bygroupnamefor the stream stored atkey.- Specified by:
xgroupCreatein interfaceStreamBaseCommands- Parameters:
key- The key of the stream.groupName- The newly created consumer group name.id- Stream entry ID that specifies the last delivered entry in the stream from the new group's perspective. The special ID"$"can be used to specify the last entry in the stream.options- The group optionsStreamGroupOptions.- Returns:
OK.- See Also:
- valkey.io for details.
-
xgroupDestroy
public java.util.concurrent.CompletableFuture<java.lang.Boolean> xgroupDestroy(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String groupname)Description copied from interface:StreamBaseCommandsDestroys the consumer groupgroupnamefor the stream stored atkey.- Specified by:
xgroupDestroyin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.groupname- The consumer group name to delete.- Returns:
trueif the consumer group is destroyed. Otherwise,false.- See Also:
- valkey.io for details.
-
xgroupDestroy
public java.util.concurrent.CompletableFuture<java.lang.Boolean> xgroupDestroy(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString groupname)Description copied from interface:StreamBaseCommandsDestroys the consumer groupgroupnamefor the stream stored atkey.- Specified by:
xgroupDestroyin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.groupname- The consumer group name to delete.- Returns:
trueif the consumer group is destroyed. Otherwise,false.- See Also:
- valkey.io for details.
-
xgroupCreateConsumer
public java.util.concurrent.CompletableFuture<java.lang.Boolean> xgroupCreateConsumer(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String consumer)Description copied from interface:StreamBaseCommandsCreates a consumer namedconsumerin the consumer groupgroupfor the stream stored atkey.- Specified by:
xgroupCreateConsumerin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The newly created consumer.- Returns:
trueif the consumer is created. Otherwise,false.- See Also:
- valkey.io for details.
-
xgroupCreateConsumer
public java.util.concurrent.CompletableFuture<java.lang.Boolean> xgroupCreateConsumer(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString consumer)Description copied from interface:StreamBaseCommandsCreates a consumer namedconsumerin the consumer groupgroupfor the stream stored atkey.- Specified by:
xgroupCreateConsumerin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The newly created consumer.- Returns:
trueif the consumer is created. Otherwise,false.- See Also:
- valkey.io for details.
-
xgroupDelConsumer
public java.util.concurrent.CompletableFuture<java.lang.Long> xgroupDelConsumer(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String consumer)Description copied from interface:StreamBaseCommandsDeletes a consumer namedconsumerin the consumer groupgroup.- Specified by:
xgroupDelConsumerin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The consumer to delete.- Returns:
- The number of pending messages the
consumerhad before it was deleted. - See Also:
- valkey.io for details.
-
xgroupDelConsumer
public java.util.concurrent.CompletableFuture<java.lang.Long> xgroupDelConsumer(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString consumer)Description copied from interface:StreamBaseCommandsDeletes a consumer namedconsumerin the consumer groupgroup.- Specified by:
xgroupDelConsumerin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The consumer to delete.- Returns:
- The number of pending messages the
consumerhad before it was deleted. - See Also:
- valkey.io for details.
-
xgroupSetId
public java.util.concurrent.CompletableFuture<java.lang.String> xgroupSetId(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String groupName, @NonNull @NonNull java.lang.String id)Description copied from interface:StreamBaseCommandsSets the last delivered ID for a consumer group.- Specified by:
xgroupSetIdin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.groupName- The consumer group name.id- The stream entry ID that should be set as the last delivered ID for the consumer group.- Returns:
OK.- See Also:
- valkey.io for details.
-
xgroupSetId
public java.util.concurrent.CompletableFuture<java.lang.String> xgroupSetId(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString groupName, @NonNull @NonNull GlideString id)Description copied from interface:StreamBaseCommandsSets the last delivered ID for a consumer group.- Specified by:
xgroupSetIdin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.groupName- The consumer group name.id- The stream entry ID that should be set as the last delivered ID for the consumer group.- Returns:
OK.- See Also:
- valkey.io for details.
-
xgroupSetId
public java.util.concurrent.CompletableFuture<java.lang.String> xgroupSetId(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String groupName, @NonNull @NonNull java.lang.String id, long entriesRead)Description copied from interface:StreamBaseCommandsSets the last delivered ID for a consumer group.- Specified by:
xgroupSetIdin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.groupName- The consumer group name.id- The stream entry ID that should be set as the last delivered ID for the consumer group.entriesRead- A value representing the number of stream entries already read by the group.- Returns:
OK.- See Also:
- valkey.io for details.
-
xgroupSetId
public java.util.concurrent.CompletableFuture<java.lang.String> xgroupSetId(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString groupName, @NonNull @NonNull GlideString id, long entriesRead)Description copied from interface:StreamBaseCommandsSets the last delivered ID for a consumer group.- Specified by:
xgroupSetIdin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.groupName- The consumer group name.id- The stream entry ID that should be set as the last delivered ID for the consumer group.entriesRead- A value representing the number of stream entries already read by the group.- Returns:
OK.- See Also:
- valkey.io for details.
-
xreadgroup
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String[][]>>> xreadgroup(@NonNull @NonNull java.util.Map<java.lang.String,java.lang.String> keysAndIds, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String consumer)Description copied from interface:StreamBaseCommandsReads entries from the given streams owned by a consumer group.- Specified by:
xreadgroupin interfaceStreamBaseCommands- Parameters:
keysAndIds- AMapof keys and entry IDs to read from.
Use the special ID of">"to receive only new messages.group- The consumer group name.consumer- The consumer name.- Returns:
- A
Map<String, Map<String, String[][]>>with stream keys, toMapof stream entry IDs, to an array of pairings with format[[field, entry], [field, entry], ...]. Returnsnullif there is no stream that can be served. - See Also:
- valkey.io for details.
-
xreadgroup
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.util.Map<GlideString,GlideString[][]>>> xreadgroup(@NonNull @NonNull java.util.Map<GlideString,GlideString> keysAndIds, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString consumer)
Description copied from interface:StreamBaseCommandsReads entries from the given streams owned by a consumer group.- Specified by:
xreadgroupin interfaceStreamBaseCommands- Parameters:
keysAndIds- AMapof keys and entry IDs to read from.
Use the special ID ofgs(">")to receive only new messages.group- The consumer group name.consumer- The consumer name.- Returns:
- A
Map<GlideString, Map<GlideString, GlideString[][]>>with stream keys, toMapof stream entry IDs, to an array of pairings with format[[field, entry], [field, entry], ...]. Returnsnullif there is no stream that can be served. - See Also:
- valkey.io for details.
-
xreadgroup
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String[][]>>> xreadgroup(@NonNull @NonNull java.util.Map<java.lang.String,java.lang.String> keysAndIds, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String consumer, @NonNull @NonNull StreamReadGroupOptions options)Description copied from interface:StreamBaseCommandsReads entries from the given streams owned by a consumer group.- Specified by:
xreadgroupin interfaceStreamBaseCommands- Parameters:
keysAndIds- AMapof keys and entry IDs to read from.
Use the special ID of">"to receive only new messages.group- The consumer group name.consumer- The consumer name.options- Options detailing how to read the streamStreamReadGroupOptions.- Returns:
- A
Map<String, Map<String, String[][]>>with stream keys, toMapof stream entry IDs, to an array of pairings with format[[field, entry], [field, entry], ...]. Returnsnullif there is no stream that can be served. - See Also:
- valkey.io for details.
-
xreadgroup
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.util.Map<GlideString,GlideString[][]>>> xreadgroup(@NonNull @NonNull java.util.Map<GlideString,GlideString> keysAndIds, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString consumer, @NonNull @NonNull StreamReadGroupOptions options)
Description copied from interface:StreamBaseCommandsReads entries from the given streams owned by a consumer group.- Specified by:
xreadgroupin interfaceStreamBaseCommands- Parameters:
keysAndIds- AMapof keys and entry IDs to read from.
Use the special ID ofgs(">")to receive only new messages.group- The consumer group name.consumer- The consumer name.options- Options detailing how to read the streamStreamReadGroupOptions.- Returns:
- A
Map<GlideString, Map<GlideString, GlideString[][]>>with stream keys, toMapof stream entry IDs, to an array of pairings with format[[field, entry], [field, entry], ...]. Returnsnullif there is no stream that can be served. - See Also:
- valkey.io for details.
-
xack
public java.util.concurrent.CompletableFuture<java.lang.Long> xack(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String[] ids)Description copied from interface:StreamBaseCommandsReturns the number of messages that were successfully acknowledged by the consumer group member of a stream. This command should be called on a pending message so that such message does not get processed again.- Specified by:
xackin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.ids- Stream entry ID to acknowledge and purge messages.- Returns:
- The number of messages that were successfully acknowledged.
- See Also:
- valkey.io for details.
-
xack
public java.util.concurrent.CompletableFuture<java.lang.Long> xack(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString[] ids)Description copied from interface:StreamBaseCommandsReturns the number of messages that were successfully acknowledged by the consumer group member of a stream. This command should be called on a pending message so that such message does not get processed again.- Specified by:
xackin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.ids- Stream entry ID to acknowledge and purge messages.- Returns:
- The number of messages that were successfully acknowledged.
-
xpending
public java.util.concurrent.CompletableFuture<java.lang.Object[]> xpending(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group)Description copied from interface:StreamBaseCommandsReturns stream message summary information for pending messages matching a given range of IDs.- Specified by:
xpendingin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.- Returns:
- An
arraythat includes the summary of pending messages, with the format[NumOfMessages, StartId, EndId, [Consumer, NumOfMessages]], where:NumOfMessages: The total number of pending messages for this consumer group.StartId: The smallest ID among the pending messages.EndId: The greatest ID among the pending messages.[[Consumer, NumOfMessages], ...]: A 2D-arrayof every consumer in the consumer group with at least one pending message, and the number of pending messages it has.
- See Also:
- valkey.io for details.
-
xpending
public java.util.concurrent.CompletableFuture<java.lang.Object[]> xpending(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group)Description copied from interface:StreamBaseCommandsReturns stream message summary information for pending messages matching a given range of IDs.- Specified by:
xpendingin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.- Returns:
- An
arraythat includes the summary of pending messages, with the format[NumOfMessages, StartId, EndId, [Consumer, NumOfMessages]], where:NumOfMessages: The total number of pending messages for this consumer group.StartId: The smallest ID among the pending messages.EndId: The greatest ID among the pending messages.[[Consumer, NumOfMessages], ...]: A 2D-arrayof every consumer in the consumer group with at least one pending message, and the number of pending messages it has.
- See Also:
- valkey.io for details.
-
xpending
public java.util.concurrent.CompletableFuture<java.lang.Object[][]> xpending(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull StreamRange start, @NonNull @NonNull StreamRange end, long count)Description copied from interface:StreamBaseCommandsReturns an extended form of stream message information for pending messages matching a given range of IDs.- Specified by:
xpendingin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.start- Starting stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MINto start with the minimum available ID.
- Use
end- Ending stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MAXto end with the maximum available ID.
- Use
count- Limits the number of messages returned.- Returns:
- A 2D-
arrayof 4-tuples containing extended message information with the format[[ID, Consumer, TimeElapsed, NumOfDelivered], ... ], where:ID: The ID of the message.Consumer: The name of the consumer that fetched the message and has still to acknowledge it. We call it the current owner of the message.TimeElapsed: The number of milliseconds that elapsed since the last time this message was delivered to this consumer.NumOfDelivered: The number of times this message was delivered.
- See Also:
- valkey.io for details.
-
xpending
public java.util.concurrent.CompletableFuture<java.lang.Object[][]> xpending(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull StreamRange start, @NonNull @NonNull StreamRange end, long count)Description copied from interface:StreamBaseCommandsReturns an extended form of stream message information for pending messages matching a given range of IDs.- Specified by:
xpendingin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.start- Starting stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MINto start with the minimum available ID.
- Use
end- Ending stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MAXto end with the maximum available ID.
- Use
count- Limits the number of messages returned.- Returns:
- A 2D-
arrayof 4-tuples containing extended message information with the format[[ID, Consumer, TimeElapsed, NumOfDelivered], ... ], where:ID: The ID of the message.Consumer: The name of the consumer that fetched the message and has still to acknowledge it. We call it the current owner of the message.TimeElapsed: The number of milliseconds that elapsed since the last time this message was delivered to this consumer.NumOfDelivered: The number of times this message was delivered.
- See Also:
- valkey.io for details.
-
xpending
public java.util.concurrent.CompletableFuture<java.lang.Object[][]> xpending(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull StreamRange start, @NonNull @NonNull StreamRange end, long count, @NonNull @NonNull StreamPendingOptions options)Description copied from interface:StreamBaseCommandsReturns an extended form of stream message information for pending messages matching a given range of IDs.- Specified by:
xpendingin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.start- Starting stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MINto start with the minimum available ID.
- Use
end- Ending stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MAXto end with the maximum available ID.
- Use
count- Limits the number of messages returned.options- Stream add optionsStreamPendingOptions.- Returns:
- A 2D-
arrayof 4-tuples containing extended message information with the format[[ID, Consumer, TimeElapsed, NumOfDelivered], ... ], where:ID: The ID of the message.Consumer: The name of the consumer that fetched the message and has still to acknowledge it. We call it the current owner of the message.TimeElapsed: The number of milliseconds that elapsed since the last time this message was delivered to this consumer.NumOfDelivered: The number of times this message was delivered.
- See Also:
- valkey.io for details.
-
xpending
public java.util.concurrent.CompletableFuture<java.lang.Object[][]> xpending(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull StreamRange start, @NonNull @NonNull StreamRange end, long count, @NonNull @NonNull StreamPendingOptionsBinary options)Description copied from interface:StreamBaseCommandsReturns an extended form of stream message information for pending messages matching a given range of IDs.- Specified by:
xpendingin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.start- Starting stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MINto start with the minimum available ID.
- Use
end- Ending stream entry ID bound for range.- Use
StreamRange.IdBound.of(java.lang.String)to specify a stream entry ID. - Use
StreamRange.IdBound.ofExclusive(long)to specify an exclusive bounded stream entry ID. - Use
StreamRange.InfRangeBound.MAXto end with the maximum available ID.
- Use
count- Limits the number of messages returned.options- Stream add optionsStreamPendingOptionsBinary.- Returns:
- A 2D-
arrayof 4-tuples containing extended message information with the format[[ID, Consumer, TimeElapsed, NumOfDelivered], ... ], where:ID: The ID of the message.Consumer: The name of the consumer that fetched the message and has still to acknowledge it. We call it the current owner of the message.TimeElapsed: The number of milliseconds that elapsed since the last time this message was delivered to this consumer.NumOfDelivered: The number of times this message was delivered.
- See Also:
- valkey.io for details.
-
xclaim
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[][]>> xclaim(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String consumer, long minIdleTime, @NonNull @NonNull java.lang.String[] ids)Description copied from interface:StreamBaseCommandsChanges the ownership of a pending message.- Specified by:
xclaimin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.ids- A array of entry ids.- Returns:
- A
Mapof message entries with the format{"entryId": [["entry", "data"], ...], ...}that are claimed by the consumer. - See Also:
- valkey.io for details.
-
xclaim
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[][]>> xclaim(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString consumer, long minIdleTime, @NonNull @NonNull GlideString[] ids)
Description copied from interface:StreamBaseCommandsChanges the ownership of a pending message.- Specified by:
xclaimin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.ids- A array of entry ids.- Returns:
- A
Mapof message entries with the format{"entryId": [["entry", "data"], ...], ...}that are claimed by the consumer. - See Also:
- valkey.io for details.
-
xclaim
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[][]>> xclaim(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String consumer, long minIdleTime, @NonNull @NonNull java.lang.String[] ids, @NonNull @NonNull StreamClaimOptions options)Description copied from interface:StreamBaseCommandsChanges the ownership of a pending message.- Specified by:
xclaimin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.ids- An array of entry ids.options- Stream claim optionsStreamClaimOptions.- Returns:
- A
Mapof message entries with the format{"entryId": [["entry", "data"], ...], ...}that are claimed by the consumer. - See Also:
- valkey.io for details.
-
xclaim
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[][]>> xclaim(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString consumer, long minIdleTime, @NonNull @NonNull GlideString[] ids, @NonNull @NonNull StreamClaimOptions options)
Description copied from interface:StreamBaseCommandsChanges the ownership of a pending message.- Specified by:
xclaimin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.ids- An array of entry ids.options- Stream claim optionsStreamClaimOptions.- Returns:
- A
Mapof message entries with the format{"entryId": [["entry", "data"], ...], ...}that are claimed by the consumer. - See Also:
- valkey.io for details.
-
xclaimJustId
public java.util.concurrent.CompletableFuture<java.lang.String[]> xclaimJustId(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String consumer, long minIdleTime, @NonNull @NonNull java.lang.String[] ids)Description copied from interface:StreamBaseCommandsChanges the ownership of a pending message. This function returns anarraywith only the message/entry IDs, and is equivalent to usingJUSTIDin the Valkey API.- Specified by:
xclaimJustIdin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.ids- An array of entry ids.- Returns:
- An
arrayof message ids claimed by the consumer. - See Also:
- valkey.io for details.
-
xclaimJustId
public java.util.concurrent.CompletableFuture<GlideString[]> xclaimJustId(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString consumer, long minIdleTime, @NonNull @NonNull GlideString[] ids)
Description copied from interface:StreamBaseCommandsChanges the ownership of a pending message. This function returns anarraywith only the message/entry IDs, and is equivalent to usingJUSTIDin the Valkey API.- Specified by:
xclaimJustIdin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.ids- An array of entry ids.- Returns:
- An
arrayof message ids claimed by the consumer. - See Also:
- valkey.io for details.
-
xclaimJustId
public java.util.concurrent.CompletableFuture<java.lang.String[]> xclaimJustId(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String consumer, long minIdleTime, @NonNull @NonNull java.lang.String[] ids, @NonNull @NonNull StreamClaimOptions options)Description copied from interface:StreamBaseCommandsChanges the ownership of a pending message. This function returns anarraywith only the message/entry IDs, and is equivalent to usingJUSTIDin the Valkey API.- Specified by:
xclaimJustIdin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.ids- An array of entry ids.options- Stream claim optionsStreamClaimOptions.- Returns:
- An
arrayof message ids claimed by the consumer. - See Also:
- valkey.io for details.
-
xclaimJustId
public java.util.concurrent.CompletableFuture<GlideString[]> xclaimJustId(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString consumer, long minIdleTime, @NonNull @NonNull GlideString[] ids, @NonNull @NonNull StreamClaimOptions options)
Description copied from interface:StreamBaseCommandsChanges the ownership of a pending message. This function returns anarraywith only the message/entry IDs, and is equivalent to usingJUSTIDin the Valkey API.- Specified by:
xclaimJustIdin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.ids- An array of entry ids.options- Stream claim optionsStreamClaimOptions.- Returns:
- An
arrayof message ids claimed by the consumer. - See Also:
- valkey.io for details.
-
xinfoGroups
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>[]> xinfoGroups(@NonNull @NonNull java.lang.String key)Description copied from interface:StreamBaseCommandsReturns the list of all consumer groups and their attributes for the stream stored atkey.- Specified by:
xinfoGroupsin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.- Returns:
- An
ArrayofMaps, where each mapping represents the attributes of a consumer group for the stream atkey. - See Also:
- valkey.io for details.
-
xinfoGroups
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>[]> xinfoGroups(@NonNull @NonNull GlideString key)
Description copied from interface:StreamBaseCommandsReturns the list of all consumer groups and their attributes for the stream stored atkey.- Specified by:
xinfoGroupsin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.- Returns:
- An
ArrayofMaps, where each mapping represents the attributes of a consumer group for the stream atkey. - See Also:
- valkey.io for details.
-
xinfoConsumers
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>[]> xinfoConsumers(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String groupName)Description copied from interface:StreamBaseCommandsReturns the list of all consumers and their attributes for the given consumer group of the stream stored atkey.- Specified by:
xinfoConsumersin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.groupName- The consumer group name.- Returns:
- An
ArrayofMaps, where each mapping contains the attributes of a consumer for the given consumer group of the stream atkey. - See Also:
- valkey.io for details.
-
xinfoConsumers
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>[]> xinfoConsumers(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString groupName)
Description copied from interface:StreamBaseCommandsReturns the list of all consumers and their attributes for the given consumer group of the stream stored atkey.- Specified by:
xinfoConsumersin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.groupName- The consumer group name.- Returns:
- An
ArrayofMaps, where each mapping contains the attributes of a consumer for the given consumer group of the stream atkey. - See Also:
- valkey.io for details.
-
xautoclaim
public java.util.concurrent.CompletableFuture<java.lang.Object[]> xautoclaim(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String consumer, long minIdleTime, @NonNull @NonNull java.lang.String start)Description copied from interface:StreamBaseCommandsTransfers ownership of pending stream entries that match the specified criteria.- Specified by:
xautoclaimin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.start- Filters the claimed entries to those that have an ID equal or greater than the specified value.- Returns:
- An
arraycontaining the following elements:- A stream entry ID to be used as the start argument for the next call to
XAUTOCLAIM. This ID is equivalent to the next ID in the stream after the entries that were scanned, or "0-0" if the entire stream was scanned. - A mapping of the claimed entries, with the keys being the claimed entry IDs and the
values being a 2D list of the field-value pairs in the format
[[field1, value1], [field2, value2], ...]. - If you are using Valkey 7.0.0 or above, the response list will also include a list containing the message IDs that were in the Pending Entries List but no longer exist in the stream. These IDs are deleted from the Pending Entries List.
- A stream entry ID to be used as the start argument for the next call to
- See Also:
- valkey.io for details.
-
xautoclaim
public java.util.concurrent.CompletableFuture<java.lang.Object[]> xautoclaim(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString consumer, long minIdleTime, @NonNull @NonNull GlideString start)Description copied from interface:StreamBaseCommandsTransfers ownership of pending stream entries that match the specified criteria.- Specified by:
xautoclaimin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.start- Filters the claimed entries to those that have an ID equal or greater than the specified value.- Returns:
- An
arraycontaining the following elements:- A stream entry ID to be used as the start argument for the next call to
XAUTOCLAIM. This ID is equivalent to the next ID in the stream after the entries that were scanned, or "0-0" if the entire stream was scanned. - A mapping of the claimed entries, with the keys being the claimed entry IDs and the
values being a 2D list of the field-value pairs in the format
[[field1, value1], [field2, value2], ...]. - If you are using Valkey 7.0.0 or above, the response list will also include a list containing the message IDs that were in the Pending Entries List but no longer exist in the stream. These IDs are deleted from the Pending Entries List.
- A stream entry ID to be used as the start argument for the next call to
- See Also:
- valkey.io for details.
-
xautoclaim
public java.util.concurrent.CompletableFuture<java.lang.Object[]> xautoclaim(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String consumer, long minIdleTime, @NonNull @NonNull java.lang.String start, long count)Description copied from interface:StreamBaseCommandsTransfers ownership of pending stream entries that match the specified criteria.- Specified by:
xautoclaimin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.start- Filters the claimed entries to those that have an ID equal or greater than the specified value.count- Limits the number of claimed entries to the specified value. Default value is 100.- Returns:
- An
arraycontaining the following elements:- A stream entry ID to be used as the start argument for the next call to
XAUTOCLAIM. This ID is equivalent to the next ID in the stream after the entries that were scanned, or "0-0" if the entire stream was scanned. - A mapping of the claimed entries, with the keys being the claimed entry IDs and the
values being a 2D list of the field-value pairs in the format
[[field1, value1], [field2, value2], ...]. - If you are using Valkey 7.0.0 or above, the response list will also include a list containing the message IDs that were in the Pending Entries List but no longer exist in the stream. These IDs are deleted from the Pending Entries List.
- A stream entry ID to be used as the start argument for the next call to
- See Also:
- valkey.io for details.
-
xautoclaim
public java.util.concurrent.CompletableFuture<java.lang.Object[]> xautoclaim(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString consumer, long minIdleTime, @NonNull @NonNull GlideString start, long count)Description copied from interface:StreamBaseCommandsTransfers ownership of pending stream entries that match the specified criteria.- Specified by:
xautoclaimin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.start- Filters the claimed entries to those that have an ID equal or greater than the specified value.count- Limits the number of claimed entries to the specified value. Default value is 100.- Returns:
- An
arraycontaining the following elements:- A stream entry ID to be used as the start argument for the next call to
XAUTOCLAIM. This ID is equivalent to the next ID in the stream after the entries that were scanned, or "0-0" if the entire stream was scanned. - A mapping of the claimed entries, with the keys being the claimed entry IDs and the
values being a 2D list of the field-value pairs in the format
[[field1, value1], [field2, value2], ...]. - If you are using Valkey 7.0.0 or above, the response list will also include a list containing the message IDs that were in the Pending Entries List but no longer exist in the stream. These IDs are deleted from the Pending Entries List.
- A stream entry ID to be used as the start argument for the next call to
- See Also:
- valkey.io for details.
-
xautoclaimJustId
public java.util.concurrent.CompletableFuture<java.lang.Object[]> xautoclaimJustId(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String consumer, long minIdleTime, @NonNull @NonNull java.lang.String start)Description copied from interface:StreamBaseCommandsTransfers ownership of pending stream entries that match the specified criteria. This command uses theJUSTIDargument to further specify that the return value should contain a list of claimed IDs without their field-value info.- Specified by:
xautoclaimJustIdin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.start- Filters the claimed entries to those that have an ID equal or greater than the specified value.- Returns:
- An
arraycontaining the following elements:- A stream entry ID to be used as the start argument for the next call to
XAUTOCLAIM. This ID is equivalent to the next ID in the stream after the entries that were scanned, or "0-0" if the entire stream was scanned. - A list of the IDs for the claimed entries.
- If you are using Valkey 7.0.0 or above, the response list will also include a list containing the message IDs that were in the Pending Entries List but no longer exist in the stream. These IDs are deleted from the Pending Entries List.
- A stream entry ID to be used as the start argument for the next call to
- See Also:
- valkey.io for details.
-
xautoclaimJustId
public java.util.concurrent.CompletableFuture<java.lang.Object[]> xautoclaimJustId(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString consumer, long minIdleTime, @NonNull @NonNull GlideString start)Description copied from interface:StreamBaseCommandsTransfers ownership of pending stream entries that match the specified criteria. This command uses theJUSTIDargument to further specify that the return value should contain a list of claimed IDs without their field-value info.- Specified by:
xautoclaimJustIdin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.start- Filters the claimed entries to those that have an ID equal or greater than the specified value.- Returns:
- An
arraycontaining the following elements:- A stream entry ID to be used as the start argument for the next call to
XAUTOCLAIM. This ID is equivalent to the next ID in the stream after the entries that were scanned, or "0-0" if the entire stream was scanned. - A list of the IDs for the claimed entries.
- If you are using Valkey 7.0.0 or above, the response list will also include a list containing the message IDs that were in the Pending Entries List but no longer exist in the stream. These IDs are deleted from the Pending Entries List.
- A stream entry ID to be used as the start argument for the next call to
- See Also:
- valkey.io for details.
-
xautoclaimJustId
public java.util.concurrent.CompletableFuture<java.lang.Object[]> xautoclaimJustId(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String group, @NonNull @NonNull java.lang.String consumer, long minIdleTime, @NonNull @NonNull java.lang.String start, long count)Description copied from interface:StreamBaseCommandsTransfers ownership of pending stream entries that match the specified criteria. This command uses theJUSTIDargument to further specify that the return value should contain a list of claimed IDs without their field-value info.- Specified by:
xautoclaimJustIdin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.start- Filters the claimed entries to those that have an ID equal or greater than the specified value.count- Limits the number of claimed entries to the specified value. Default value is 100.- Returns:
- An
arraycontaining the following elements:- A stream entry ID to be used as the start argument for the next call to
XAUTOCLAIM. This ID is equivalent to the next ID in the stream after the entries that were scanned, or "0-0" if the entire stream was scanned. - A list of the IDs for the claimed entries.
- If you are using Valkey 7.0.0 or above, the response list will also include a list containing the message IDs that were in the Pending Entries List but no longer exist in the stream. These IDs are deleted from the Pending Entries List.
- A stream entry ID to be used as the start argument for the next call to
- See Also:
- valkey.io for details.
-
xautoclaimJustId
public java.util.concurrent.CompletableFuture<java.lang.Object[]> xautoclaimJustId(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString group, @NonNull @NonNull GlideString consumer, long minIdleTime, @NonNull @NonNull GlideString start, long count)Description copied from interface:StreamBaseCommandsTransfers ownership of pending stream entries that match the specified criteria. This command uses theJUSTIDargument to further specify that the return value should contain a list of claimed IDs without their field-value info.- Specified by:
xautoclaimJustIdin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.group- The consumer group name.consumer- The group consumer.minIdleTime- The minimum idle time for the message to be claimed.start- Filters the claimed entries to those that have an ID equal or greater than the specified value.count- Limits the number of claimed entries to the specified value. Default value is 100.- Returns:
- An
arraycontaining the following elements:- A stream entry ID to be used as the start argument for the next call to
XAUTOCLAIM. This ID is equivalent to the next ID in the stream after the entries that were scanned, or "0-0" if the entire stream was scanned. - A list of the IDs for the claimed entries.
- If you are using Valkey 7.0.0 or above, the response list will also include a list containing the message IDs that were in the Pending Entries List but no longer exist in the stream. These IDs are deleted from the Pending Entries List.
- A stream entry ID to be used as the start argument for the next call to
- See Also:
- valkey.io for details.
-
xinfoStream
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> xinfoStream(@NonNull @NonNull java.lang.String key)Description copied from interface:StreamBaseCommandsReturns information about the stream stored at keykey.
To get more detailed information useStreamBaseCommands.xinfoStreamFull(String)orStreamBaseCommands.xinfoStreamFull(String, int).- Specified by:
xinfoStreamin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.- Returns:
- A
Mapof stream information for the givenkey. See the example for a sample response. - See Also:
- valkey.io for details.
-
xinfoStreamFull
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> xinfoStreamFull(@NonNull @NonNull java.lang.String key)Description copied from interface:StreamBaseCommandsReturns verbose information about the stream stored at keykey.
The output is limited by first10PEL entries.- Specified by:
xinfoStreamFullin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.- Returns:
- A
Mapof detailed stream information for the givenkey. See the example for a sample response. - See Also:
- valkey.io for details.
-
xinfoStreamFull
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> xinfoStreamFull(@NonNull @NonNull java.lang.String key, int count)Description copied from interface:StreamBaseCommandsReturns verbose information about the stream stored at keykey.- Specified by:
xinfoStreamFullin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.count- The number of stream and PEL entries that are returned. Value of0means that all entries will be returned.- Returns:
- A
Mapof detailed stream information for the givenkey. - See Also:
- valkey.io for details.
-
xinfoStream
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>> xinfoStream(@NonNull @NonNull GlideString key)
Description copied from interface:StreamBaseCommandsReturns information about the stream stored at keykey.
To get more detailed information useStreamBaseCommands.xinfoStreamFull(GlideString)orStreamBaseCommands.xinfoStreamFull(GlideString, int).- Specified by:
xinfoStreamin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.- Returns:
- A
Mapof stream information for the givenkey. See the example for a sample response. - See Also:
- valkey.io for details.
-
xinfoStreamFull
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>> xinfoStreamFull(@NonNull @NonNull GlideString key)
Description copied from interface:StreamBaseCommandsReturns verbose information about the stream stored at keykey.
The output is limited by first10PEL entries.- Specified by:
xinfoStreamFullin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.- Returns:
- A
Mapof detailed stream information for the givenkey. See the example for a sample response. - See Also:
- valkey.io for details.
-
xinfoStreamFull
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>> xinfoStreamFull(@NonNull @NonNull GlideString key, int count)
Description copied from interface:StreamBaseCommandsReturns verbose information about the stream stored at keykey.- Specified by:
xinfoStreamFullin interfaceStreamBaseCommands- Parameters:
key- The key of the stream.count- The number of stream and PEL entries that are returned. Value of0means that all entries will be returned.- Returns:
- A
Mapof detailed stream information for the givenkey. - See Also:
- valkey.io for details.
-
pttl
public java.util.concurrent.CompletableFuture<java.lang.Long> pttl(@NonNull @NonNull java.lang.String key)Description copied from interface:GenericBaseCommandsReturns the remaining time to live ofkeythat has a timeout, in milliseconds.- Specified by:
pttlin interfaceGenericBaseCommands- Parameters:
key- The key to return its timeout.- Returns:
- TTL in milliseconds.
-2ifkeydoes not exist,-1ifkeyexists but has no associated expire. - See Also:
- valkey.io for details.
-
pttl
public java.util.concurrent.CompletableFuture<java.lang.Long> pttl(@NonNull @NonNull GlideString key)Description copied from interface:GenericBaseCommandsReturns the remaining time to live ofkeythat has a timeout, in milliseconds.- Specified by:
pttlin interfaceGenericBaseCommands- Parameters:
key- The key to return its timeout.- Returns:
- TTL in milliseconds.
-2ifkeydoes not exist,-1ifkeyexists but has no associated expire. - See Also:
- valkey.io for details.
-
persist
public java.util.concurrent.CompletableFuture<java.lang.Boolean> persist(@NonNull @NonNull java.lang.String key)Description copied from interface:GenericBaseCommandsRemoves the existing timeout onkey, turning thekeyfrom volatile (akeywith an expire set) to persistent (akeythat will never expire as no timeout is associated).- Specified by:
persistin interfaceGenericBaseCommands- Parameters:
key- Thekeyto remove the existing timeout on.- Returns:
falseifkeydoes not exist or does not have an associated timeout,trueif the timeout has been removed.- See Also:
- valkey.io for details.
-
persist
public java.util.concurrent.CompletableFuture<java.lang.Boolean> persist(@NonNull @NonNull GlideString key)Description copied from interface:GenericBaseCommandsRemoves the existing timeout onkey, turning thekeyfrom volatile (akeywith an expire set) to persistent (akeythat will never expire as no timeout is associated).- Specified by:
persistin interfaceGenericBaseCommands- Parameters:
key- Thekeyto remove the existing timeout on.- Returns:
falseifkeydoes not exist or does not have an associated timeout,trueif the timeout has been removed.- See Also:
- valkey.io for details.
-
type
public java.util.concurrent.CompletableFuture<java.lang.String> type(@NonNull @NonNull java.lang.String key)Description copied from interface:GenericBaseCommandsReturns the string representation of the type of the value stored atkey.- Specified by:
typein interfaceGenericBaseCommands- Parameters:
key- Thekeyto check its data type.- Returns:
- If the
keyexists, the type of the stored value is returned. Otherwise, a "none" string is returned. - See Also:
- valkey.io for details.
-
type
public java.util.concurrent.CompletableFuture<java.lang.String> type(@NonNull @NonNull GlideString key)Description copied from interface:GenericBaseCommandsReturns the string representation of the type of the value stored atkey.- Specified by:
typein interfaceGenericBaseCommands- Parameters:
key- Thekeyto check its data type.- Returns:
- If the
keyexists, the type of the stored value is returned. Otherwise, a "none" string is returned. - See Also:
- valkey.io for details.
-
linsert
public java.util.concurrent.CompletableFuture<java.lang.Long> linsert(@NonNull @NonNull java.lang.String key, @NonNull @NonNull LInsertOptions.InsertPosition position, @NonNull @NonNull java.lang.String pivot, @NonNull @NonNull java.lang.String element)Description copied from interface:ListBaseCommandsInsertselementin the list atkeyeither before or after thepivot.- Specified by:
linsertin interfaceListBaseCommands- Parameters:
key- The key of the list.position- The relative position to insert into - eitherLInsertOptions.InsertPosition.BEFOREorLInsertOptions.InsertPosition.AFTERthepivot.pivot- An element of the list.element- The new element to insert.- Returns:
- The list length after a successful insert operation.
If thekeydoesn't exist returns-1.
If thepivotwasn't found, returns0. - See Also:
- valkey.io for details.
-
linsert
public java.util.concurrent.CompletableFuture<java.lang.Long> linsert(@NonNull @NonNull GlideString key, @NonNull @NonNull LInsertOptions.InsertPosition position, @NonNull @NonNull GlideString pivot, @NonNull @NonNull GlideString element)Description copied from interface:ListBaseCommandsInsertselementin the list atkeyeither before or after thepivot.- Specified by:
linsertin interfaceListBaseCommands- Parameters:
key- The key of the list.position- The relative position to insert into - eitherLInsertOptions.InsertPosition.BEFOREorLInsertOptions.InsertPosition.AFTERthepivot.pivot- An element of the list.element- The new element to insert.- Returns:
- The list length after a successful insert operation.
If thekeydoesn't exist returns-1.
If thepivotwasn't found, returns0. - See Also:
- valkey.io for details.
-
blpop
public java.util.concurrent.CompletableFuture<java.lang.String[]> blpop(@NonNull @NonNull java.lang.String[] keys, double timeout)Description copied from interface:ListBaseCommandsPops an element from the head of the first list that is non-empty, with the givenkeysbeing checked in the order that they are given.
Blocks the connection when there are no elements to pop from any of the given lists.- Specified by:
blpopin interfaceListBaseCommands- Parameters:
keys- Thekeysof the lists to pop from.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- A two-element
arraycontaining thekeyfrom which the element was popped and thevalueof the popped element, formatted as[key, value]. If no element could be popped and the timeout expired, returnsnull. - See Also:
- valkey.io for details.
-
blpop
public java.util.concurrent.CompletableFuture<GlideString[]> blpop(@NonNull @NonNull GlideString[] keys, double timeout)
Description copied from interface:ListBaseCommandsPops an element from the head of the first list that is non-empty, with the givenkeysbeing checked in the order that they are given.
Blocks the connection when there are no elements to pop from any of the given lists.- Specified by:
blpopin interfaceListBaseCommands- Parameters:
keys- Thekeysof the lists to pop from.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- A two-element
arraycontaining thekeyfrom which the element was popped and thevalueof the popped element, formatted as[key, value]. If no element could be popped and the timeout expired, returns null. - See Also:
- valkey.io for details.
-
brpop
public java.util.concurrent.CompletableFuture<java.lang.String[]> brpop(@NonNull @NonNull java.lang.String[] keys, double timeout)Description copied from interface:ListBaseCommandsPops an element from the tail of the first list that is non-empty, with the givenkeysbeing checked in the order that they are given.
Blocks the connection when there are no elements to pop from any of the given lists.- Specified by:
brpopin interfaceListBaseCommands- Parameters:
keys- Thekeysof the lists to pop from.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- A two-element
arraycontaining thekeyfrom which the element was popped and thevalueof the popped element, formatted as[key, value]. If no element could be popped and the timeout expired, returnsnull. - See Also:
- valkey.io for details.
-
brpop
public java.util.concurrent.CompletableFuture<GlideString[]> brpop(@NonNull @NonNull GlideString[] keys, double timeout)
Description copied from interface:ListBaseCommandsPops an element from the tail of the first list that is non-empty, with the givenkeysbeing checked in the order that they are given.
Blocks the connection when there are no elements to pop from any of the given lists.- Specified by:
brpopin interfaceListBaseCommands- Parameters:
keys- Thekeysof the lists to pop from.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- A two-element
arraycontaining thekeyfrom which the element was popped and thevalueof the popped element, formatted as[key, value]. If no element could be popped and the timeout expired, returns null. - See Also:
- valkey.io for details.
-
rpushx
public java.util.concurrent.CompletableFuture<java.lang.Long> rpushx(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] elements)Description copied from interface:ListBaseCommandsInserts all the specified values at the tail of the list stored atkey, only ifkeyexists and holds a list. Ifkeyis not a list, this performs no operation.- Specified by:
rpushxin interfaceListBaseCommands- Parameters:
key- The key of the list.elements- The elements to insert at the tail of the list stored atkey.- Returns:
- The length of the list after the push operation.
- See Also:
- valkey.io for details.
-
rpushx
public java.util.concurrent.CompletableFuture<java.lang.Long> rpushx(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] elements)Description copied from interface:ListBaseCommandsInserts all the specified values at the tail of the list stored atkey, only ifkeyexists and holds a list. Ifkeyis not a list, this performs no operation.- Specified by:
rpushxin interfaceListBaseCommands- Parameters:
key- The key of the list.elements- The elements to insert at the tail of the list stored atkey.- Returns:
- The length of the list after the push operation.
- See Also:
- valkey.io for details.
-
lpushx
public java.util.concurrent.CompletableFuture<java.lang.Long> lpushx(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] elements)Description copied from interface:ListBaseCommandsInserts all the specified values at the head of the list stored atkey, only ifkeyexists and holds a list. Ifkeyis not a list, this performs no operation.- Specified by:
lpushxin interfaceListBaseCommands- Parameters:
key- The key of the list.elements- The elements to insert at the head of the list stored atkey.- Returns:
- The length of the list after the push operation.
- See Also:
- valkey.io for details.
-
lpushx
public java.util.concurrent.CompletableFuture<java.lang.Long> lpushx(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] elements)Description copied from interface:ListBaseCommandsInserts all the specified values at the head of the list stored atkey, only ifkeyexists and holds a list. Ifkeyis not a list, this performs no operation.- Specified by:
lpushxin interfaceListBaseCommands- Parameters:
key- The key of the list.elements- The elements to insert at the head of the list stored atkey.- Returns:
- The length of the list after the push operation.
- See Also:
- valkey.io for details.
-
zrange
public java.util.concurrent.CompletableFuture<java.lang.String[]> zrange(@NonNull @NonNull java.lang.String key, @NonNull @NonNull RangeOptions.RangeQuery rangeQuery, boolean reverse)Description copied from interface:SortedSetBaseCommandsReturns the specified range of elements in the sorted set stored atkey.
ZRANGEcan perform different types of range queries: by index (rank), by the score, or by lexicographical order.
To get the elements with their scores, seeSortedSetBaseCommands.zrangeWithScores(java.lang.String, glide.api.models.commands.RangeOptions.ScoredRangeQuery, boolean).- Specified by:
zrangein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.rangeQuery- The range query object representing the type of range query to perform.
- For range queries by index (rank), use
RangeOptions.RangeByIndex. - For range queries by lexicographical order, use
RangeOptions.RangeByLex. - For range queries by score, use
RangeOptions.RangeByScore.
- For range queries by index (rank), use
reverse- If true, reverses the sorted set, with index 0 as the element with the highest score.- Returns:
- An array of elements within the specified range. If
keydoes not exist, it is treated as an empty sorted set, and the command returns an empty array. - See Also:
- valkey.io for more details.
-
zrange
public java.util.concurrent.CompletableFuture<GlideString[]> zrange(@NonNull @NonNull GlideString key, @NonNull @NonNull RangeOptions.RangeQuery rangeQuery, boolean reverse)
Description copied from interface:SortedSetBaseCommandsReturns the specified range of elements in the sorted set stored atkey.
ZRANGEcan perform different types of range queries: by index (rank), by the score, or by lexicographical order.
To get the elements with their scores, seeSortedSetBaseCommands.zrangeWithScores(java.lang.String, glide.api.models.commands.RangeOptions.ScoredRangeQuery, boolean).- Specified by:
zrangein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.rangeQuery- The range query object representing the type of range query to perform.
- For range queries by index (rank), use
RangeOptions.RangeByIndex. - For range queries by lexicographical order, use
RangeOptions.RangeByLex. - For range queries by score, use
RangeOptions.RangeByScore.
- For range queries by index (rank), use
reverse- If true, reverses the sorted set, with index 0 as the element with the highest score.- Returns:
- An array of elements within the specified range. If
keydoes not exist, it is treated as an empty sorted set, and the command returns an empty array. - See Also:
- valkey.io for more details.
-
zrange
public java.util.concurrent.CompletableFuture<java.lang.String[]> zrange(@NonNull @NonNull java.lang.String key, @NonNull @NonNull RangeOptions.RangeQuery rangeQuery)Description copied from interface:SortedSetBaseCommandsReturns the specified range of elements in the sorted set stored atkey.
ZRANGEcan perform different types of range queries: by index (rank), by the score, or by lexicographical order.
To get the elements with their scores, seeSortedSetBaseCommands.zrangeWithScores(java.lang.String, glide.api.models.commands.RangeOptions.ScoredRangeQuery, boolean).- Specified by:
zrangein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.rangeQuery- The range query object representing the type of range query to perform.
- For range queries by index (rank), use
RangeOptions.RangeByIndex. - For range queries by lexicographical order, use
RangeOptions.RangeByLex. - For range queries by score, use
RangeOptions.RangeByScore.
- For range queries by index (rank), use
- Returns:
- An of array elements within the specified range. If
keydoes not exist, it is treated as an empty sorted set, and the command returns an empty array. - See Also:
- valkey.io for more details.
-
zrange
public java.util.concurrent.CompletableFuture<GlideString[]> zrange(@NonNull @NonNull GlideString key, @NonNull @NonNull RangeOptions.RangeQuery rangeQuery)
Description copied from interface:SortedSetBaseCommandsReturns the specified range of elements in the sorted set stored atkey.
ZRANGEcan perform different types of range queries: by index (rank), by the score, or by lexicographical order.
To get the elements with their scores, seeSortedSetBaseCommands.zrangeWithScores(java.lang.String, glide.api.models.commands.RangeOptions.ScoredRangeQuery, boolean).- Specified by:
zrangein interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.rangeQuery- The range query object representing the type of range query to perform.
- For range queries by index (rank), use
RangeOptions.RangeByIndex. - For range queries by lexicographical order, use
RangeOptions.RangeByLex. - For range queries by score, use
RangeOptions.RangeByScore.
- For range queries by index (rank), use
- Returns:
- An of array elements within the specified range. If
keydoes not exist, it is treated as an empty sorted set, and the command returns an empty array. - See Also:
- valkey.io for more details.
-
zrangeWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>> zrangeWithScores(@NonNull @NonNull java.lang.String key, @NonNull @NonNull RangeOptions.ScoredRangeQuery rangeQuery, boolean reverse)Description copied from interface:SortedSetBaseCommandsReturns the specified range of elements with their scores in the sorted set stored atkey. Similar toSortedSetBaseCommands.zrange(java.lang.String, glide.api.models.commands.RangeOptions.RangeQuery, boolean)but with aWITHSCOREflag.- Specified by:
zrangeWithScoresin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.rangeQuery- The range query object representing the type of range query to perform.
- For range queries by index (rank), use
RangeOptions.RangeByIndex. - For range queries by score, use
RangeOptions.RangeByScore.
- For range queries by index (rank), use
reverse- If true, reverses the sorted set, with index 0 as the element with the highest score.- Returns:
- A
Mapof elements and their scores within the specified range. Ifkeydoes not exist, it is treated as an empty sorted set, and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
zrangeWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>> zrangeWithScores(@NonNull @NonNull GlideString key, @NonNull @NonNull RangeOptions.ScoredRangeQuery rangeQuery, boolean reverse)
Description copied from interface:SortedSetBaseCommandsReturns the specified range of elements with their scores in the sorted set stored atkey. Similar toSortedSetBaseCommands.zrange(java.lang.String, glide.api.models.commands.RangeOptions.RangeQuery, boolean)but with aWITHSCOREflag.- Specified by:
zrangeWithScoresin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.rangeQuery- The range query object representing the type of range query to perform.
- For range queries by index (rank), use
RangeOptions.RangeByIndex. - For range queries by score, use
RangeOptions.RangeByScore.
- For range queries by index (rank), use
reverse- If true, reverses the sorted set, with index 0 as the element with the highest score.- Returns:
- A
Mapof elements and their scores within the specified range. Ifkeydoes not exist, it is treated as an empty sorted set, and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
zrangeWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Double>> zrangeWithScores(@NonNull @NonNull java.lang.String key, @NonNull @NonNull RangeOptions.ScoredRangeQuery rangeQuery)Description copied from interface:SortedSetBaseCommandsReturns the specified range of elements with their scores in the sorted set stored atkey. Similar toSortedSetBaseCommands.zrange(java.lang.String, glide.api.models.commands.RangeOptions.RangeQuery, boolean)but with aWITHSCOREflag.- Specified by:
zrangeWithScoresin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.rangeQuery- The range query object representing the type of range query to perform.
- For range queries by index (rank), use
RangeOptions.RangeByIndex. - For range queries by score, use
RangeOptions.RangeByScore.
- For range queries by index (rank), use
- Returns:
- A
Mapof elements and their scores within the specified range. Ifkeydoes not exist, it is treated as an empty sorted set, and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
zrangeWithScores
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Double>> zrangeWithScores(@NonNull @NonNull GlideString key, @NonNull @NonNull RangeOptions.ScoredRangeQuery rangeQuery)
Description copied from interface:SortedSetBaseCommandsReturns the specified range of elements with their scores in the sorted set stored atkey. Similar toSortedSetBaseCommands.zrange(java.lang.String, glide.api.models.commands.RangeOptions.RangeQuery, boolean)but with aWITHSCOREflag.- Specified by:
zrangeWithScoresin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.rangeQuery- The range query object representing the type of range query to perform.
- For range queries by index (rank), use
RangeOptions.RangeByIndex. - For range queries by score, use
RangeOptions.RangeByScore.
- For range queries by index (rank), use
- Returns:
- A
Mapof elements and their scores within the specified range. Ifkeydoes not exist, it is treated as an empty sorted set, and the command returns an emptyMap. - See Also:
- valkey.io for more details.
-
zmpop
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> zmpop(@NonNull @NonNull java.lang.String[] keys, @NonNull @NonNull ScoreFilter modifier)Description copied from interface:SortedSetBaseCommandsPops a member-score pair from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.- Specified by:
zmpopin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.modifier- The element pop criteria - eitherScoreFilter.MINorScoreFilter.MAXto pop the member with the lowest/highest score accordingly.- Returns:
- A
mapcontaining the key name of the set from which the element was popped, and a member-scoreMapof the popped element.
If no member could be popped, returnsnull. - See Also:
- valkey.io for more details.
-
zmpop
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>> zmpop(@NonNull @NonNull GlideString[] keys, @NonNull @NonNull ScoreFilter modifier)
Description copied from interface:SortedSetBaseCommandsPops a member-score pair from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.- Specified by:
zmpopin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.modifier- The element pop criteria - eitherScoreFilter.MINorScoreFilter.MAXto pop the member with the lowest/highest score accordingly.- Returns:
- A
mapcontaining the key name of the set from which the element was popped, and a member-scoreMapof the popped element.
If no member could be popped, returnsnull. - See Also:
- valkey.io for more details.
-
zmpop
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> zmpop(@NonNull @NonNull java.lang.String[] keys, @NonNull @NonNull ScoreFilter modifier, long count)Description copied from interface:SortedSetBaseCommandsPops multiple member-score pairs from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.- Specified by:
zmpopin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.modifier- The element pop criteria - eitherScoreFilter.MINorScoreFilter.MAXto pop members with the lowest/highest scores accordingly.count- The number of elements to pop.- Returns:
- A
mapcontaining the key name of the set from which elements were popped, and a member-scoreMapof the popped elements.
If no member could be popped, returnsnull. - See Also:
- valkey.io for more details.
-
zmpop
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>> zmpop(@NonNull @NonNull GlideString[] keys, @NonNull @NonNull ScoreFilter modifier, long count)
Description copied from interface:SortedSetBaseCommandsPops multiple member-score pairs from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.- Specified by:
zmpopin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.modifier- The element pop criteria - eitherScoreFilter.MINorScoreFilter.MAXto pop members with the lowest/highest scores accordingly.count- The number of elements to pop.- Returns:
- A
mapcontaining the key name of the set from which elements were popped, and a member-scoreMapof the popped elements.
If no member could be popped, returnsnull. - See Also:
- valkey.io for more details.
-
bzmpop
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> bzmpop(@NonNull @NonNull java.lang.String[] keys, @NonNull @NonNull ScoreFilter modifier, double timeout)Description copied from interface:SortedSetBaseCommandsBlocks the connection until it pops and returns a member-score pair from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZMPOPis the blocking variant ofSortedSetBaseCommands.zmpop(String[], ScoreFilter).- Specified by:
bzmpopin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.modifier- The element pop criteria - eitherScoreFilter.MINorScoreFilter.MAXto pop members with the lowest/highest scores accordingly.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- A
Mapcontaining the key name of the set from which an element was popped, and a member-scoreMapof the popped elements.
If no member could be popped and the timeout expired, returnsnull. - See Also:
- valkey.io for more details.
-
bzmpop
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>> bzmpop(@NonNull @NonNull GlideString[] keys, @NonNull @NonNull ScoreFilter modifier, double timeout)
Description copied from interface:SortedSetBaseCommandsBlocks the connection until it pops and returns a member-score pair from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZMPOPis the blocking variant ofSortedSetBaseCommands.zmpop(String[], ScoreFilter).- Specified by:
bzmpopin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.modifier- The element pop criteria - eitherScoreFilter.MINorScoreFilter.MAXto pop members with the lowest/highest scores accordingly.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- A
mapcontaining the key name of the set from which an element was popped, and a member-scoreMapof the popped elements.
If no member could be popped and the timeout expired, returnsnull. - See Also:
- valkey.io for more details.
-
bzmpop
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> bzmpop(@NonNull @NonNull java.lang.String[] keys, @NonNull @NonNull ScoreFilter modifier, double timeout, long count)Description copied from interface:SortedSetBaseCommandsBlocks the connection until it pops and returns multiple member-score pairs from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZMPOPis the blocking variant ofSortedSetBaseCommands.zmpop(String[], ScoreFilter, long).- Specified by:
bzmpopin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.modifier- The element pop criteria - eitherScoreFilter.MINorScoreFilter.MAXto pop members with the lowest/highest scores accordingly.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.count- The number of elements to pop.- Returns:
- A
mapcontaining the key name of the set from which elements were popped, and a member-scoreMapof the popped elements.
If no members could be popped and the timeout expired, returnsnull. - See Also:
- valkey.io for more details.
-
bzmpop
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Object>> bzmpop(@NonNull @NonNull GlideString[] keys, @NonNull @NonNull ScoreFilter modifier, double timeout, long count)
Description copied from interface:SortedSetBaseCommandsBlocks the connection until it pops and returns multiple member-score pairs from the first non-empty sorted set, with the givenkeysbeing checked in the order they are provided.
BZMPOPis the blocking variant ofSortedSetBaseCommands.zmpop(String[], ScoreFilter, long).- Specified by:
bzmpopin interfaceSortedSetBaseCommands- Parameters:
keys- The keys of the sorted sets.modifier- The element pop criteria - eitherScoreFilter.MINorScoreFilter.MAXto pop members with the lowest/highest scores accordingly.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.count- The number of elements to pop.- Returns:
- A
mapcontaining the key name of the set from which elements were popped, and a member-scoreMapof the popped elements.
If no members could be popped and the timeout expired, returnsnull. - See Also:
- valkey.io for more details.
-
pfadd
public java.util.concurrent.CompletableFuture<java.lang.Boolean> pfadd(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] elements)Description copied from interface:HyperLogLogBaseCommandsAdds all elements to the HyperLogLog data structure stored at the specifiedkey.
Creates a new structure if thekeydoes not exist.When no
elementsare provided, andkeyexists and is a HyperLogLog, then no operation is performed. Ifkeydoes not exist, then the HyperLogLog structure is created.- Specified by:
pfaddin interfaceHyperLogLogBaseCommands- Parameters:
key- Thekeyof the HyperLogLog data structure to add elements into.elements- An array of members to add to the HyperLogLog stored atkey.- Returns:
- If the HyperLogLog is newly created, or if the HyperLogLog approximated cardinality is
altered, then returns
1. Otherwise, returns0. - See Also:
- valkey.io for details.
-
pfadd
public java.util.concurrent.CompletableFuture<java.lang.Boolean> pfadd(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] elements)Description copied from interface:HyperLogLogBaseCommandsAdds all elements to the HyperLogLog data structure stored at the specifiedkey.
Creates a new structure if thekeydoes not exist.When no
elementsare provided, andkeyexists and is a HyperLogLog, then no operation is performed. Ifkeydoes not exist, then the HyperLogLog structure is created.- Specified by:
pfaddin interfaceHyperLogLogBaseCommands- Parameters:
key- Thekeyof the HyperLogLog data structure to add elements into.elements- An array of members to add to the HyperLogLog stored atkey.- Returns:
- If the HyperLogLog is newly created, or if the HyperLogLog approximated cardinality is
altered, then returns
true. Otherwise, returnsfalse. - See Also:
- valkey.io for details.
-
pfcount
public java.util.concurrent.CompletableFuture<java.lang.Long> pfcount(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:HyperLogLogBaseCommandsEstimates 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.- Specified by:
pfcountin interfaceHyperLogLogBaseCommands- Parameters:
keys- The keys of the HyperLogLog data structures to be analyzed.- Returns:
- The approximated cardinality of given HyperLogLog data structures.
The cardinality of a key that does not exist is0. - See Also:
- valkey.io for details.
-
pfcount
public java.util.concurrent.CompletableFuture<java.lang.Long> pfcount(@NonNull @NonNull GlideString[] keys)Description copied from interface:HyperLogLogBaseCommandsEstimates 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.- Specified by:
pfcountin interfaceHyperLogLogBaseCommands- Parameters:
keys- The keys of the HyperLogLog data structures to be analyzed.- Returns:
- The approximated cardinality of given HyperLogLog data structures.
The cardinality of a key that does not exist is0. - See Also:
- valkey.io for details.
-
pfmerge
public java.util.concurrent.CompletableFuture<java.lang.String> pfmerge(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String[] sourceKeys)Description copied from interface:HyperLogLogBaseCommandsMerges multiple HyperLogLog values into a unique value.
If the destination variable exists, it is treated as one of the source HyperLogLog data sets, otherwise a new HyperLogLog is created.- Specified by:
pfmergein interfaceHyperLogLogBaseCommands- Parameters:
destination- The key of the destination HyperLogLog where the merged data sets will be stored.sourceKeys- The keys of the HyperLogLog structures to be merged.- Returns:
OK.- See Also:
- valkey.io for details.
-
pfmerge
public java.util.concurrent.CompletableFuture<java.lang.String> pfmerge(@NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString[] sourceKeys)Description copied from interface:HyperLogLogBaseCommandsMerges multiple HyperLogLog values into a unique value.
If the destination variable exists, it is treated as one of the source HyperLogLog data sets, otherwise a new HyperLogLog is created.- Specified by:
pfmergein interfaceHyperLogLogBaseCommands- Parameters:
destination- The key of the destination HyperLogLog where the merged data sets will be stored.sourceKeys- The keys of the HyperLogLog structures to be merged.- Returns:
OK.- See Also:
- valkey.io for details.
-
touch
public java.util.concurrent.CompletableFuture<java.lang.Long> touch(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:GenericBaseCommandsUpdates the last access time of specifiedkeys.- Specified by:
touchin interfaceGenericBaseCommands- Parameters:
keys- The keys to update last access time.- Returns:
- The number of keys that were updated.
- See Also:
- valkey.io for details.
-
touch
public java.util.concurrent.CompletableFuture<java.lang.Long> touch(@NonNull @NonNull GlideString[] keys)Description copied from interface:GenericBaseCommandsUpdates the last access time of specifiedkeys.- Specified by:
touchin interfaceGenericBaseCommands- Parameters:
keys- The keys to update last access time.- Returns:
- The number of keys that were updated.
- See Also:
- valkey.io for details.
-
geoadd
public java.util.concurrent.CompletableFuture<java.lang.Long> geoadd(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.util.Map<java.lang.String,GeospatialData> membersToGeospatialData, @NonNull @NonNull GeoAddOptions options)Description copied from interface:GeospatialIndicesBaseCommandsAdds geospatial members with their positions to the specified sorted set stored atkey.
If a member is already a part of the sorted set, its position is updated.- Specified by:
geoaddin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.membersToGeospatialData- A mapping of member names to their corresponding positions - seeGeospatialData. The command will report an error when the user attempts to index coordinates outside the specified ranges.options- The GeoAdd options - seeGeoAddOptions- Returns:
- The number of elements added to the sorted set. If
changedis set totruein the options, returns the number of elements updated in the sorted set. - See Also:
- valkey.io for more details.
-
geoadd
public java.util.concurrent.CompletableFuture<java.lang.Long> geoadd(@NonNull @NonNull GlideString key, @NonNull @NonNull java.util.Map<GlideString,GeospatialData> membersToGeospatialData, @NonNull @NonNull GeoAddOptions options)Description copied from interface:GeospatialIndicesBaseCommandsAdds geospatial members with their positions to the specified sorted set stored atkey.
If a member is already a part of the sorted set, its position is updated.- Specified by:
geoaddin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.membersToGeospatialData- A mapping of member names to their corresponding positions - seeGeospatialData. The command will report an error when the user attempts to index coordinates outside the specified ranges.options- The GeoAdd options - seeGeoAddOptions- Returns:
- The number of elements added to the sorted set. If
changedis set totruein the options, returns the number of elements updated in the sorted set. - See Also:
- valkey.io for more details.
-
geoadd
public java.util.concurrent.CompletableFuture<java.lang.Long> geoadd(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.util.Map<java.lang.String,GeospatialData> membersToGeospatialData)Description copied from interface:GeospatialIndicesBaseCommandsAdds geospatial members with their positions to the specified sorted set stored atkey.
If a member is already a part of the sorted set, its position is updated.
To perform ageoaddoperation while specifying optional parameters, useGeospatialIndicesBaseCommands.geoadd(String, Map, GeoAddOptions).- Specified by:
geoaddin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.membersToGeospatialData- A mapping of member names to their corresponding positions - seeGeospatialData. The command will report an error when the user attempts to index coordinates outside the specified ranges.- Returns:
- The number of elements added to the sorted set.
- See Also:
- valkey.io for more details.
-
geoadd
public java.util.concurrent.CompletableFuture<java.lang.Long> geoadd(@NonNull @NonNull GlideString key, @NonNull @NonNull java.util.Map<GlideString,GeospatialData> membersToGeospatialData)Description copied from interface:GeospatialIndicesBaseCommandsAdds geospatial members with their positions to the specified sorted set stored atkey.
If a member is already a part of the sorted set, its position is updated.
To perform ageoaddoperation while specifying optional parameters, useGeospatialIndicesBaseCommands.geoadd(String, Map, GeoAddOptions).- Specified by:
geoaddin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.membersToGeospatialData- A mapping of member names to their corresponding positions - seeGeospatialData. The command will report an error when the user attempts to index coordinates outside the specified ranges.- Returns:
- The number of elements added to the sorted set.
- See Also:
- valkey.io for more details.
-
geopos
public java.util.concurrent.CompletableFuture<java.lang.Double[][]> geopos(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] members)Description copied from interface:GeospatialIndicesBaseCommandsReturns the positions (longitude,latitude) of all the specifiedmembersof the geospatial index represented by the sorted set atkey.- Specified by:
geoposin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.members- The members for which to get the positions.- Returns:
- A 2D
arraywhich represent positions (longitude and latitude) corresponding to the given members. If a member does not exist, its position will be null. - See Also:
- valkey.io for more details.
-
geopos
public java.util.concurrent.CompletableFuture<java.lang.Double[][]> geopos(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] members)Description copied from interface:GeospatialIndicesBaseCommandsReturns the positions (longitude,latitude) of all the specifiedmembersof the geospatial index represented by the sorted set atkey.- Specified by:
geoposin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.members- The members for which to get the positions.- Returns:
- A 2D
arraywhich represent positions (longitude and latitude) corresponding to the given members. If a member does not exist, its position will be null. - See Also:
- valkey.io for more details.
-
geodist
public java.util.concurrent.CompletableFuture<java.lang.Double> geodist(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String member1, @NonNull @NonNull java.lang.String member2, @NonNull @NonNull GeoUnit geoUnit)Description copied from interface:GeospatialIndicesBaseCommandsReturns the distance betweenmember1andmember2saved in the geospatial index stored atkey.- Specified by:
geodistin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.member1- The name of the first member.member2- The name of the second member.geoUnit- The unit of distance measurement - seeGeoUnit.- Returns:
- The distance between
member1andmember2. If one or both members do not exist, or if the key does not exist, returnsnull. - See Also:
- valkey.io for more details.
-
geodist
public java.util.concurrent.CompletableFuture<java.lang.Double> geodist(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString member1, @NonNull @NonNull GlideString member2, @NonNull @NonNull GeoUnit geoUnit)Description copied from interface:GeospatialIndicesBaseCommandsReturns the distance betweenmember1andmember2saved in the geospatial index stored atkey.- Specified by:
geodistin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.member1- The name of the first member.member2- The name of the second member.geoUnit- The unit of distance measurement - seeGeoUnit.- Returns:
- The distance between
member1andmember2. If one or both members do not exist, or if the key does not exist, returnsnull. - See Also:
- valkey.io for more details.
-
geodist
public java.util.concurrent.CompletableFuture<java.lang.Double> geodist(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String member1, @NonNull @NonNull java.lang.String member2)Description copied from interface:GeospatialIndicesBaseCommandsReturns the distance betweenmember1andmember2saved in the geospatial index stored atkey.- Specified by:
geodistin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.member1- The name of the first member.member2- The name of the second member.- Returns:
- The distance between
member1andmember2. If one or both members do not exist, or if the key does not exist, returnsnull. The default unit is {@see GeoUnit#METERS}. - See Also:
- valkey.io for more details.
-
geodist
public java.util.concurrent.CompletableFuture<java.lang.Double> geodist(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString member1, @NonNull @NonNull GlideString member2)Description copied from interface:GeospatialIndicesBaseCommandsReturns the distance betweenmember1andmember2saved in the geospatial index stored atkey.- Specified by:
geodistin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.member1- The name of the first member.member2- The name of the second member.- Returns:
- The distance between
member1andmember2. If one or both members do not exist, or if the key does not exist, returnsnull. The default unit is {@see GeoUnit#METERS}. - See Also:
- valkey.io for more details.
-
geohash
public java.util.concurrent.CompletableFuture<java.lang.String[]> geohash(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String[] members)Description copied from interface:GeospatialIndicesBaseCommandsReturns theGeoHashstrings representing the positions of all the specifiedmembersin the sorted set stored atkey.- Specified by:
geohashin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.members- The array of members whoseGeoHashstrings are to be retrieved.- Returns:
- An array of
GeoHashstrings representing the positions of the specified members stored atkey. If a member does not exist in the sorted set, anullvalue is returned for that member. - See Also:
- valkey.io for more details.
-
geohash
public java.util.concurrent.CompletableFuture<GlideString[]> geohash(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString[] members)
Description copied from interface:GeospatialIndicesBaseCommandsReturns theGeoHashstrings representing the positions of all the specifiedmembersin the sorted set stored atkey.- Specified by:
geohashin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.members- The array of members whoseGeoHashstrings are to be retrieved.- Returns:
- An array of
GeoHashstrings representing the positions of the specified members stored atkey. If a member does not exist in the sorted set, anullvalue is returned for that member. - See Also:
- valkey.io for more details.
-
bitcount
public java.util.concurrent.CompletableFuture<java.lang.Long> bitcount(@NonNull @NonNull java.lang.String key)Description copied from interface:BitmapBaseCommandsCounts the number of set bits (population counting) in a string stored atkey.- Specified by:
bitcountin interfaceBitmapBaseCommands- Parameters:
key- The key for the string to count the set bits of.- Returns:
- The number of set bits in the string. Returns zero if the key is missing as it is treated as an empty string.
- See Also:
- valkey.io for details.
-
bitcount
public java.util.concurrent.CompletableFuture<java.lang.Long> bitcount(@NonNull @NonNull GlideString key)Description copied from interface:BitmapBaseCommandsCounts the number of set bits (population counting) in a string stored atkey.- Specified by:
bitcountin interfaceBitmapBaseCommands- Parameters:
key- The key for the string to count the set bits of.- Returns:
- The number of set bits in the string. Returns zero if the key is missing as it is treated as an empty string.
- See Also:
- valkey.io for details.
-
bitcount
public java.util.concurrent.CompletableFuture<java.lang.Long> bitcount(@NonNull @NonNull java.lang.String key, long start)Description copied from interface:BitmapBaseCommandsCounts the number of set bits (population counting) in a string stored atkey. The offsetstartis a zero-based index, with0being the first byte of the list,1being the next byte and so on. This offset can also be a negative number indicating offsets starting at the end of the list, with-1being the last byte of the list,-2being the penultimate, and so on.- Specified by:
bitcountin interfaceBitmapBaseCommands- Parameters:
key- The key for the string to count the set bits of.start- The starting offset byte index.- Returns:
- The number of set bits in the string byte interval specified by
startto the last byte. Returns zero if the key is missing as it is treated as an empty string. - See Also:
- valkey.io for details.
-
bitcount
public java.util.concurrent.CompletableFuture<java.lang.Long> bitcount(@NonNull @NonNull GlideString key, long start)Description copied from interface:BitmapBaseCommandsCounts the number of set bits (population counting) in a string stored atkey. The offsetstartis a zero-based index, with0being the first byte of the list,1being the next byte and so on. This offset can also be a negative number indicating offsets starting at the end of the list, with-1being the last byte of the list,-2being the penultimate, and so on.- Specified by:
bitcountin interfaceBitmapBaseCommands- Parameters:
key- The key for the string to count the set bits of.start- The starting offset byte index.- Returns:
- The number of set bits in the string byte interval specified by
startto the last byte. Returns zero if the key is missing as it is treated as an empty string. - See Also:
- valkey.io for details.
-
bitcount
public java.util.concurrent.CompletableFuture<java.lang.Long> bitcount(@NonNull @NonNull java.lang.String key, long start, long end)Description copied from interface:BitmapBaseCommandsCounts the number of set bits (population counting) in a string stored atkey. The offsetsstartandendare zero-based indexes, with0being the first element of the list,1being the next element and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list, with-1being the last element of the list,-2being the penultimate, and so on.- Specified by:
bitcountin interfaceBitmapBaseCommands- Parameters:
key- The key for the string to count the set bits of.start- The starting offset byte index.end- The ending offset byte index.- Returns:
- The number of set bits in the string byte interval specified by
startandend. Returns zero if the key is missing as it is treated as an empty string. - See Also:
- valkey.io for details.
-
bitcount
public java.util.concurrent.CompletableFuture<java.lang.Long> bitcount(@NonNull @NonNull GlideString key, long start, long end)Description copied from interface:BitmapBaseCommandsCounts the number of set bits (population counting) in a string stored atkey. The offsetsstartandendare zero-based indexes, with0being the first element of the list,1being the next element and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list, with-1being the last element of the list,-2being the penultimate, and so on.- Specified by:
bitcountin interfaceBitmapBaseCommands- Parameters:
key- The key for the string to count the set bits of.start- The starting offset byte index.end- The ending offset byte index.- Returns:
- The number of set bits in the string byte interval specified by
startandend. Returns zero if the key is missing as it is treated as an empty string. - See Also:
- valkey.io for details.
-
bitcount
public java.util.concurrent.CompletableFuture<java.lang.Long> bitcount(@NonNull @NonNull java.lang.String key, long start, long end, @NonNull @NonNull BitmapIndexType options)Description copied from interface:BitmapBaseCommandsCounts the number of set bits (population counting) in a string stored atkey. The offsetsstartandendare zero-based indexes, with0being the first element of the list,1being the next element and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list, with-1being the last element of the list,-2being the penultimate, and so on.- Specified by:
bitcountin interfaceBitmapBaseCommands- Parameters:
key- The key for the string to count the set bits of.start- The starting offset.end- The ending offset.options- The index offset type. Could be eitherBitmapIndexType.BITorBitmapIndexType.BYTE.- Returns:
- The number of set bits in the string interval specified by
start,end, andoptions. Returns zero if the key is missing as it is treated as an empty string. - See Also:
- valkey.io for details.
-
bitcount
public java.util.concurrent.CompletableFuture<java.lang.Long> bitcount(@NonNull @NonNull GlideString key, long start, long end, @NonNull @NonNull BitmapIndexType options)Description copied from interface:BitmapBaseCommandsCounts the number of set bits (population counting) in a string stored atkey. The offsetsstartandendare zero-based indexes, with0being the first element of the list,1being the next element and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list, with-1being the last element of the list,-2being the penultimate, and so on.- Specified by:
bitcountin interfaceBitmapBaseCommands- Parameters:
key- The key for the string to count the set bits of.start- The starting offset.end- The ending offset.options- The index offset type. Could be eitherBitmapIndexType.BITorBitmapIndexType.BYTE.- Returns:
- The number of set bits in the string interval specified by
start,end, andoptions. Returns zero if the key is missing as it is treated as an empty string. - See Also:
- valkey.io for details.
-
setbit
public java.util.concurrent.CompletableFuture<java.lang.Long> setbit(@NonNull @NonNull java.lang.String key, long offset, long value)Description copied from interface:BitmapBaseCommandsSets or clears the bit atoffsetin the string value stored atkey. Theoffsetis a zero-based index, with0being the first element of the list,1being the next element, and so on. Theoffsetmust be less than2^32and greater than or equal to0. If a key is non-existent then the bit atoffsetis set tovalueand the preceding bits are set to0.- Specified by:
setbitin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.offset- The index of the bit to be set.value- The bit value to set atoffset. The value must be0or1.- Returns:
- The bit value that was previously stored at
offset. - See Also:
- valkey.io for details.
-
setbit
public java.util.concurrent.CompletableFuture<java.lang.Long> setbit(@NonNull @NonNull GlideString key, long offset, long value)Description copied from interface:BitmapBaseCommandsSets or clears the bit atoffsetin the string value stored atkey. Theoffsetis a zero-based index, with0being the first element of the list,1being the next element, and so on. Theoffsetmust be less than2^32and greater than or equal to0. If a key is non-existent then the bit atoffsetis set tovalueand the preceding bits are set to0.- Specified by:
setbitin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.offset- The index of the bit to be set.value- The bit value to set atoffset. The value must be0or1.- Returns:
- The bit value that was previously stored at
offset. - See Also:
- valkey.io for details.
-
getbit
public java.util.concurrent.CompletableFuture<java.lang.Long> getbit(@NonNull @NonNull java.lang.String key, long offset)Description copied from interface:BitmapBaseCommandsReturns the bit value atoffsetin the string value stored atkey.offsetshould be greater than or equal to zero.- Specified by:
getbitin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.offset- The index of the bit to return.- Returns:
- The bit at offset of the string. Returns zero if the key is empty or if the positive
offsetexceeds the length of the string. - See Also:
- valkey.io for details.
-
getbit
public java.util.concurrent.CompletableFuture<java.lang.Long> getbit(@NonNull @NonNull GlideString key, long offset)Description copied from interface:BitmapBaseCommandsReturns the bit value atoffsetin the string value stored atkey.offsetshould be greater than or equal to zero.- Specified by:
getbitin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.offset- The index of the bit to return.- Returns:
- The bit at offset of the string. Returns zero if the key is empty or if the positive
offsetexceeds the length of the string. - See Also:
- valkey.io for details.
-
bitpos
public java.util.concurrent.CompletableFuture<java.lang.Long> bitpos(@NonNull @NonNull java.lang.String key, long bit)Description copied from interface:BitmapBaseCommandsReturns the position of the first bit matching the givenbitvalue.- Specified by:
bitposin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.bit- The bit value to match. The value must be0or1.- Returns:
- The position of the first occurrence matching
bitin the binary value of the string held atkey. Ifbitis not found, a-1is returned. - See Also:
- valkey.io for details.
-
bitpos
public java.util.concurrent.CompletableFuture<java.lang.Long> bitpos(@NonNull @NonNull GlideString key, long bit)Description copied from interface:BitmapBaseCommandsReturns the position of the first bit matching the givenbitvalue.- Specified by:
bitposin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.bit- The bit value to match. The value must be0or1.- Returns:
- The position of the first occurrence matching
bitin the binary value of the string held atkey. Ifbitis not found, a-1is returned. - See Also:
- valkey.io for details.
-
bitpos
public java.util.concurrent.CompletableFuture<java.lang.Long> bitpos(@NonNull @NonNull java.lang.String key, long bit, long start)Description copied from interface:BitmapBaseCommandsReturns the position of the first bit matching the givenbitvalue. The offsetstartis a zero-based index, with0being the first byte of the list,1being the next byte and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list, with-1being the last byte of the list,-2being the penultimate, and so on.- Specified by:
bitposin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.bit- The bit value to match. The value must be0or1.start- The starting offset.- Returns:
- The position of the first occurrence beginning at the
startoffset of thebitin the binary value of the string held atkey. Ifbitis not found, a-1is returned. - See Also:
- valkey.io for details.
-
bitpos
public java.util.concurrent.CompletableFuture<java.lang.Long> bitpos(@NonNull @NonNull GlideString key, long bit, long start)Description copied from interface:BitmapBaseCommandsReturns the position of the first bit matching the givenbitvalue. The offsetstartis a zero-based index, with0being the first byte of the list,1being the next byte and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list, with-1being the last byte of the list,-2being the penultimate, and so on.- Specified by:
bitposin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.bit- The bit value to match. The value must be0or1.start- The starting offset.- Returns:
- The position of the first occurrence beginning at the
startoffset of thebitin the binary value of the string held atkey. Ifbitis not found, a-1is returned. - See Also:
- valkey.io for details.
-
bitpos
public java.util.concurrent.CompletableFuture<java.lang.Long> bitpos(@NonNull @NonNull java.lang.String key, long bit, long start, long end)Description copied from interface:BitmapBaseCommandsReturns the position of the first bit matching the givenbitvalue. The offsetsstartandendare zero-based indexes, with0being the first byte of the list,1being the next byte and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list, with-1being the last byte of the list,-2being the penultimate, and so on.- Specified by:
bitposin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.bit- The bit value to match. The value must be0or1.start- The starting offset.end- The ending offset.- Returns:
- The position of the first occurrence from the
startto theendoffsets of thebitin the binary value of the string held atkey. Ifbitis not found, a-1is returned. - See Also:
- valkey.io for details.
-
bitpos
public java.util.concurrent.CompletableFuture<java.lang.Long> bitpos(@NonNull @NonNull GlideString key, long bit, long start, long end)Description copied from interface:BitmapBaseCommandsReturns the position of the first bit matching the givenbitvalue. The offsetsstartandendare zero-based indexes, with0being the first byte of the list,1being the next byte and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list, with-1being the last byte of the list,-2being the penultimate, and so on.- Specified by:
bitposin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.bit- The bit value to match. The value must be0or1.start- The starting offset.end- The ending offset.- Returns:
- The position of the first occurrence from the
startto theendoffsets of thebitin the binary value of the string held atkey. Ifbitis not found, a-1is returned. - See Also:
- valkey.io for details.
-
bitpos
public java.util.concurrent.CompletableFuture<java.lang.Long> bitpos(@NonNull @NonNull java.lang.String key, long bit, long start, long end, @NonNull @NonNull BitmapIndexType options)Description copied from interface:BitmapBaseCommandsReturns the position of the first bit matching the givenbitvalue. The offsetoffsetTypespecifies whether the offset is a BIT or BYTE. If BIT is specified,start==0andend==2means to look at the first three bits. If BYTE is specified,start==0andend==2means to look at the first three bytes The offsets are zero-based indexes, with0being the first element of the list,1being the next, and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list, with-1being the last element of the list,-2being the penultimate, and so on.- Specified by:
bitposin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.bit- The bit value to match. The value must be0or1.start- The starting offset.end- The ending offset.options- The index offset type. Could be eitherBitmapIndexType.BITorBitmapIndexType.BYTE.- Returns:
- The position of the first occurrence from the
startto theendoffsets of thebitin the binary value of the string held atkey. Ifbitis not found, a-1is returned. - See Also:
- valkey.io for details.
-
bitpos
public java.util.concurrent.CompletableFuture<java.lang.Long> bitpos(@NonNull @NonNull GlideString key, long bit, long start, long end, @NonNull @NonNull BitmapIndexType options)Description copied from interface:BitmapBaseCommandsReturns the position of the first bit matching the givenbitvalue. The offsetoffsetTypespecifies whether the offset is a BIT or BYTE. If BIT is specified,start==0andend==2means to look at the first three bits. If BYTE is specified,start==0andend==2means to look at the first three bytes The offsets are zero-based indexes, with0being the first element of the list,1being the next, and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list, with-1being the last element of the list,-2being the penultimate, and so on.- Specified by:
bitposin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.bit- The bit value to match. The value must be0or1.start- The starting offset.end- The ending offset.options- The index offset type. Could be eitherBitmapIndexType.BITorBitmapIndexType.BYTE.- Returns:
- The position of the first occurrence from the
startto theendoffsets of thebitin the binary value of the string held atkey. Ifbitis not found, a-1is returned. - See Also:
- valkey.io for details.
-
bitop
public java.util.concurrent.CompletableFuture<java.lang.Long> bitop(@NonNull @NonNull BitwiseOperation bitwiseOperation, @NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String[] keys)Description copied from interface:BitmapBaseCommandsPerform a bitwise operation between multiple keys (containing string values) and store the result in thedestination.- Specified by:
bitopin interfaceBitmapBaseCommands- Parameters:
bitwiseOperation- The bitwise operation to perform.destination- The key that will store the resulting string.keys- The list of keys to perform the bitwise operation on.- Returns:
- The size of the string stored in
destination. - See Also:
- valkey.io for details.
-
bitop
public java.util.concurrent.CompletableFuture<java.lang.Long> bitop(@NonNull @NonNull BitwiseOperation bitwiseOperation, @NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString[] keys)Description copied from interface:BitmapBaseCommandsPerform a bitwise operation between multiple keys (containing string values) and store the result in thedestination.- Specified by:
bitopin interfaceBitmapBaseCommands- Parameters:
bitwiseOperation- The bitwise operation to perform.destination- The key that will store the resulting string.keys- The list of keys to perform the bitwise operation on.- Returns:
- The size of the string stored in
destination. - See Also:
- valkey.io for details.
-
lmpop
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[]>> lmpop(@NonNull @NonNull java.lang.String[] keys, @NonNull @NonNull ListDirection direction, long count)Description copied from interface:ListBaseCommandsPops one or more elements from the first non-empty list from the providedkeys.- Specified by:
lmpopin interfaceListBaseCommands- Parameters:
keys- An array of keys to lists.direction- The direction based on which elements are popped from - seeListDirection.count- The maximum number of popped elements.- Returns:
- A
Mapofkeyname mapped array of popped elements. If no member could be popped, returnsnull. - See Also:
- valkey.io for details.
-
lmpop
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[]>> lmpop(@NonNull @NonNull GlideString[] keys, @NonNull @NonNull ListDirection direction, long count)
Description copied from interface:ListBaseCommandsPops one or more elements from the first non-empty list from the providedkeys.- Specified by:
lmpopin interfaceListBaseCommands- Parameters:
keys- An array of keys to lists.direction- The direction based on which elements are popped from - seeListDirection.count- The maximum number of popped elements.- Returns:
- A
Mapofkeyname mapped array of popped elements. If no member could be popped, returnsnull. - See Also:
- valkey.io for details.
-
lmpop
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[]>> lmpop(@NonNull @NonNull java.lang.String[] keys, @NonNull @NonNull ListDirection direction)Description copied from interface:ListBaseCommandsPops one element from the first non-empty list from the providedkeys.- Specified by:
lmpopin interfaceListBaseCommands- Parameters:
keys- An array of keys to lists.direction- The direction based on which elements are popped from - seeListDirection.- Returns:
- A
Mapofkeyname mapped array of the popped element. If no member could be popped, returnsnull. - See Also:
- valkey.io for details.
-
lmpop
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[]>> lmpop(@NonNull @NonNull GlideString[] keys, @NonNull @NonNull ListDirection direction)
Description copied from interface:ListBaseCommandsPops one element from the first non-empty list from the providedkeys.- Specified by:
lmpopin interfaceListBaseCommands- Parameters:
keys- An array of keys to lists.direction- The direction based on which elements are popped from - seeListDirection.- Returns:
- A
Mapofkeyname mapped array of the popped element. If no member could be popped, returnsnull. - See Also:
- valkey.io for details.
-
blmpop
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[]>> blmpop(@NonNull @NonNull java.lang.String[] keys, @NonNull @NonNull ListDirection direction, long count, double timeout)Description copied from interface:ListBaseCommandsBlocks the connection until it pops one or more elements from the first non-empty list from the providedkeysBLMPOPis the blocking variant ofListBaseCommands.lmpop(String[], ListDirection, long).- Specified by:
blmpopin interfaceListBaseCommands- Parameters:
keys- An array of keys to lists.direction- The direction based on which elements are popped from - seeListDirection.count- The maximum number of popped elements.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- A
Mapofkeyname mapped array of popped elements.
If no member could be popped and the timeout expired, returnsnull. - See Also:
- valkey.io for details.
-
blmpop
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[]>> blmpop(@NonNull @NonNull GlideString[] keys, @NonNull @NonNull ListDirection direction, long count, double timeout)
Description copied from interface:ListBaseCommandsBlocks the connection until it pops one or more elements from the first non-empty list from the providedkeysBLMPOPis the blocking variant ofListBaseCommands.lmpop(String[], ListDirection, long).- Specified by:
blmpopin interfaceListBaseCommands- Parameters:
keys- An array of keys to lists.direction- The direction based on which elements are popped from - seeListDirection.count- The maximum number of popped elements.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- A
Mapofkeyname mapped array of popped elements.
If no member could be popped and the timeout expired, returnsnull. - See Also:
- valkey.io for details.
-
blmpop
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String[]>> blmpop(@NonNull @NonNull java.lang.String[] keys, @NonNull @NonNull ListDirection direction, double timeout)Description copied from interface:ListBaseCommandsBlocks the connection until it pops one element from the first non-empty list from the providedkeysBLMPOPis the blocking variant ofListBaseCommands.lmpop(String[], ListDirection).- Specified by:
blmpopin interfaceListBaseCommands- Parameters:
keys- An array of keys to lists.direction- The direction based on which elements are popped from - seeListDirection.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- A
Mapofkeyname mapped array of the popped element.
If no member could be popped and the timeout expired, returnsnull. - See Also:
- valkey.io for details.
-
blmpop
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,GlideString[]>> blmpop(@NonNull @NonNull GlideString[] keys, @NonNull @NonNull ListDirection direction, double timeout)
Description copied from interface:ListBaseCommandsBlocks the connection until it pops one element from the first non-empty list from the providedkeysBLMPOPis the blocking variant ofListBaseCommands.lmpop(String[], ListDirection).- Specified by:
blmpopin interfaceListBaseCommands- Parameters:
keys- An array of keys to lists.direction- The direction based on which elements are popped from - seeListDirection.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- A
Mapofkeyname mapped array of the popped element.
If no member could be popped and the timeout expired, returnsnull. - See Also:
- valkey.io for details.
-
lset
public java.util.concurrent.CompletableFuture<java.lang.String> lset(@NonNull @NonNull java.lang.String key, long index, @NonNull @NonNull java.lang.String element)Description copied from interface:ListBaseCommandsSets the list element atindextoelement.
The index is zero-based, so0means the first element,1the second element and so on. Negative indices can be used to designate elements starting at the tail of the list. Here,-1means the last element,-2means the penultimate and so forth.- Specified by:
lsetin interfaceListBaseCommands- Parameters:
key- The key of the list.index- The index of the element in the list to be set.- Returns:
OK.- See Also:
- valkey.io for details.
-
lset
public java.util.concurrent.CompletableFuture<java.lang.String> lset(@NonNull @NonNull GlideString key, long index, @NonNull @NonNull GlideString element)Description copied from interface:ListBaseCommandsSets the list element atindextoelement.
The index is zero-based, so0means the first element,1the second element and so on. Negative indices can be used to designate elements starting at the tail of the list. Here,-1means the last element,-2means the penultimate and so forth.- Specified by:
lsetin interfaceListBaseCommands- Parameters:
key- The key of the list.index- The index of the element in the list to be set.- Returns:
OK.- See Also:
- valkey.io for details.
-
lmove
public java.util.concurrent.CompletableFuture<java.lang.String> lmove(@NonNull @NonNull java.lang.String source, @NonNull @NonNull java.lang.String destination, @NonNull @NonNull ListDirection wherefrom, @NonNull @NonNull ListDirection whereto)Description copied from interface:ListBaseCommandsAtomically pops and removes the left/right-most element to the list stored atsourcedepending onwherefrom, and pushes the element at the first/last element of the list stored atdestinationdepending onwherefrom.- Specified by:
lmovein interfaceListBaseCommands- Parameters:
source- The key to the source list.destination- The key to the destination list.wherefrom- TheListDirectionthe element should be removed from.whereto- TheListDirectionthe element should be added to.- Returns:
- The popped element or
nullifsourcedoes not exist. - See Also:
- valkey.io for details.
-
lmove
public java.util.concurrent.CompletableFuture<GlideString> lmove(@NonNull @NonNull GlideString source, @NonNull @NonNull GlideString destination, @NonNull @NonNull ListDirection wherefrom, @NonNull @NonNull ListDirection whereto)
Description copied from interface:ListBaseCommandsAtomically pops and removes the left/right-most element to the list stored atsourcedepending onwherefrom, and pushes the element at the first/last element of the list stored atdestinationdepending onwherefrom.- Specified by:
lmovein interfaceListBaseCommands- Parameters:
source- The key to the source list.destination- The key to the destination list.wherefrom- TheListDirectionthe element should be removed from.whereto- TheListDirectionthe element should be added to.- Returns:
- The popped element or
nullifsourcedoes not exist. - See Also:
- valkey.io for details.
-
blmove
public java.util.concurrent.CompletableFuture<java.lang.String> blmove(@NonNull @NonNull java.lang.String source, @NonNull @NonNull java.lang.String destination, @NonNull @NonNull ListDirection wherefrom, @NonNull @NonNull ListDirection whereto, double timeout)Description copied from interface:ListBaseCommandsBlocks the connection until it pops atomically and removes the left/right-most element to the list stored atsourcedepending onwherefrom, and pushes the element at the first/last element of the list stored atdestinationdepending onwherefrom.
BLMoveis the blocking variant ofListBaseCommands.lmove(String, String, ListDirection, ListDirection).- Specified by:
blmovein interfaceListBaseCommands- Parameters:
source- The key to the source list.destination- The key to the destination list.wherefrom- TheListDirectionthe element should be removed from.whereto- TheListDirectionthe element should be added to.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- The popped element or
nullifsourcedoes not exist or if the operation timed-out. - See Also:
- valkey.io for details.
-
blmove
public java.util.concurrent.CompletableFuture<GlideString> blmove(@NonNull @NonNull GlideString source, @NonNull @NonNull GlideString destination, @NonNull @NonNull ListDirection wherefrom, @NonNull @NonNull ListDirection whereto, double timeout)
Description copied from interface:ListBaseCommandsBlocks the connection until it pops atomically and removes the left/right-most element to the list stored atsourcedepending onwherefrom, and pushes the element at the first/last element of the list stored atdestinationdepending onwherefrom.
BLMoveis the blocking variant ofListBaseCommands.lmove(String, String, ListDirection, ListDirection).- Specified by:
blmovein interfaceListBaseCommands- Parameters:
source- The key to the source list.destination- The key to the destination list.wherefrom- TheListDirectionthe element should be removed from.whereto- TheListDirectionthe element should be added to.timeout- The number of seconds to wait for a blocking operation to complete. A value of0will block indefinitely.- Returns:
- The popped element or
nullifsourcedoes not exist or if the operation timed-out. - See Also:
- valkey.io for details.
-
srandmember
public java.util.concurrent.CompletableFuture<java.lang.String> srandmember(@NonNull @NonNull java.lang.String key)Description copied from interface:SetBaseCommandsReturns a random element from the set value stored atkey.- Specified by:
srandmemberin interfaceSetBaseCommands- Parameters:
key- The key from which to retrieve the set member.- Returns:
- A random element from the set, or
nullifkeydoes not exist. - See Also:
- valkey.io for details.
-
srandmember
public java.util.concurrent.CompletableFuture<GlideString> srandmember(@NonNull @NonNull GlideString key)
Description copied from interface:SetBaseCommandsReturns a random element from the set value stored atkey.- Specified by:
srandmemberin interfaceSetBaseCommands- Parameters:
key- The key from which to retrieve the set member.- Returns:
- A random element from the set, or
nullifkeydoes not exist. - See Also:
- valkey.io for details.
-
srandmember
public java.util.concurrent.CompletableFuture<java.lang.String[]> srandmember(@NonNull @NonNull java.lang.String key, long count)Description copied from interface:SetBaseCommandsReturns one or more random elements from the set value stored atkey.- Specified by:
srandmemberin interfaceSetBaseCommands- Parameters:
key- The key from which to retrieve the set members.count- The number of elements to return.
Ifcountis positive, returns unique elements.
If negative, allows for duplicates.- Returns:
- An
arrayof elements from the set, or an emptyarrayifkeydoes not exist. - See Also:
- valkey.io for details.
-
srandmember
public java.util.concurrent.CompletableFuture<GlideString[]> srandmember(@NonNull @NonNull GlideString key, long count)
Description copied from interface:SetBaseCommandsReturns one or more random elements from the set value stored atkey.- Specified by:
srandmemberin interfaceSetBaseCommands- Parameters:
key- The key from which to retrieve the set members.count- The number of elements to return.
Ifcountis positive, returns unique elements.
If negative, allows for duplicates.- Returns:
- An
arrayof elements from the set, or an emptyarrayifkeydoes not exist. - See Also:
- valkey.io for details.
-
spop
public java.util.concurrent.CompletableFuture<java.lang.String> spop(@NonNull @NonNull java.lang.String key)Description copied from interface:SetBaseCommandsRemoves and returns one random member from the set stored atkey.- Specified by:
spopin interfaceSetBaseCommands- Parameters:
key- The key of the set.- Returns:
- The value of the popped member.
Ifkeydoes not exist,nullwill be returned. - See Also:
- valkey.io for details.
-
spop
public java.util.concurrent.CompletableFuture<GlideString> spop(@NonNull @NonNull GlideString key)
Description copied from interface:SetBaseCommandsRemoves and returns one random member from the set stored atkey.- Specified by:
spopin interfaceSetBaseCommands- Parameters:
key- The key of the set.- Returns:
- The value of the popped member.
Ifkeydoes not exist,nullwill be returned. - See Also:
- valkey.io for details.
-
spopCount
public java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>> spopCount(@NonNull @NonNull java.lang.String key, long count)Description copied from interface:SetBaseCommandsRemoves and returns up tocountrandom members from the set stored atkey, depending on the set's length.- Specified by:
spopCountin interfaceSetBaseCommands- Parameters:
key- The key of the set.count- The count of the elements to pop from the set.- Returns:
- A set of popped elements will be returned depending on the set's length.
Ifkeydoes not exist, an emptySetwill be returned. - See Also:
- valkey.io for details.
-
spopCount
public java.util.concurrent.CompletableFuture<java.util.Set<GlideString>> spopCount(@NonNull @NonNull GlideString key, long count)
Description copied from interface:SetBaseCommandsRemoves and returns up tocountrandom members from the set stored atkey, depending on the set's length.- Specified by:
spopCountin interfaceSetBaseCommands- Parameters:
key- The key of the set.count- The count of the elements to pop from the set.- Returns:
- A set of popped elements will be returned depending on the set's length.
Ifkeydoes not exist, an emptySetwill be returned. - See Also:
- valkey.io for details.
-
bitfield
public java.util.concurrent.CompletableFuture<java.lang.Long[]> bitfield(@NonNull @NonNull java.lang.String key, @NonNull @NonNull BitFieldOptions.BitFieldSubCommands[] subCommands)Description copied from interface:BitmapBaseCommandsReads or modifies the array of bits representing the string that is held atkeybased on the specifiedsubCommands.- Specified by:
bitfieldin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.subCommands- The subCommands to be performed on the binary value of the string atkey, which could be any of the following:- Returns:
- An
arrayof results from the executed subcommands.BitFieldOptions.BitFieldGetreturns the value inBitFieldOptions.OffsetorBitFieldOptions.OffsetMultiplier.BitFieldOptions.BitFieldSetreturns the old value inBitFieldOptions.OffsetorBitFieldOptions.OffsetMultiplier.BitFieldOptions.BitFieldIncrbyreturns the new value inBitFieldOptions.OffsetorBitFieldOptions.OffsetMultiplier.BitFieldOptions.BitFieldOverflowdetermines the behaviour ofSETandINCRBYwhen an overflow occurs.OVERFLOWdoes not return a value and does not contribute a value to the array response.
- See Also:
- valkey.io for details.
-
bitfield
public java.util.concurrent.CompletableFuture<java.lang.Long[]> bitfield(@NonNull @NonNull GlideString key, @NonNull @NonNull BitFieldOptions.BitFieldSubCommands[] subCommands)Description copied from interface:BitmapBaseCommandsReads or modifies the array of bits representing the string that is held atkeybased on the specifiedsubCommands.- Specified by:
bitfieldin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.subCommands- The subCommands to be performed on the binary value of the string atkey, which could be any of the following:- Returns:
- An
arrayof results from the executed subcommands.BitFieldOptions.BitFieldGetreturns the value inBitFieldOptions.OffsetorBitFieldOptions.OffsetMultiplier.BitFieldOptions.BitFieldSetreturns the old value inBitFieldOptions.OffsetorBitFieldOptions.OffsetMultiplier.BitFieldOptions.BitFieldIncrbyreturns the new value inBitFieldOptions.OffsetorBitFieldOptions.OffsetMultiplier.BitFieldOptions.BitFieldOverflowdetermines the behaviour ofSETandINCRBYwhen an overflow occurs.OVERFLOWdoes not return a value and does not contribute a value to the array response.
- See Also:
- valkey.io for details.
-
bitfieldReadOnly
public java.util.concurrent.CompletableFuture<java.lang.Long[]> bitfieldReadOnly(@NonNull @NonNull java.lang.String key, @NonNull @NonNull BitFieldOptions.BitFieldReadOnlySubCommands[] subCommands)Description copied from interface:BitmapBaseCommandsReads the array of bits representing the string that is held atkeybased on the specifiedsubCommands.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
bitfieldReadOnlyin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.subCommands- TheGETsubCommands to be performed.- Returns:
- An array of results from the
GETsubcommands. - See Also:
- valkey.io for details.
-
bitfieldReadOnly
public java.util.concurrent.CompletableFuture<java.lang.Long[]> bitfieldReadOnly(@NonNull @NonNull GlideString key, @NonNull @NonNull BitFieldOptions.BitFieldReadOnlySubCommands[] subCommands)Description copied from interface:BitmapBaseCommandsReads the array of bits representing the string that is held atkeybased on the specifiedsubCommands.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
bitfieldReadOnlyin interfaceBitmapBaseCommands- Parameters:
key- The key of the string.subCommands- TheGETsubCommands to be performed.- Returns:
- An array of results from the
GETsubcommands. - See Also:
- valkey.io for details.
-
sintercard
public java.util.concurrent.CompletableFuture<java.lang.Long> sintercard(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:SetBaseCommandsGets the cardinality of the intersection of all the given sets.- Specified by:
sintercardin interfaceSetBaseCommands- Parameters:
keys- The keys of the sets.- Returns:
- The cardinality of the intersection result. If one or more sets do not exist,
0is returned. - See Also:
- valkey.io for details.
-
sintercard
public java.util.concurrent.CompletableFuture<java.lang.Long> sintercard(@NonNull @NonNull GlideString[] keys)Description copied from interface:SetBaseCommandsGets the cardinality of the intersection of all the given sets.- Specified by:
sintercardin interfaceSetBaseCommands- Parameters:
keys- The keys of the sets.- Returns:
- The cardinality of the intersection result. If one or more sets do not exist,
0is returned. - See Also:
- valkey.io for details.
-
sintercard
public java.util.concurrent.CompletableFuture<java.lang.Long> sintercard(@NonNull @NonNull java.lang.String[] keys, long limit)Description copied from interface:SetBaseCommandsGets the cardinality of the intersection of all the given sets.- Specified by:
sintercardin interfaceSetBaseCommands- Parameters:
keys- The keys of the sets.limit- The limit for the intersection cardinality value.- Returns:
- The cardinality of the intersection result. If one or more sets do not exist,
0is returned. If the intersection cardinality reacheslimitpartway through the computation, returnslimitas the cardinality. - See Also:
- valkey.io for details.
-
sintercard
public java.util.concurrent.CompletableFuture<java.lang.Long> sintercard(@NonNull @NonNull GlideString[] keys, long limit)Description copied from interface:SetBaseCommandsGets the cardinality of the intersection of all the given sets.- Specified by:
sintercardin interfaceSetBaseCommands- Parameters:
keys- The keys of the sets.limit- The limit for the intersection cardinality value.- Returns:
- The cardinality of the intersection result. If one or more sets do not exist,
0is returned. If the intersection cardinality reacheslimitpartway through the computation, returnslimitas the cardinality. - See Also:
- valkey.io for details.
-
fcall
public java.util.concurrent.CompletableFuture<java.lang.Object> fcall(@NonNull @NonNull java.lang.String function, @NonNull @NonNull java.lang.String[] keys, @NonNull @NonNull java.lang.String[] arguments)Description copied from interface:ScriptingAndFunctionsBaseCommandsInvokes a previously loaded function.
This command is routed to primary nodes only.
To route to a replica please refer toScriptingAndFunctionsBaseCommands.fcallReadOnly(java.lang.String, java.lang.String[], java.lang.String[]).- Specified by:
fcallin interfaceScriptingAndFunctionsBaseCommands- Parameters:
function- The function name.keys- Anarrayof keys accessed by the function. To ensure the correct execution of functions, both in standalone and clustered deployments, all names of keys that a function accesses must be explicitly provided askeys.arguments- Anarrayoffunctionarguments.argumentsshould not represent names of keys.- Returns:
- The invoked function's return value.
- See Also:
- valkey.io for details.
-
fcall
public java.util.concurrent.CompletableFuture<java.lang.Object> fcall(@NonNull @NonNull GlideString function, @NonNull @NonNull GlideString[] keys, @NonNull @NonNull GlideString[] arguments)Description copied from interface:ScriptingAndFunctionsBaseCommandsInvokes a previously loaded function.
This command is routed to primary nodes only.
To route to a replica please refer toScriptingAndFunctionsBaseCommands.fcallReadOnly(java.lang.String, java.lang.String[], java.lang.String[]).- Specified by:
fcallin interfaceScriptingAndFunctionsBaseCommands- Parameters:
function- The function name.keys- Anarrayof keys accessed by the function. To ensure the correct execution of functions, both in standalone and clustered deployments, all names of keys that a function accesses must be explicitly provided askeys.arguments- Anarrayoffunctionarguments.argumentsshould not represent names of keys.- Returns:
- The invoked function's return value.
- See Also:
- valkey.io for details.
-
fcallReadOnly
public java.util.concurrent.CompletableFuture<java.lang.Object> fcallReadOnly(@NonNull @NonNull java.lang.String function, @NonNull @NonNull java.lang.String[] keys, @NonNull @NonNull java.lang.String[] arguments)Description copied from interface:ScriptingAndFunctionsBaseCommandsInvokes a previously loaded read-only function.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
fcallReadOnlyin interfaceScriptingAndFunctionsBaseCommands- Parameters:
function- The function name.keys- Anarrayof keys accessed by the function. To ensure the correct execution of functions, both in standalone and clustered deployments, all names of keys that a function accesses must be explicitly provided askeys.arguments- Anarrayoffunctionarguments.argumentsshould not represent names of keys.- Returns:
- The invoked function's return value.
- See Also:
- valkey.io for details.
-
fcallReadOnly
public java.util.concurrent.CompletableFuture<java.lang.Object> fcallReadOnly(@NonNull @NonNull GlideString function, @NonNull @NonNull GlideString[] keys, @NonNull @NonNull GlideString[] arguments)Description copied from interface:ScriptingAndFunctionsBaseCommandsInvokes a previously loaded read-only function.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
fcallReadOnlyin interfaceScriptingAndFunctionsBaseCommands- Parameters:
function- The function name.keys- Anarrayof keys accessed by the function. To ensure the correct execution of functions, both in standalone and clustered deployments, all names of keys that a function accesses must be explicitly provided askeys.arguments- Anarrayoffunctionarguments.argumentsshould not represent names of keys.- Returns:
- The invoked function's return value.
- See Also:
- valkey.io for details.
-
evalReadOnly
public java.util.concurrent.CompletableFuture<java.lang.Object> evalReadOnly(@NonNull @NonNull java.lang.String script)Description copied from interface:ScriptingAndFunctionsBaseCommandsExecutes a read-only Lua script.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
evalReadOnlyin interfaceScriptingAndFunctionsBaseCommands- Parameters:
script- The Lua script to execute.- Returns:
- A value that depends on the script that was executed.
- See Also:
- valkey.io for details.
-
evalReadOnly
public java.util.concurrent.CompletableFuture<java.lang.Object> evalReadOnly(@NonNull @NonNull java.lang.String script, @NonNull @NonNull java.lang.String[] keys, @NonNull @NonNull java.lang.String[] args)Description copied from interface:ScriptingAndFunctionsBaseCommandsExecutes a read-only Lua script with keys and arguments.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
evalReadOnlyin interfaceScriptingAndFunctionsBaseCommands- Parameters:
script- The Lua script to execute.keys- An array of keys accessed by the script.args- An array of script arguments.- Returns:
- A value that depends on the script that was executed.
- See Also:
- valkey.io for details.
-
evalReadOnly
public java.util.concurrent.CompletableFuture<java.lang.Object> evalReadOnly(@NonNull @NonNull GlideString script)Description copied from interface:ScriptingAndFunctionsBaseCommandsExecutes a read-only Lua script.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
evalReadOnlyin interfaceScriptingAndFunctionsBaseCommands- Parameters:
script- The Lua script to execute.- Returns:
- A value that depends on the script that was executed.
- See Also:
- valkey.io for details.
-
evalReadOnly
public java.util.concurrent.CompletableFuture<java.lang.Object> evalReadOnly(@NonNull @NonNull GlideString script, @NonNull @NonNull GlideString[] keys, @NonNull @NonNull GlideString[] args)Description copied from interface:ScriptingAndFunctionsBaseCommandsExecutes a read-only Lua script with keys and arguments.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
evalReadOnlyin interfaceScriptingAndFunctionsBaseCommands- Parameters:
script- The Lua script to execute.keys- An array of keys accessed by the script.args- An array of script arguments.- Returns:
- A value that depends on the script that was executed.
- See Also:
- valkey.io for details.
-
evalshaReadOnly
public java.util.concurrent.CompletableFuture<java.lang.Object> evalshaReadOnly(@NonNull @NonNull java.lang.String sha1)Description copied from interface:ScriptingAndFunctionsBaseCommandsExecutes a read-only Lua script by its SHA1 digest.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
evalshaReadOnlyin interfaceScriptingAndFunctionsBaseCommands- Parameters:
sha1- The SHA1 digest of the script to execute.- Returns:
- A value that depends on the script that was executed.
- See Also:
- valkey.io for details.
-
evalshaReadOnly
public java.util.concurrent.CompletableFuture<java.lang.Object> evalshaReadOnly(@NonNull @NonNull java.lang.String sha1, @NonNull @NonNull java.lang.String[] keys, @NonNull @NonNull java.lang.String[] args)Description copied from interface:ScriptingAndFunctionsBaseCommandsExecutes a read-only Lua script by its SHA1 digest with keys and arguments.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
evalshaReadOnlyin interfaceScriptingAndFunctionsBaseCommands- Parameters:
sha1- The SHA1 digest of the script to execute.keys- An array of keys accessed by the script.args- An array of script arguments.- Returns:
- A value that depends on the script that was executed.
- See Also:
- valkey.io for details.
-
evalshaReadOnly
public java.util.concurrent.CompletableFuture<java.lang.Object> evalshaReadOnly(@NonNull @NonNull GlideString sha1)Description copied from interface:ScriptingAndFunctionsBaseCommandsExecutes a read-only Lua script by its SHA1 digest.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
evalshaReadOnlyin interfaceScriptingAndFunctionsBaseCommands- Parameters:
sha1- The SHA1 digest of the script to execute.- Returns:
- A value that depends on the script that was executed.
- See Also:
- valkey.io for details.
-
evalshaReadOnly
public java.util.concurrent.CompletableFuture<java.lang.Object> evalshaReadOnly(@NonNull @NonNull GlideString sha1, @NonNull @NonNull GlideString[] keys, @NonNull @NonNull GlideString[] args)Description copied from interface:ScriptingAndFunctionsBaseCommandsExecutes a read-only Lua script by its SHA1 digest with keys and arguments.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
evalshaReadOnlyin interfaceScriptingAndFunctionsBaseCommands- Parameters:
sha1- The SHA1 digest of the script to execute.keys- An array of keys accessed by the script.args- An array of script arguments.- Returns:
- A value that depends on the script that was executed.
- See Also:
- valkey.io for details.
-
scriptDebug
public java.util.concurrent.CompletableFuture<java.lang.String> scriptDebug(@NonNull @NonNull ScriptDebugMode mode)Description copied from interface:ScriptingAndFunctionsBaseCommandsSets the debugging mode for executed scripts.- Specified by:
scriptDebugin interfaceScriptingAndFunctionsBaseCommands- Parameters:
mode- The debugging mode to set.- Returns:
OK.- See Also:
- valkey.io for details.
-
copy
public java.util.concurrent.CompletableFuture<java.lang.Boolean> copy(@NonNull @NonNull java.lang.String source, @NonNull @NonNull java.lang.String destination, boolean replace)Description copied from interface:GenericBaseCommandsCopies the value stored at thesourceto thedestinationkey. Whenreplaceis true, removes thedestinationkey first if it already exists, otherwise performs no action.- Specified by:
copyin interfaceGenericBaseCommands- Parameters:
source- The key to the source value.destination- The key where the value should be copied to.replace- If the destination key should be removed before copying the value to it.- Returns:
trueifsourcewas copied,falseifsourcewas not copied.- See Also:
- valkey.io for details.
-
copy
public java.util.concurrent.CompletableFuture<java.lang.Boolean> copy(@NonNull @NonNull GlideString source, @NonNull @NonNull GlideString destination, boolean replace)Description copied from interface:GenericBaseCommandsCopies the value stored at thesourceto thedestinationkey. Whenreplaceis true, removes thedestinationkey first if it already exists, otherwise performs no action.- Specified by:
copyin interfaceGenericBaseCommands- Parameters:
source- The key to the source value.destination- The key where the value should be copied to.replace- If the destination key should be removed before copying the value to it.- Returns:
trueifsourcewas copied,falseifsourcewas not copied.- See Also:
- valkey.io for details.
-
copy
public java.util.concurrent.CompletableFuture<java.lang.Boolean> copy(@NonNull @NonNull java.lang.String source, @NonNull @NonNull java.lang.String destination)Description copied from interface:GenericBaseCommandsCopies the value stored at thesourceto thedestinationkey if thedestinationkey does not yet exist.- Specified by:
copyin interfaceGenericBaseCommands- Parameters:
source- The key to the source value.destination- The key where the value should be copied to.- Returns:
trueifsourcewas copied,falseifsourcewas not copied.- See Also:
- valkey.io for details.
-
copy
public java.util.concurrent.CompletableFuture<java.lang.Boolean> copy(@NonNull @NonNull GlideString source, @NonNull @NonNull GlideString destination)Description copied from interface:GenericBaseCommandsCopies the value stored at thesourceto thedestinationkey if thedestinationkey does not yet exist.- Specified by:
copyin interfaceGenericBaseCommands- Parameters:
source- The key to the source value.destination- The key where the value should be copied to.- Returns:
trueifsourcewas copied,falseifsourcewas not copied.- See Also:
- valkey.io for details.
-
copy
public java.util.concurrent.CompletableFuture<java.lang.Boolean> copy(@NonNull @NonNull java.lang.String source, @NonNull @NonNull java.lang.String destination, long destinationDB)Description copied from interface:GenericBaseCommandsCopies the value stored at thesourceto thedestinationkey ondestinationDB. Whenreplaceis true, removes thedestinationkey first if it already exists, otherwise performs no action.- Specified by:
copyin interfaceGenericBaseCommands- Parameters:
source- The key to the source value.destination- The key where the value should be copied to.destinationDB- The alternative logical database index for the destination key.- Returns:
trueifsourcewas copied,falseifsourcewas not copied.- See Also:
- valkey.io for details.
-
copy
public java.util.concurrent.CompletableFuture<java.lang.Boolean> copy(@NonNull @NonNull GlideString source, @NonNull @NonNull GlideString destination, long destinationDB)Description copied from interface:GenericBaseCommandsCopies the value stored at thesourceto thedestinationkey ondestinationDB. Whenreplaceis true, removes thedestinationkey first if it already exists, otherwise performs no action.- Specified by:
copyin interfaceGenericBaseCommands- Parameters:
source- The key to the source value.destination- The key where the value should be copied to.destinationDB- The alternative logical database index for the destination key.- Returns:
trueifsourcewas copied,falseifsourcewas not copied.- See Also:
- valkey.io for details.
-
copy
public java.util.concurrent.CompletableFuture<java.lang.Boolean> copy(@NonNull @NonNull java.lang.String source, @NonNull @NonNull java.lang.String destination, long destinationDB, boolean replace)Description copied from interface:GenericBaseCommandsCopies the value stored at thesourceto thedestinationkey ondestinationDB. Whenreplaceis true, removes thedestinationkey first if it already exists, otherwise performs no action.- Specified by:
copyin interfaceGenericBaseCommands- Parameters:
source- The key to the source value.destination- The key where the value should be copied to.destinationDB- The alternative logical database index for the destination key.replace- If the destination key should be removed before copying the value to it.- Returns:
trueifsourcewas copied,falseifsourcewas not copied.- See Also:
- valkey.io for details.
-
copy
public java.util.concurrent.CompletableFuture<java.lang.Boolean> copy(@NonNull @NonNull GlideString source, @NonNull @NonNull GlideString destination, long destinationDB, boolean replace)Description copied from interface:GenericBaseCommandsCopies the value stored at thesourceto thedestinationkey ondestinationDB. Whenreplaceis true, removes thedestinationkey first if it already exists, otherwise performs no action.- Specified by:
copyin interfaceGenericBaseCommands- Parameters:
source- The key to the source value.destination- The key where the value should be copied to.destinationDB- The alternative logical database index for the destination key.replace- If the destination key should be removed before copying the value to it.- Returns:
trueifsourcewas copied,falseifsourcewas not copied.- See Also:
- valkey.io for details.
-
msetnx
public java.util.concurrent.CompletableFuture<java.lang.Boolean> msetnx(@NonNull @NonNull java.util.Map<java.lang.String,java.lang.String> keyValueMap)Description copied from interface:StringBaseCommandsSets multiple keys to values if the key does not exist. The operation is atomic, and if one or more keys already exist, the entire operation fails.- Specified by:
msetnxin interfaceStringBaseCommands- Parameters:
keyValueMap- A key-value map consisting of keys and their respective values to set.- Returns:
trueif all keys were set.falseif no key was set.- See Also:
- valkey.io for details.
-
msetnxBinary
public java.util.concurrent.CompletableFuture<java.lang.Boolean> msetnxBinary(@NonNull @NonNull java.util.Map<GlideString,GlideString> keyValueMap)Description copied from interface:StringBaseCommandsSets multiple keys to values if the key does not exist. The operation is atomic, and if one or more keys already exist, the entire operation fails.- Specified by:
msetnxBinaryin interfaceStringBaseCommands- Parameters:
keyValueMap- A key-value map consisting of keys and their respective values to set.- Returns:
trueif all keys were set.falseif no key was set.- See Also:
- valkey.io for details.
-
lcs
public java.util.concurrent.CompletableFuture<java.lang.String> lcs(@NonNull @NonNull java.lang.String key1, @NonNull @NonNull java.lang.String key2)Description copied from interface:StringBaseCommandsReturns all the longest common subsequences combined between strings stored atkey1andkey2.- Specified by:
lcsin interfaceStringBaseCommands- Parameters:
key1- The key that stores the first string.key2- The key that stores the second string.- Returns:
- A
Stringcontaining all the longest common subsequences combined between the 2 strings. An emptyStringis returned if the keys do not exist or have no common subsequences. - See Also:
- valkey.io for details.
-
lcs
public java.util.concurrent.CompletableFuture<GlideString> lcs(@NonNull @NonNull GlideString key1, @NonNull @NonNull GlideString key2)
Description copied from interface:StringBaseCommandsReturns all the longest common subsequences combined between strings stored atkey1andkey2.- Specified by:
lcsin interfaceStringBaseCommands- Parameters:
key1- The key that stores the first string.key2- The key that stores the second string.- Returns:
- A
Stringcontaining all the longest common subsequences combined between the 2 strings. An emptyGlideStringis returned if the keys do not exist or have no common subsequences. - See Also:
- valkey.io for details.
-
lcsLen
public java.util.concurrent.CompletableFuture<java.lang.Long> lcsLen(@NonNull @NonNull java.lang.String key1, @NonNull @NonNull java.lang.String key2)Description copied from interface:StringBaseCommandsReturns the total length of all the longest common subsequences between strings stored atkey1andkey2.- Specified by:
lcsLenin interfaceStringBaseCommands- Parameters:
key1- The key that stores the first string.key2- The key that stores the second string.- Returns:
- The total length of all the longest common subsequences the 2 strings.
- See Also:
- valkey.io for details.
-
lcsLen
public java.util.concurrent.CompletableFuture<java.lang.Long> lcsLen(@NonNull @NonNull GlideString key1, @NonNull @NonNull GlideString key2)Description copied from interface:StringBaseCommandsReturns the total length of all the longest common subsequences between strings stored atkey1andkey2.- Specified by:
lcsLenin interfaceStringBaseCommands- Parameters:
key1- The key that stores the first string.key2- The key that stores the second string.- Returns:
- The length of the longest common subsequence between the 2 strings.
- See Also:
- valkey.io for details.
-
lcsIdx
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> lcsIdx(@NonNull @NonNull java.lang.String key1, @NonNull @NonNull java.lang.String key2)Description copied from interface:StringBaseCommandsReturns the indices and the total length of all the longest common subsequences between strings stored atkey1andkey2.- Specified by:
lcsIdxin interfaceStringBaseCommands- Parameters:
key1- The key that stores the first string.key2- The key that stores the second string.- Returns:
- A
Mapcontaining the indices of the longest common subsequence between the 2 strings and the total length of all the longest common subsequences. The resulting map contains two keys, "matches" and "len":- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
Long. - "matches" is mapped to a three dimensional
Longarray that stores pairs of indices that represent the location of the common subsequences in the strings held bykey1andkey2.
- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
- See Also:
- valkey.io for details.
-
lcsIdx
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> lcsIdx(@NonNull @NonNull GlideString key1, @NonNull @NonNull GlideString key2)Description copied from interface:StringBaseCommandsReturns the indices and the total length of all the longest common subsequences between strings stored atkey1andkey2.- Specified by:
lcsIdxin interfaceStringBaseCommands- Parameters:
key1- The key that stores the first string.key2- The key that stores the second string.- Returns:
- A
Mapcontaining the indices of the longest common subsequence between the 2 strings and the total length of all the longest common subsequences. The resulting map contains two keys, "matches" and "len":- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
Long. - "matches" is mapped to a three dimensional
Longarray that stores pairs of indices that represent the location of the common subsequences in the strings held bykey1andkey2.
- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
- See Also:
- valkey.io for details.
-
lcsIdx
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> lcsIdx(@NonNull @NonNull java.lang.String key1, @NonNull @NonNull java.lang.String key2, long minMatchLen)Description copied from interface:StringBaseCommandsReturns the indices and the total length of all the longest common subsequences between strings stored atkey1andkey2.- Specified by:
lcsIdxin interfaceStringBaseCommands- Parameters:
key1- The key that stores the first string.key2- The key that stores the second string.minMatchLen- The minimum length of matches to include in the result.- Returns:
- A
Mapcontaining the indices of the longest common subsequence between the 2 strings and the total length of all the longest common subsequences. The resulting map contains two keys, "matches" and "len":- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
Long. This value doesn't count towards theminMatchLenfilter. - "matches" is mapped to a three dimensional
Longarray that stores pairs of indices that represent the location of the common subsequences in the strings held bykey1andkey2.
- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
- See Also:
- valkey.io for details.
-
lcsIdx
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> lcsIdx(@NonNull @NonNull GlideString key1, @NonNull @NonNull GlideString key2, long minMatchLen)Description copied from interface:StringBaseCommandsReturns the indices and the total length of all the longest common subsequences between strings stored atkey1andkey2.- Specified by:
lcsIdxin interfaceStringBaseCommands- Parameters:
key1- The key that stores the first string.key2- The key that stores the second string.minMatchLen- The minimum length of matches to include in the result.- Returns:
- A
Mapcontaining the indices of the longest common subsequence between the 2 strings and the total length of all the longest common subsequences. The resulting map contains two keys, "matches" and "len":- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
Long. This value doesn't count towards theminMatchLenfilter. - "matches" is mapped to a three dimensional
Longarray that stores pairs of indices that represent the location of the common subsequences in the strings held bykey1andkey2.
- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
- See Also:
- valkey.io for details.
-
lcsIdxWithMatchLen
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> lcsIdxWithMatchLen(@NonNull @NonNull java.lang.String key1, @NonNull @NonNull java.lang.String key2)Description copied from interface:StringBaseCommandsReturns the indices and lengths of the longest common subsequences between strings stored atkey1andkey2.- Specified by:
lcsIdxWithMatchLenin interfaceStringBaseCommands- Parameters:
key1- The key that stores the first string.key2- The key that stores the second string.- Returns:
- A
Mapcontaining the indices of the longest common subsequence between the 2 strings and the lengths of the longest common subsequences. The resulting map contains two keys, "matches" and "len":- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
Long. - "matches" is mapped to a three dimensional array that stores pairs of indices that
represent the location of the common subsequences in the strings held by
key1andkey2and the match length.
- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
- See Also:
- valkey.io for details.
-
lcsIdxWithMatchLen
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> lcsIdxWithMatchLen(@NonNull @NonNull GlideString key1, @NonNull @NonNull GlideString key2)Description copied from interface:StringBaseCommandsReturns the indices and lengths of the longest common subsequences between strings stored atkey1andkey2.- Specified by:
lcsIdxWithMatchLenin interfaceStringBaseCommands- Parameters:
key1- The key that stores the first string.key2- The key that stores the second string.- Returns:
- A
Mapcontaining the indices of the longest common subsequence between the 2 strings and the lengths of the longest common subsequences. The resulting map contains two keys, "matches" and "len":- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
Long. - "matches" is mapped to a three dimensional array that stores pairs of indices that
represent the location of the common subsequences in the strings held by
key1andkey2and the match length.
- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
- See Also:
- valkey.io for details.
-
lcsIdxWithMatchLen
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> lcsIdxWithMatchLen(@NonNull @NonNull java.lang.String key1, @NonNull @NonNull java.lang.String key2, long minMatchLen)Description copied from interface:StringBaseCommandsReturns the indices and lengths of the longest common subsequences between strings stored atkey1andkey2.- Specified by:
lcsIdxWithMatchLenin interfaceStringBaseCommands- Parameters:
key1- The key that stores the first string.key2- The key that stores the second string.minMatchLen- The minimum length of matches to include in the result.- Returns:
- A
Mapcontaining the indices of the longest common subsequence between the 2 strings and the total length of all the longest common subsequences. The resulting map contains two keys, "matches" and "len":- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
Long. This value doesn't count towards theminMatchLenfilter. - "matches" is mapped to a three dimensional array that stores pairs of indices that
represent the location of the common subsequences in the strings held by
key1andkey2and the match length.
- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
- See Also:
- valkey.io for details.
-
lcsIdxWithMatchLen
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> lcsIdxWithMatchLen(@NonNull @NonNull GlideString key1, @NonNull @NonNull GlideString key2, long minMatchLen)Description copied from interface:StringBaseCommandsReturns the indices and lengths of the longest common subsequences between strings stored atkey1andkey2.- Specified by:
lcsIdxWithMatchLenin interfaceStringBaseCommands- Parameters:
key1- The key that stores the first string.key2- The key that stores the second string.minMatchLen- The minimum length of matches to include in the result.- Returns:
- A
Mapcontaining the indices of the longest common subsequence between the 2 strings and the total length of all the longest common subsequences. The resulting map contains two keys, "matches" and "len":- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
Long. This value doesn't count towards theminMatchLenfilter. - "matches" is mapped to a three dimensional array that stores pairs of indices that
represent the location of the common subsequences in the strings held by
key1andkey2and the match length.
- "len" is mapped to the total length of the all longest common subsequences between
the 2 strings stored as
- See Also:
- valkey.io for details.
-
publish
public java.util.concurrent.CompletableFuture<java.lang.String> publish(@NonNull @NonNull java.lang.String message, @NonNull @NonNull java.lang.String channel)Description copied from interface:PubSubBaseCommandsPublishes message on pubsub channel.- Specified by:
publishin interfacePubSubBaseCommands- Parameters:
message- The message to publish.channel- The channel to publish the message on.- Returns:
OK.- See Also:
- valkey.io for details.
-
publish
public java.util.concurrent.CompletableFuture<java.lang.String> publish(@NonNull @NonNull GlideString message, @NonNull @NonNull GlideString channel)Description copied from interface:PubSubBaseCommandsPublishes message on pubsub channel.- Specified by:
publishin interfacePubSubBaseCommands- Parameters:
message- The message to publish.channel- The channel to publish the message on.- Returns:
OK.- See Also:
- valkey.io for details.
-
pubsubChannels
public java.util.concurrent.CompletableFuture<java.lang.String[]> pubsubChannels()
Description copied from interface:PubSubBaseCommandsLists the currently active channels.- Specified by:
pubsubChannelsin interfacePubSubBaseCommands- Returns:
- An
Arrayof all active channels. - See Also:
- valkey.io for details.
-
pubsubChannelsBinary
public java.util.concurrent.CompletableFuture<GlideString[]> pubsubChannelsBinary()
Description copied from interface:PubSubBaseCommandsLists the currently active channels.
Unlike ofPubSubBaseCommands.pubsubChannels(), returns channel names asGlideStrings.- Specified by:
pubsubChannelsBinaryin interfacePubSubBaseCommands- Returns:
- An
Arrayof all active channels. - See Also:
- valkey.io for details.
-
pubsubChannels
public java.util.concurrent.CompletableFuture<java.lang.String[]> pubsubChannels(@NonNull @NonNull java.lang.String pattern)Description copied from interface:PubSubBaseCommandsLists the currently active channels.- Specified by:
pubsubChannelsin interfacePubSubBaseCommands- Parameters:
pattern- A glob-style pattern to match active channels.- Returns:
- An
Arrayof currently active channels matching the given pattern. - See Also:
- valkey.io for details.
-
pubsubChannels
public java.util.concurrent.CompletableFuture<GlideString[]> pubsubChannels(@NonNull @NonNull GlideString pattern)
Description copied from interface:PubSubBaseCommandsLists the currently active channels.- Specified by:
pubsubChannelsin interfacePubSubBaseCommands- Parameters:
pattern- A glob-style pattern to match active channels.- Returns:
- An
Arrayof currently active channels matching the given pattern. - See Also:
- valkey.io for details.
-
pubsubNumPat
public java.util.concurrent.CompletableFuture<java.lang.Long> pubsubNumPat()
Description copied from interface:PubSubBaseCommandsReturns the number of unique patterns that are subscribed to by clients.- Specified by:
pubsubNumPatin interfacePubSubBaseCommands- Returns:
- The number of unique patterns.
- See Also:
- valkey.io for details.
-
pubsubNumSub
public java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Long>> pubsubNumSub(@NonNull @NonNull java.lang.String[] channels)Description copied from interface:PubSubBaseCommandsReturns the number of subscribers (exclusive of clients subscribed to patterns) for the specified channels.- Specified by:
pubsubNumSubin interfacePubSubBaseCommands- Parameters:
channels- The list of channels to query for the number of subscribers.- Returns:
- A
Mapwhere keys are the channel names and values are the numbers of subscribers. - See Also:
- valkey.io for details.
-
pubsubNumSub
public java.util.concurrent.CompletableFuture<java.util.Map<GlideString,java.lang.Long>> pubsubNumSub(@NonNull @NonNull GlideString[] channels)
Description copied from interface:PubSubBaseCommandsReturns the number of subscribers (exclusive of clients subscribed to patterns) for the specified channels.- Specified by:
pubsubNumSubin interfacePubSubBaseCommands- Parameters:
channels- The list of channels to query for the number of subscribers.- Returns:
- A
Mapwhere keys are the channel names and values are the numbers of subscribers. - See Also:
- valkey.io for details.
-
watch
public java.util.concurrent.CompletableFuture<java.lang.String> watch(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:TransactionsBaseCommandsMarks the given keys to be watched for conditional execution of a transaction. Transactions will only execute commands if the watched keys are not modified before execution of the transaction.- Specified by:
watchin interfaceTransactionsBaseCommands- Parameters:
keys- The keys to watch.- Returns:
OK.- See Also:
- valkey.io for details.
-
watch
public java.util.concurrent.CompletableFuture<java.lang.String> watch(@NonNull @NonNull GlideString[] keys)Description copied from interface:TransactionsBaseCommandsMarks the given keys to be watched for conditional execution of a transaction. Transactions will only execute commands if the watched keys are not modified before execution of the transaction.- Specified by:
watchin interfaceTransactionsBaseCommands- Parameters:
keys- The keys to watch.- Returns:
OK.- See Also:
- valkey.io for details.
-
sunion
public java.util.concurrent.CompletableFuture<java.util.Set<java.lang.String>> sunion(@NonNull @NonNull java.lang.String[] keys)Description copied from interface:SetBaseCommandsGets the union of all the given sets.- Specified by:
sunionin interfaceSetBaseCommands- Parameters:
keys- The keys of the sets.- Returns:
- 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.
- See Also:
- valkey.io for details.
-
sunion
public java.util.concurrent.CompletableFuture<java.util.Set<GlideString>> sunion(@NonNull @NonNull GlideString[] keys)
Description copied from interface:SetBaseCommandsGets the union of all the given sets.- Specified by:
sunionin interfaceSetBaseCommands- Parameters:
keys- The keys of the sets.- Returns:
- 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.
- See Also:
- valkey.io for details.
-
dump
public java.util.concurrent.CompletableFuture<byte[]> dump(@NonNull @NonNull GlideString key)Description copied from interface:GenericBaseCommandsSerialize the value stored atkeyin a Valkey-specific format and return it to the user.- Specified by:
dumpin interfaceGenericBaseCommands- Parameters:
key- Thekeyto serialize.- Returns:
- The serialized value of the data stored at
key.
Ifkeydoes not exist,nullwill be returned. - See Also:
- valkey.io for details.
-
restore
public java.util.concurrent.CompletableFuture<java.lang.String> restore(@NonNull @NonNull GlideString key, long ttl, @NonNull @lombok.NonNull byte[] value)Description copied from interface:GenericBaseCommandsCreate akeyassociated with avaluethat is obtained by deserializing the provided serializedvalue(obtained viaGenericBaseCommands.dump(glide.api.models.GlideString)).- Specified by:
restorein interfaceGenericBaseCommands- Parameters:
key- Thekeyto create.ttl- The expiry time (in milliseconds). If0, thekeywill persist.value- The serialized value to deserialize and assign tokey.- Returns:
- Return
OKif successfully create akeywith avalue. - See Also:
- valkey.io for details.
-
restore
public java.util.concurrent.CompletableFuture<java.lang.String> restore(@NonNull @NonNull GlideString key, long ttl, @NonNull @lombok.NonNull byte[] value, @NonNull @NonNull RestoreOptions restoreOptions)Description copied from interface:GenericBaseCommandsCreate akeyassociated with avaluethat is obtained by deserializing the provided serializedvalue(obtained viaGenericBaseCommands.dump(glide.api.models.GlideString)).- Specified by:
restorein interfaceGenericBaseCommands- Parameters:
key- Thekeyto create.ttl- The expiry time (in milliseconds). If0, thekeywill persist.value- The serialized value to deserialize and assign tokey.restoreOptions- The restore options. SeeRestoreOptions.- Returns:
- Return
OKif successfully create akeywith avalue. - See Also:
- valkey.io for details.
-
sort
public java.util.concurrent.CompletableFuture<java.lang.String[]> sort(@NonNull @NonNull java.lang.String key)Description copied from interface:GenericBaseCommandsSorts the elements in the list, set, or sorted set atkeyand returns the result.
Thesortcommand can be used to sort elements based on different criteria and apply transformations on sorted elements.
To store the result into a new key, seeGenericBaseCommands.sortStore(String, String).- Specified by:
sortin interfaceGenericBaseCommands- Parameters:
key- The key of the list, set, or sorted set to be sorted.- Returns:
- An
Arrayof sorted elements. - See Also:
- valkey.io for details.
-
sort
public java.util.concurrent.CompletableFuture<GlideString[]> sort(@NonNull @NonNull GlideString key)
Description copied from interface:GenericBaseCommandsSorts the elements in the list, set, or sorted set atkeyand returns the result.
Thesortcommand can be used to sort elements based on different criteria and apply transformations on sorted elements.
To store the result into a new key, seeGenericBaseCommands.sortStore(String, String).- Specified by:
sortin interfaceGenericBaseCommands- Parameters:
key- The key of the list, set, or sorted set to be sorted.- Returns:
- An
Arrayof sorted elements. - See Also:
- valkey.io for details.
-
sort
public java.util.concurrent.CompletableFuture<java.lang.String[]> sort(@NonNull @NonNull java.lang.String key, @NonNull @NonNull SortOptions sortOptions)Description copied from interface:GenericBaseCommandsSorts the elements in the list, set, or sorted set atkeyand returns the result. Thesortcommand can be used to sort elements based on different criteria and apply transformations on sorted elements.
To store the result into a new key, seeGenericBaseCommands.sortStore(String, String, SortOptions).- Specified by:
sortin interfaceGenericBaseCommands- Parameters:
key- The key of the list, set, or sorted set to be sorted.sortOptions- TheSortOptions.- Returns:
- An
Arrayof sorted elements. - See Also:
- valkey.io for details.
-
sort
public java.util.concurrent.CompletableFuture<GlideString[]> sort(@NonNull @NonNull GlideString key, @NonNull @NonNull SortOptionsBinary sortOptions)
Description copied from interface:GenericBaseCommandsSorts the elements in the list, set, or sorted set atkeyand returns the result. Thesortcommand 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#sortStore(GlideString, GlideString, SortOptions).- Specified by:
sortin interfaceGenericBaseCommands- Parameters:
key- The key of the list, set, or sorted set to be sorted.sortOptions- TheSortOptionsBinary.- Returns:
- An
Arrayof sorted elements. - See Also:
- valkey.io for details.
-
sortReadOnly
public java.util.concurrent.CompletableFuture<java.lang.String[]> sortReadOnly(@NonNull @NonNull java.lang.String key)Description copied from interface:GenericBaseCommandsSorts the elements in the list, set, or sorted set atkeyand returns the result.
ThesortReadOnlycommand can be used to sort elements based on different criteria and apply transformations on sorted elements.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
sortReadOnlyin interfaceGenericBaseCommands- Parameters:
key- The key of the list, set, or sorted set to be sorted.- Returns:
- An
Arrayof sorted elements. - See Also:
- valkey.io for details.
-
sortReadOnly
public java.util.concurrent.CompletableFuture<GlideString[]> sortReadOnly(@NonNull @NonNull GlideString key)
Description copied from interface:GenericBaseCommandsSorts the elements in the list, set, or sorted set atkeyand returns the result.
ThesortReadOnlycommand can be used to sort elements based on different criteria and apply transformations on sorted elements.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
sortReadOnlyin interfaceGenericBaseCommands- Parameters:
key- The key of the list, set, or sorted set to be sorted.- Returns:
- An
Arrayof sorted elements. - See Also:
- valkey.io for details.
-
sortReadOnly
public java.util.concurrent.CompletableFuture<java.lang.String[]> sortReadOnly(@NonNull @NonNull java.lang.String key, @NonNull @NonNull SortOptions sortOptions)Description copied from interface:GenericBaseCommandsSorts the elements in the list, set, or sorted set atkeyand returns the result. ThesortReadOnlycommand can be used to sort elements based on different criteria and apply transformations on sorted elements.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
sortReadOnlyin interfaceGenericBaseCommands- Parameters:
key- The key of the list, set, or sorted set to be sorted.sortOptions- TheSortOptions.- Returns:
- An
Arrayof sorted elements. - See Also:
- valkey.io for details.
-
sortReadOnly
public java.util.concurrent.CompletableFuture<GlideString[]> sortReadOnly(@NonNull @NonNull GlideString key, @NonNull @NonNull SortOptionsBinary sortOptions)
Description copied from interface:GenericBaseCommandsSorts the elements in the list, set, or sorted set atkeyand returns the result. ThesortReadOnlycommand can be used to sort elements based on different criteria and apply transformations on sorted elements.
This command is routed depending on the client'sReadFromstrategy.- Specified by:
sortReadOnlyin interfaceGenericBaseCommands- Parameters:
key- The key of the list, set, or sorted set to be sorted.sortOptions- TheSortOptions.- Returns:
- An
Arrayof sorted elements. - See Also:
- valkey.io for details.
-
sortStore
public java.util.concurrent.CompletableFuture<java.lang.Long> sortStore(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String destination)Description copied from interface:GenericBaseCommandsSorts the elements in the list, set, or sorted set atkeyand stores the result indestination. Thesortcommand 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, seeGenericBaseCommands.sort(String)orGenericBaseCommands.sortReadOnly(String).- Specified by:
sortStorein interfaceGenericBaseCommands- Parameters:
key- The key of the list, set, or sorted set to be sorted.destination- The key where the sorted result will be stored.- Returns:
- The number of elements in the sorted key stored at
destination. - See Also:
- valkey.io for details.
-
sortStore
public java.util.concurrent.CompletableFuture<java.lang.Long> sortStore(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString destination)Description copied from interface:GenericBaseCommandsSorts the elements in the list, set, or sorted set atkeyand stores the result indestination. Thesortcommand 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, seeGenericBaseCommands.sort(GlideString)orGenericBaseCommands.sortReadOnly(GlideString).- Specified by:
sortStorein interfaceGenericBaseCommands- Parameters:
key- The key of the list, set, or sorted set to be sorted.destination- The key where the sorted result will be stored.- Returns:
- The number of elements in the sorted key stored at
destination. - See Also:
- valkey.io for details.
-
sortStore
public java.util.concurrent.CompletableFuture<java.lang.Long> sortStore(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String destination, @NonNull @NonNull SortOptions sortOptions)Description copied from interface:GenericBaseCommandsSorts the elements in the list, set, or sorted set atkeyand stores the result indestination. Thesortcommand 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, seeGenericBaseCommands.sort(String, SortOptions).- Specified by:
sortStorein interfaceGenericBaseCommands- Parameters:
key- The key of the list, set, or sorted set to be sorted.destination- The key where the sorted result will be stored.sortOptions- TheSortOptions.- Returns:
- The number of elements in the sorted key stored at
destination. - See Also:
- valkey.io for details.
-
sortStore
public java.util.concurrent.CompletableFuture<java.lang.Long> sortStore(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString destination, @NonNull @NonNull SortOptionsBinary sortOptions)Description copied from interface:GenericBaseCommandsSorts the elements in the list, set, or sorted set atkeyand stores the result indestination. Thesortcommand 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#sort(GlideString, SortOptions).- Specified by:
sortStorein interfaceGenericBaseCommands- Parameters:
key- The key of the list, set, or sorted set to be sorted.destination- The key where the sorted result will be stored.sortOptions- TheSortOptionsBinary.- Returns:
- The number of elements in the sorted key stored at
destination. - See Also:
- valkey.io for details.
-
geosearch
public java.util.concurrent.CompletableFuture<java.lang.String[]> geosearch(@NonNull @NonNull java.lang.String key, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy)Description copied from interface:GeospatialIndicesBaseCommandsReturns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.- Specified by:
geosearchin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
- Returns:
- An
arrayof matched member names. - See Also:
- valkey.io for more details.
-
geosearch
public java.util.concurrent.CompletableFuture<GlideString[]> geosearch(@NonNull @NonNull GlideString key, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy)
Description copied from interface:GeospatialIndicesBaseCommandsReturns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.- Specified by:
geosearchin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginBinaryto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
- Returns:
- An
arrayof matched member names. - See Also:
- valkey.io for more details.
-
geosearch
public java.util.concurrent.CompletableFuture<java.lang.String[]> geosearch(@NonNull @NonNull java.lang.String key, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy, @NonNull @NonNull GeoSearchResultOptions resultOptions)Description copied from interface:GeospatialIndicesBaseCommandsReturns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.- Specified by:
geosearchin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
resultOptions- Optional inputs for sorting/limiting the results. See -GeoSearchResultOptions- Returns:
- An
arrayof matched member names. - See Also:
- valkey.io for more details.
-
geosearch
public java.util.concurrent.CompletableFuture<GlideString[]> geosearch(@NonNull @NonNull GlideString key, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy, @NonNull @NonNull GeoSearchResultOptions resultOptions)
Description copied from interface:GeospatialIndicesBaseCommandsReturns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.- Specified by:
geosearchin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginBinaryto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
resultOptions- Optional inputs for sorting/limiting the results. See -GeoSearchResultOptions- Returns:
- An
arrayof matched member names. - See Also:
- valkey.io for more details.
-
geosearch
public java.util.concurrent.CompletableFuture<java.lang.Object[]> geosearch(@NonNull @NonNull java.lang.String key, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy, @NonNull @NonNull GeoSearchOptions options)Description copied from interface:GeospatialIndicesBaseCommandsReturns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.- Specified by:
geosearchin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
options- The optional inputs to request additional information.- Returns:
- An 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 forsearchBy. - The geohash of the location as a
Long. - The coordinates as a two item
arrayofDouble.
- See Also:
- valkey.io for more details.
-
geosearch
public java.util.concurrent.CompletableFuture<java.lang.Object[]> geosearch(@NonNull @NonNull GlideString key, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy, @NonNull @NonNull GeoSearchOptions options)Description copied from interface:GeospatialIndicesBaseCommandsReturns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.- Specified by:
geosearchin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginBinaryto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
options- The optional inputs to request additional information.- Returns:
- An 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 forsearchBy. - The geohash of the location as a
Long. - The coordinates as a two item
arrayofDouble.
- See Also:
- valkey.io for more details.
-
geosearch
public java.util.concurrent.CompletableFuture<java.lang.Object[]> geosearch(@NonNull @NonNull java.lang.String key, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy, @NonNull @NonNull GeoSearchOptions options, @NonNull @NonNull GeoSearchResultOptions resultOptions)Description copied from interface:GeospatialIndicesBaseCommandsReturns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.- Specified by:
geosearchin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
options- The optional inputs to request additional information. See -GeoSearchOptionsresultOptions- Optional inputs for sorting/limiting the results. See -GeoSearchResultOptions- Returns:
- An 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 forsearchBy. - The geohash of the location as a
Long. - The coordinates as a two item
arrayofDouble.
- See Also:
- valkey.io for more details.
-
geosearch
public java.util.concurrent.CompletableFuture<java.lang.Object[]> geosearch(@NonNull @NonNull GlideString key, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy, @NonNull @NonNull GeoSearchOptions options, @NonNull @NonNull GeoSearchResultOptions resultOptions)Description copied from interface:GeospatialIndicesBaseCommandsReturns the members of a sorted set populated with geospatial information usingGeospatialIndicesBaseCommands.geoadd(String, Map), which are within the borders of the area specified by a given shape.- Specified by:
geosearchin interfaceGeospatialIndicesBaseCommands- Parameters:
key- The key of the sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginBinaryto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
options- The optional inputs to request additional information. See -GeoSearchOptionsresultOptions- Optional inputs for sorting/limiting the results. See -GeoSearchResultOptions- Returns:
- An 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 forsearchBy. - The geohash of the location as a
Long. - The coordinates as a two item
arrayofDouble.
- See Also:
- valkey.io for more details.
-
geosearchstore
public java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String source, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy)Description copied from interface:GeospatialIndicesBaseCommandsSearches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `GeospatialIndicesBaseCommands.geosearch(String, SearchOrigin, GeoSearchShape).- Specified by:
geosearchstorein interfaceGeospatialIndicesBaseCommands- Parameters:
destination- The key of the destination sorted set.source- The key of the source sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
geosearchstore
public java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore(@NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString source, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy)Description copied from interface:GeospatialIndicesBaseCommandsSearches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `GeospatialIndicesBaseCommands.geosearch(String, SearchOrigin, GeoSearchShape).- Specified by:
geosearchstorein interfaceGeospatialIndicesBaseCommands- Parameters:
destination- The key of the destination sorted set.source- The key of the source sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginBinaryto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
geosearchstore
public java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String source, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy, @NonNull @NonNull GeoSearchResultOptions resultOptions)Description copied from interface:GeospatialIndicesBaseCommandsSearches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `GeospatialIndicesBaseCommands.geosearch(String, SearchOrigin, GeoSearchShape, GeoSearchResultOptions).- Specified by:
geosearchstorein interfaceGeospatialIndicesBaseCommands- Parameters:
destination- The key of the destination sorted set.source- The key of the source sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
resultOptions- Optional inputs for sorting/limiting the results. See -GeoSearchResultOptions- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
geosearchstore
public java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore(@NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString source, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy, @NonNull @NonNull GeoSearchResultOptions resultOptions)Description copied from interface:GeospatialIndicesBaseCommandsSearches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `GeospatialIndicesBaseCommands.geosearch(String, SearchOrigin, GeoSearchShape, GeoSearchResultOptions).- Specified by:
geosearchstorein interfaceGeospatialIndicesBaseCommands- Parameters:
destination- The key of the destination sorted set.source- The key of the source sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginBinaryto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
resultOptions- Optional inputs for sorting/limiting the results. See -GeoSearchResultOptions- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
geosearchstore
public java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String source, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy, @NonNull @NonNull GeoSearchStoreOptions options)Description copied from interface:GeospatialIndicesBaseCommandsSearches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `GeospatialIndicesBaseCommands.geosearch(String, SearchOrigin, GeoSearchShape, GeoSearchOptions).- Specified by:
geosearchstorein interfaceGeospatialIndicesBaseCommands- Parameters:
destination- The key of the destination sorted set.source- The key of the source sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
options- The optional inputs to request additional information.- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
geosearchstore
public java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore(@NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString source, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy, @NonNull @NonNull GeoSearchStoreOptions options)Description copied from interface:GeospatialIndicesBaseCommandsSearches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `GeospatialIndicesBaseCommands.geosearch(String, SearchOrigin, GeoSearchShape, GeoSearchOptions).- Specified by:
geosearchstorein interfaceGeospatialIndicesBaseCommands- Parameters:
destination- The key of the destination sorted set.source- The key of the source sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginBinaryto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
options- The optional inputs to request additional information.- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
geosearchstore
public java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore(@NonNull @NonNull java.lang.String destination, @NonNull @NonNull java.lang.String source, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy, @NonNull @NonNull GeoSearchStoreOptions options, @NonNull @NonNull GeoSearchResultOptions resultOptions)Description copied from interface:GeospatialIndicesBaseCommandsSearches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `GeospatialIndicesBaseCommands.geosearch(String, SearchOrigin, GeoSearchShape, GeoSearchOptions, GeoSearchResultOptions).- Specified by:
geosearchstorein interfaceGeospatialIndicesBaseCommands- Parameters:
destination- The key of the destination sorted set.source- The key of the source sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
options- The optional inputs to request additional information.resultOptions- Optional inputs for sorting/limiting the results. See -GeoSearchResultOptions- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
geosearchstore
public java.util.concurrent.CompletableFuture<java.lang.Long> geosearchstore(@NonNull @NonNull GlideString destination, @NonNull @NonNull GlideString source, @NonNull GeoSearchOrigin.SearchOrigin searchFrom, @NonNull @NonNull GeoSearchShape searchBy, @NonNull @NonNull GeoSearchStoreOptions options, @NonNull @NonNull GeoSearchResultOptions resultOptions)Description copied from interface:GeospatialIndicesBaseCommandsSearches for members in a sorted set stored atsourcerepresenting geospatial data within a circular or rectangular area and stores the result indestination. Ifdestinationalready exists, it is overwritten. Otherwise, a new sorted set will be created. To get the result directly, see `GeospatialIndicesBaseCommands.geosearch(String, SearchOrigin, GeoSearchShape, GeoSearchOptions, GeoSearchResultOptions).- Specified by:
geosearchstorein interfaceGeospatialIndicesBaseCommands- Parameters:
destination- The key of the destination sorted set.source- The key of the source sorted set.searchFrom- The query's center point options, could be one of:GeoSearchOrigin.MemberOriginto use the position of the given existing member in the sorted set.GeoSearchOrigin.CoordOriginto use the given longitude and latitude coordinates.
searchBy- The query's shape options:GeoSearchShape(double, GeoUnit)to search inside circular area according to given radius.GeoSearchShape(double, double, GeoUnit)to search inside an axis-aligned rectangle, determined by height and width.
options- The optional inputs to request additional information.resultOptions- Optional inputs for sorting/limiting the results. See -GeoSearchResultOptions- Returns:
- The number of elements in the resulting sorted set stored at
destination. - See Also:
- valkey.io for more details.
-
sscan
public java.util.concurrent.CompletableFuture<java.lang.Object[]> sscan(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String cursor)Description copied from interface:SetBaseCommandsIterates incrementally over a set.- Specified by:
sscanin interfaceSetBaseCommands- Parameters:
key- The key of the set.cursor- The cursor that points to the next iteration of results. A value of"0"indicates the start of the search.- Returns:
- An
ArrayofObjects. The first element is always thecursorfor the next iteration of results."0"will be thecursorreturned on the last iteration of the set. The second element is always anArrayof the subset of the set held inkey. - See Also:
- valkey.io for details.
-
sscan
public java.util.concurrent.CompletableFuture<java.lang.Object[]> sscan(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString cursor)Description copied from interface:SetBaseCommandsIterates incrementally over a set.- Specified by:
sscanin interfaceSetBaseCommands- Parameters:
key- The key of the set.cursor- The cursor that points to the next iteration of results. A value of"0"indicates the start of the search.- Returns:
- An
ArrayofObjects. The first element is always thecursorfor the next iteration of results."0"will be thecursorreturned on the last iteration of the set. The second element is always anArrayof the subset of the set held inkey. - See Also:
- valkey.io for details.
-
sscan
public java.util.concurrent.CompletableFuture<java.lang.Object[]> sscan(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String cursor, @NonNull @NonNull SScanOptions sScanOptions)Description copied from interface:SetBaseCommandsIterates incrementally over a set.- Specified by:
sscanin interfaceSetBaseCommands- Parameters:
key- The key of the set.cursor- The cursor that points to the next iteration of results. A value of"0"indicates the start of the search.sScanOptions- TheSScanOptions.- Returns:
- An
ArrayofObjects. The first element is always thecursorfor the next iteration of results."0"will be thecursorreturned on the last iteration of the set. The second element is always anArrayof the subset of the set held inkey. - See Also:
- valkey.io for details.
-
sscan
public java.util.concurrent.CompletableFuture<java.lang.Object[]> sscan(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString cursor, @NonNull @NonNull SScanOptionsBinary sScanOptions)Description copied from interface:SetBaseCommandsIterates incrementally over a set.- Specified by:
sscanin interfaceSetBaseCommands- Parameters:
key- The key of the set.cursor- The cursor that points to the next iteration of results. A value of"0"indicates the start of the search.sScanOptions- TheSScanOptions.- Returns:
- An
ArrayofObjects. The first element is always thecursorfor the next iteration of results."0"will be thecursorreturned on the last iteration of the set. The second element is always anArrayof the subset of the set held inkey. - See Also:
- valkey.io for details.
-
zscan
public java.util.concurrent.CompletableFuture<java.lang.Object[]> zscan(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String cursor)Description copied from interface:SortedSetBaseCommandsIterates incrementally over a sorted set.- Specified by:
zscanin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.cursor- The cursor that points to the next iteration of results. A value of"0"indicates the start of the search.- Returns:
- An
ArrayofObjects. The first element is always thecursorfor the next iteration of results."0"will be thecursorreturned on the last iteration of the sorted set. The second element is always anArrayof the subset of the sorted set held inkey. The array in the second element is always a flattened series ofStringpairs, where the value is at even indices and the score is at odd indices. - See Also:
- valkey.io for details.
-
zscan
public java.util.concurrent.CompletableFuture<java.lang.Object[]> zscan(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString cursor)Description copied from interface:SortedSetBaseCommandsIterates incrementally over a sorted set.- Specified by:
zscanin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.cursor- The cursor that points to the next iteration of results. A value of"0"indicates the start of the search.- Returns:
- An
ArrayofObjects. The first element is always thecursorfor the next iteration of results."0"will be thecursorreturned on the last iteration of the sorted set. The second element is always anArrayof the subset of the sorted set held inkey. The array in the second element is always a flattened series ofStringpairs, where the value is at even indices and the score is at odd indices. - See Also:
- valkey.io for details.
-
zscan
public java.util.concurrent.CompletableFuture<java.lang.Object[]> zscan(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String cursor, @NonNull @NonNull ZScanOptions zScanOptions)Description copied from interface:SortedSetBaseCommandsIterates incrementally over a sorted set.- Specified by:
zscanin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.cursor- The cursor that points to the next iteration of results. A value of"0"indicates the start of the search.zScanOptions- TheZScanOptions.- Returns:
- An
ArrayofObjects. The first element is always thecursorfor the next iteration of results."0"will be thecursorreturned on the last iteration of the sorted set. The second element is always anArrayof the subset of the sorted set held inkey. The array in the second element is a flattened series ofStringpairs, where the value is at even indices and the score is at odd indices. IfZScanOptions.ZScanOptionsBuilder.noScores(boolean)is totrue, the second element will only contain the members without scores. - See Also:
- valkey.io for details.
-
zscan
public java.util.concurrent.CompletableFuture<java.lang.Object[]> zscan(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString cursor, @NonNull @NonNull ZScanOptionsBinary zScanOptions)Description copied from interface:SortedSetBaseCommandsIterates incrementally over a sorted set.- Specified by:
zscanin interfaceSortedSetBaseCommands- Parameters:
key- The key of the sorted set.cursor- The cursor that points to the next iteration of results. A value of"0"indicates the start of the search.zScanOptions- TheZScanOptions.- Returns:
- An
ArrayofObjects. The first element is always thecursorfor the next iteration of results."0"will be thecursorreturned on the last iteration of the sorted set. The second element is always anArrayof the subset of the sorted set held inkey. The array in the second element is a flattened series ofStringpairs, where the value is at even indices and the score is at odd indices. IfZScanOptionsBinary.ZScanOptionsBinaryBuilder.noScores(boolean)is totrue, the second element will only contain the members without scores. - See Also:
- valkey.io for details.
-
hscan
public java.util.concurrent.CompletableFuture<java.lang.Object[]> hscan(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String cursor)Description copied from interface:HashBaseCommandsIterates fields of Hash types and their associated values.- Specified by:
hscanin interfaceHashBaseCommands- Parameters:
key- The key of the hash.cursor- The cursor that points to the next iteration of results. A value of"0"indicates the start of the search.- Returns:
- An
ArrayofObjects. The first element is always thecursorfor the next iteration of results."0"will be thecursorreturned on the last iteration of the result. The second element is always anArrayof the subset of the hash held inkey. The array in the second element is always a flattened series ofStringpairs, where the key is at even indices and the value is at odd indices. - See Also:
- valkey.io for details.
-
hscan
public java.util.concurrent.CompletableFuture<java.lang.Object[]> hscan(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString cursor)Description copied from interface:HashBaseCommandsIterates fields of Hash types and their associated values.- Specified by:
hscanin interfaceHashBaseCommands- Parameters:
key- The key of the hash.cursor- The cursor that points to the next iteration of results. A value of"0"indicates the start of the search.- Returns:
- An
ArrayofObjects. The first element is always thecursorfor the next iteration of results."0"will be thecursorreturned on the last iteration of the result. The second element is always anArrayof the subset of the hash held inkey. The array in the second element is always a flattened series ofStringpairs, where the key is at even indices and the value is at odd indices. - See Also:
- valkey.io for details.
-
hscan
public java.util.concurrent.CompletableFuture<java.lang.Object[]> hscan(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String cursor, @NonNull @NonNull HScanOptions hScanOptions)Description copied from interface:HashBaseCommandsIterates fields of Hash types and their associated values.- Specified by:
hscanin interfaceHashBaseCommands- Parameters:
key- The key of the hash.cursor- The cursor that points to the next iteration of results. A value of"0"indicates the start of the search.hScanOptions- TheHScanOptions.- Returns:
- An
ArrayofObjects. The first element is always thecursorfor the next iteration of results."0"will be thecursorreturned on the last iteration of the result. The second element is always anArrayof the subset of the hash held inkey. The array in the second element is a flattened series ofStringpairs, where the key is at even indices and the value is at odd indices. IfHScanOptions.HScanOptionsBuilder.noValues(boolean)is set totrue, the second element will only contain the fields without the values. - See Also:
- valkey.io for details.
-
hscan
public java.util.concurrent.CompletableFuture<java.lang.Object[]> hscan(@NonNull @NonNull GlideString key, @NonNull @NonNull GlideString cursor, @NonNull @NonNull HScanOptionsBinary hScanOptions)Description copied from interface:HashBaseCommandsIterates fields of Hash types and their associated values.- Specified by:
hscanin interfaceHashBaseCommands- Parameters:
key- The key of the hash.cursor- The cursor that points to the next iteration of results. A value of"0"indicates the start of the search.hScanOptions- TheHScanOptionsBinary.- Returns:
- An
ArrayofObjects. The first element is always thecursorfor the next iteration of results."0"will be thecursorreturned on the last iteration of the result. The second element is always anArrayof the subset of the hash held inkey. The array in the second element is a flattened series ofStringpairs, where the key is at even indices and the value is at odd indices. IfHScanOptionsBinary.HScanOptionsBinaryBuilder.noValues(boolean)is set totrue, the second element will only contain the fields without the values. - See Also:
- valkey.io for details.
-
wait
public java.util.concurrent.CompletableFuture<java.lang.Long> wait(long numreplicas, long timeout)Description copied from interface:GenericBaseCommandsBlocks the current client until all the previous write commands are successfully transferred and acknowledged by at leastnumreplicasof replicas. Iftimeoutis reached, the command returns even if the specified number of replicas were not yet reached.- Specified by:
waitin interfaceGenericBaseCommands- Parameters:
numreplicas- The number of replicas to reach.timeout- The timeout value specified in milliseconds. A value of0will block indefinitely.- Returns:
- The number of replicas reached by all the writes performed in the context of the current connection.
-
waitaof
public java.util.concurrent.CompletableFuture<java.lang.Long[]> waitaof(long numlocal, long numreplicas, long timeout)Description copied from interface:GenericBaseCommandsBlocks the current client until all previous write commands are successfully transferred and acknowledged by at leastnumlocalandnumreplicasof replicas. Iftimeoutis reached, the command returns even if the specified number of replicas were not yet reached.- Specified by:
waitaofin interfaceGenericBaseCommands- Parameters:
numlocal- The number of local replicas to reach.numreplicas- The number of replicas to reach.timeout- The timeout value specified in milliseconds. A value of0will block indefinitely.- Returns:
- An
arrayof twoLongvalues: the number of local replicas reached and the number of replicas reached. - See Also:
- valkey.io for details.
-
migrate
public java.util.concurrent.CompletableFuture<java.lang.String> migrate(java.lang.String destinationHost, long destinationPort, java.lang.String key, long destinationDB, long timeout)Description copied from interface:GenericBaseCommandsAtomically transfers a key from a source Valkey instance to a destination Valkey instance. Once the key is successfully transferred, it is deleted from the source instance and is guaranteed to exist in the destination instance.- Specified by:
migratein interfaceGenericBaseCommands- Parameters:
destinationHost- The destination host.destinationPort- The destination port.key- The key to migrate.destinationDB- The destination database index.timeout- The timeout in milliseconds.- Returns:
"OK"on success, or"NOKEY"if no keys were found in the source instance.- See Also:
- valkey.io for details.
-
migrate
public java.util.concurrent.CompletableFuture<java.lang.String> migrate(java.lang.String destinationHost, long destinationPort, GlideString key, long destinationDB, long timeout)Description copied from interface:GenericBaseCommandsAtomically transfers a key from a source Valkey instance to a destination Valkey instance. Once the key is successfully transferred, it is deleted from the source instance and is guaranteed to exist in the destination instance.Note: The host and port are String/long types because they represent network addresses, while the key can be GlideString to support binary-safe key names.
- Specified by:
migratein interfaceGenericBaseCommands- Parameters:
destinationHost- The destination host.destinationPort- The destination port.key- The key to migrate (binary-safe).destinationDB- The destination database index.timeout- The timeout in milliseconds.- Returns:
"OK"on success, or"NOKEY"if no keys were found in the source instance.- See Also:
- valkey.io for details.
-
migrate
public java.util.concurrent.CompletableFuture<java.lang.String> migrate(java.lang.String destinationHost, long destinationPort, java.lang.String key, long destinationDB, long timeout, MigrateOptions migrateOptions)Description copied from interface:GenericBaseCommandsAtomically transfers a key from a source Valkey instance to a destination Valkey instance. Once the key is successfully transferred, it is deleted from the source instance (unless COPY is specified) and is guaranteed to exist in the destination instance.- Specified by:
migratein interfaceGenericBaseCommands- Parameters:
destinationHost- The destination host.destinationPort- The destination port.key- The key to migrate.destinationDB- The destination database index.timeout- The timeout in milliseconds.migrateOptions- Additional options for the MIGRATE command.- Returns:
"OK"on success, or"NOKEY"if no keys were found in the source instance.- See Also:
- valkey.io for details.
-
migrate
public java.util.concurrent.CompletableFuture<java.lang.String> migrate(java.lang.String destinationHost, long destinationPort, GlideString key, long destinationDB, long timeout, MigrateOptions migrateOptions)Description copied from interface:GenericBaseCommandsAtomically transfers a key from a source Valkey instance to a destination Valkey instance. Once the key is successfully transferred, it is deleted from the source instance (unless COPY is specified) and is guaranteed to exist in the destination instance.Note: The host and port are String/long types because they represent network addresses, while the key can be GlideString to support binary-safe key names.
- Specified by:
migratein interfaceGenericBaseCommands- Parameters:
destinationHost- The destination host.destinationPort- The destination port.key- The key to migrate (binary-safe).destinationDB- The destination database index.timeout- The timeout in milliseconds.migrateOptions- Additional options for the MIGRATE command.- Returns:
"OK"on success, or"NOKEY"if no keys were found in the source instance.- See Also:
- valkey.io for details.
-
aclCat
public java.util.concurrent.CompletableFuture<java.lang.String[]> aclCat()
-
aclCat
public java.util.concurrent.CompletableFuture<java.lang.String[]> aclCat(java.lang.String category)
-
aclDelUser
public java.util.concurrent.CompletableFuture<java.lang.Long> aclDelUser(java.lang.String[] usernames)
-
aclDryRun
public java.util.concurrent.CompletableFuture<java.lang.String> aclDryRun(java.lang.String username, java.lang.String command, java.lang.String[] args)
-
aclGenPass
public java.util.concurrent.CompletableFuture<java.lang.String> aclGenPass()
-
aclGenPass
public java.util.concurrent.CompletableFuture<java.lang.String> aclGenPass(int bits)
-
aclGetUser
public java.util.concurrent.CompletableFuture<java.lang.Object> aclGetUser(java.lang.String username)
-
aclList
public java.util.concurrent.CompletableFuture<java.lang.String[]> aclList()
-
aclLoad
public java.util.concurrent.CompletableFuture<java.lang.String> aclLoad()
-
aclLog
public java.util.concurrent.CompletableFuture<java.lang.Object[]> aclLog()
-
aclLog
public java.util.concurrent.CompletableFuture<java.lang.Object[]> aclLog(int count)
-
aclSave
public java.util.concurrent.CompletableFuture<java.lang.String> aclSave()
-
aclSetUser
public java.util.concurrent.CompletableFuture<java.lang.String> aclSetUser(java.lang.String username, java.lang.String[] rules)
-
aclUsers
public java.util.concurrent.CompletableFuture<java.lang.String[]> aclUsers()
-
aclWhoami
public java.util.concurrent.CompletableFuture<java.lang.String> aclWhoami()
-
subscribeLazy
public java.util.concurrent.CompletableFuture<java.lang.Void> subscribeLazy(java.util.Set<java.lang.String> channels)
Description copied from interface:PubSubBaseCommandsSubscribes the client to the specified channels.This command updates the client's internal desired subscription state without waiting for server confirmation. It returns immediately after updating the local state. The client will attempt to subscribe asynchronously in the background.
Note: Use
getSubscriptions()to verify the actual server-side subscription state.- Specified by:
subscribeLazyin interfacePubSubBaseCommands- Parameters:
channels- A set of channel names to subscribe to- Returns:
- A
CompletableFuturethat completes when the subscription request is processed - See Also:
- valkey.io for details
-
subscribe
public java.util.concurrent.CompletableFuture<java.lang.Void> subscribe(java.util.Set<java.lang.String> channels, int timeoutMs)Description copied from interface:PubSubBaseCommandsSubscribes the client to the specified channels with a timeout.This command updates the client's internal desired subscription state and waits for server confirmation.
- Specified by:
subscribein interfacePubSubBaseCommands- Parameters:
channels- A set of channel names to subscribe totimeoutMs- Maximum time in milliseconds to wait for subscription confirmation. A value of 0 blocks indefinitely until confirmation.- Returns:
- A
CompletableFuturethat completes when the subscription is confirmed or times out - See Also:
- valkey.io for details
-
psubscribeLazy
public java.util.concurrent.CompletableFuture<java.lang.Void> psubscribeLazy(java.util.Set<java.lang.String> patterns)
Description copied from interface:PubSubBaseCommandsSubscribes the client to channels matching the specified patterns.This command updates the client's internal desired subscription state without waiting for server confirmation. It returns immediately after updating the local state. The client will attempt to subscribe asynchronously in the background.
Patterns use glob-style matching:
*matches any sequence of characters?matches any single character[abc]matches one character from the set
Note: Use
getSubscriptions()to verify the actual server-side subscription state.- Specified by:
psubscribeLazyin interfacePubSubBaseCommands- Parameters:
patterns- A set of glob patterns to subscribe to- Returns:
- A
CompletableFuturethat completes when the subscription request is processed - See Also:
- valkey.io for details
-
psubscribe
public java.util.concurrent.CompletableFuture<java.lang.Void> psubscribe(java.util.Set<java.lang.String> patterns, int timeoutMs)Description copied from interface:PubSubBaseCommandsSubscribes the client to channels matching the specified patterns with a timeout.This command updates the client's internal desired subscription state and waits for server confirmation.
- Specified by:
psubscribein interfacePubSubBaseCommands- Parameters:
patterns- A set of glob patterns to subscribe totimeoutMs- Maximum time in milliseconds to wait for subscription confirmation. A value of 0 blocks indefinitely until confirmation.- Returns:
- A
CompletableFuturethat completes when the subscription is confirmed or times out - See Also:
- valkey.io for details
-
unsubscribeLazy
public java.util.concurrent.CompletableFuture<java.lang.Void> unsubscribeLazy()
Description copied from interface:PubSubBaseCommandsUnsubscribes the client from all currently subscribed channels.This command updates the client's internal desired subscription state without waiting for server confirmation. It returns immediately after updating the local state. The client will attempt to unsubscribe asynchronously in the background.
Note: Use
getSubscriptions()to verify the actual server-side subscription state.- Specified by:
unsubscribeLazyin interfacePubSubBaseCommands- Returns:
- A
CompletableFuturethat completes when the unsubscription request is processed - See Also:
- valkey.io for details
-
unsubscribeLazy
public java.util.concurrent.CompletableFuture<java.lang.Void> unsubscribeLazy(java.util.Set<java.lang.String> channels)
Description copied from interface:PubSubBaseCommandsUnsubscribes the client from the specified channels.This command updates the client's internal desired subscription state without waiting for server confirmation. It returns immediately after updating the local state. The client will attempt to unsubscribe asynchronously in the background.
Note: Use
getSubscriptions()to verify the actual server-side subscription state.- Specified by:
unsubscribeLazyin interfacePubSubBaseCommands- Parameters:
channels- A set of channel names to unsubscribe from- Returns:
- A
CompletableFuturethat completes when the unsubscription request is processed - See Also:
- valkey.io for details
-
unsubscribe
public java.util.concurrent.CompletableFuture<java.lang.Void> unsubscribe(java.util.Set<java.lang.String> channels, int timeoutMs)Description copied from interface:PubSubBaseCommandsUnsubscribes the client from the specified channels with a timeout.This command updates the client's internal desired subscription state and waits for server confirmation.
- Specified by:
unsubscribein interfacePubSubBaseCommands- Parameters:
channels- A set of channel names to unsubscribe fromtimeoutMs- Maximum time in milliseconds to wait for unsubscription confirmation. A value of 0 blocks indefinitely until confirmation.- Returns:
- A
CompletableFuturethat completes when the unsubscription is confirmed or times out - See Also:
- valkey.io for details
-
unsubscribe
public java.util.concurrent.CompletableFuture<java.lang.Void> unsubscribe(int timeoutMs)
Description copied from interface:PubSubBaseCommandsUnsubscribes the client from all currently subscribed channels with a timeout.- Specified by:
unsubscribein interfacePubSubBaseCommands- Parameters:
timeoutMs- Maximum time in milliseconds to wait for unsubscription confirmation- Returns:
- A
CompletableFuturethat completes when the unsubscription is confirmed or times out - See Also:
- valkey.io for details
-
punsubscribeLazy
public java.util.concurrent.CompletableFuture<java.lang.Void> punsubscribeLazy()
Description copied from interface:PubSubBaseCommandsUnsubscribes the client from all currently subscribed patterns.This command updates the client's internal desired subscription state without waiting for server confirmation. It returns immediately after updating the local state. The client will attempt to unsubscribe asynchronously in the background.
Note: Use
getSubscriptions()to verify the actual server-side subscription state.- Specified by:
punsubscribeLazyin interfacePubSubBaseCommands- Returns:
- A
CompletableFuturethat completes when the unsubscription request is processed - See Also:
- valkey.io for details
-
punsubscribeLazy
public java.util.concurrent.CompletableFuture<java.lang.Void> punsubscribeLazy(java.util.Set<java.lang.String> patterns)
Description copied from interface:PubSubBaseCommandsUnsubscribes the client from the specified patterns.This command updates the client's internal desired subscription state without waiting for server confirmation. It returns immediately after updating the local state. The client will attempt to unsubscribe asynchronously in the background.
Note: Use
getSubscriptions()to verify the actual server-side subscription state.- Specified by:
punsubscribeLazyin interfacePubSubBaseCommands- Parameters:
patterns- A set of glob patterns to unsubscribe from- Returns:
- A
CompletableFuturethat completes when the unsubscription request is processed - See Also:
- valkey.io for details
-
punsubscribe
public java.util.concurrent.CompletableFuture<java.lang.Void> punsubscribe(java.util.Set<java.lang.String> patterns, int timeoutMs)Description copied from interface:PubSubBaseCommandsUnsubscribes the client from the specified patterns with a timeout.This command updates the client's internal desired subscription state and waits for server confirmation.
- Specified by:
punsubscribein interfacePubSubBaseCommands- Parameters:
patterns- A set of glob patterns to unsubscribe fromtimeoutMs- Maximum time in milliseconds to wait for unsubscription confirmation. A value of 0 blocks indefinitely until confirmation.- Returns:
- A
CompletableFuturethat completes when the unsubscription is confirmed or times out - See Also:
- valkey.io for details
-
punsubscribe
public java.util.concurrent.CompletableFuture<java.lang.Void> punsubscribe(int timeoutMs)
Description copied from interface:PubSubBaseCommandsUnsubscribes the client from all currently subscribed patterns with a timeout.- Specified by:
punsubscribein interfacePubSubBaseCommands- Parameters:
timeoutMs- Maximum time in milliseconds to wait for unsubscription confirmation- Returns:
- A
CompletableFuturethat completes when the unsubscription is confirmed or times out - See Also:
- valkey.io for details
-
parseSubscriptionState
protected java.lang.Object parseSubscriptionState(java.lang.Object response)
-
__enqueuePubSubMessage
public void __enqueuePubSubMessage(PubSubMessage message)
Internal method for enqueueing PubSub messages from native callback. This is called by the native layer when PubSub messages are received.
-
-