Package io.lettuce.core
Class AbstractRedisAsyncCommands<K,V>
- java.lang.Object
-
- io.lettuce.core.AbstractRedisAsyncCommands<K,V>
-
- Type Parameters:
K
- Key type.V
- Value type.
- All Implemented Interfaces:
BaseRedisAsyncCommands<K,V>
,RedisAclAsyncCommands<K,V>
,RedisFunctionAsyncCommands<K,V>
,RedisGeoAsyncCommands<K,V>
,RedisHashAsyncCommands<K,V>
,RedisHLLAsyncCommands<K,V>
,RedisKeyAsyncCommands<K,V>
,RedisListAsyncCommands<K,V>
,RedisScriptingAsyncCommands<K,V>
,RedisServerAsyncCommands<K,V>
,RedisSetAsyncCommands<K,V>
,RedisSortedSetAsyncCommands<K,V>
,RedisStreamAsyncCommands<K,V>
,RedisStringAsyncCommands<K,V>
,RedisTransactionalAsyncCommands<K,V>
,RedisClusterAsyncCommands<K,V>
- Direct Known Subclasses:
RedisAdvancedClusterAsyncCommandsImpl
,RedisAsyncCommandsImpl
public abstract class AbstractRedisAsyncCommands<K,V> extends Object implements RedisAclAsyncCommands<K,V>, RedisHashAsyncCommands<K,V>, RedisKeyAsyncCommands<K,V>, RedisStringAsyncCommands<K,V>, RedisListAsyncCommands<K,V>, RedisSetAsyncCommands<K,V>, RedisSortedSetAsyncCommands<K,V>, RedisScriptingAsyncCommands<K,V>, RedisServerAsyncCommands<K,V>, RedisHLLAsyncCommands<K,V>, BaseRedisAsyncCommands<K,V>, RedisTransactionalAsyncCommands<K,V>, RedisGeoAsyncCommands<K,V>, RedisClusterAsyncCommands<K,V>
An asynchronous and thread-safe API for a Redis connection.- Author:
- Will Glozer, Mark Paluch, Tugdual Grall, dengliming, Andrey Shlykov
-
-
Constructor Summary
Constructors Constructor Description AbstractRedisAsyncCommands(StatefulConnection<K,V> connection, RedisCodec<K,V> codec)
Initialize a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RedisFuture<Set<AclCategory>>
aclCat()
The command shows the available ACL categories if called without arguments.RedisFuture<Set<CommandType>>
aclCat(AclCategory category)
The command shows all the Redis commands in the specified category.RedisFuture<Long>
aclDeluser(String... usernames)
Delete all the specified ACL users and terminate all the connections that are authenticated with such users.RedisFuture<String>
aclDryRun(String username, RedisCommand<K,V,?> command)
Simulate the execution of a given command by a given user.RedisFuture<String>
aclDryRun(String username, String command, String... args)
Simulate the execution of a given command by a given user.RedisFuture<String>
aclGenpass()
The command generates a password.RedisFuture<String>
aclGenpass(int bits)
The command generates a password.RedisFuture<List<Object>>
aclGetuser(String username)
The command returns all the rules defined for an existing ACL user.RedisFuture<List<String>>
aclList()
The command shows the currently active ACL rules in the Redis server.RedisFuture<String>
aclLoad()
When Redis is configured to use an ACL file (with the aclfile configuration option), this command will reload the ACLs from the file, replacing all the current ACL rules with the ones defined in the file.RedisFuture<List<Map<String,Object>>>
aclLog()
The command shows a list of recent ACL security events.RedisFuture<List<Map<String,Object>>>
aclLog(int count)
The command shows a list of recent ACL security events.RedisFuture<String>
aclLogReset()
The command clears ACL security events.RedisFuture<String>
aclSave()
When Redis is configured to use an ACL file (with the aclfile configuration option), this command will save the currently defined ACLs from the server memory to the ACL file.RedisFuture<String>
aclSetuser(String username, AclSetuserArgs args)
Create an ACL user with the specified rules or modify the rules of an existing user.RedisFuture<List<String>>
aclUsers()
The command shows a list of all the usernames of the currently configured users in the Redis ACL system.RedisFuture<String>
aclWhoami()
The command shows a list of all the usernames of the currently configured users in the Redis ACL system.RedisFuture<Long>
append(K key, V value)
Append a value to a key.RedisFuture<String>
asking()
The asking command is required after a-ASK
redirection.RedisFuture<String>
auth(char[] password)
RedisFuture<String>
auth(CharSequence password)
Authenticate to the server.RedisFuture<String>
auth(String username, char[] password)
RedisFuture<String>
auth(String username, CharSequence password)
Authenticate to the server with username and password.RedisFuture<String>
bgrewriteaof()
Asynchronously rewrite the append-only file.RedisFuture<String>
bgsave()
Asynchronously save the dataset to disk.RedisFuture<Long>
bitcount(K key)
Count set bits in a string.RedisFuture<Long>
bitcount(K key, long start, long end)
Count set bits in a string.RedisFuture<List<Long>>
bitfield(K key, BitFieldArgs bitFieldArgs)
ExecuteBITFIELD
with its subcommands.RedisFuture<Long>
bitopAnd(K destination, K... keys)
Perform bitwise AND between strings.RedisFuture<Long>
bitopNot(K destination, K source)
Perform bitwise NOT between strings.RedisFuture<Long>
bitopOr(K destination, K... keys)
Perform bitwise OR between strings.RedisFuture<Long>
bitopXor(K destination, K... keys)
Perform bitwise XOR between strings.RedisFuture<Long>
bitpos(K key, boolean state)
Find first bit set or clear in a string.RedisFuture<Long>
bitpos(K key, boolean state, long start)
Find first bit set or clear in a string.RedisFuture<Long>
bitpos(K key, boolean state, long start, long end)
Find first bit set or clear in a string.RedisFuture<V>
blmove(K source, K destination, LMoveArgs args, double timeout)
Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination.RedisFuture<V>
blmove(K source, K destination, LMoveArgs args, long timeout)
Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination.RedisFuture<KeyValue<K,List<V>>>
blmpop(double timeout, LMPopArgs args, K... keys)
Remove and get the first/last elements in a list, or block until one is available.RedisFuture<KeyValue<K,List<V>>>
blmpop(long timeout, LMPopArgs args, K... keys)
Remove and get the first/last elements in a list, or block until one is available.RedisFuture<KeyValue<K,V>>
blpop(double timeout, K... keys)
Remove and get the first element in a list, or block until one is available.RedisFuture<KeyValue<K,V>>
blpop(long timeout, K... keys)
Remove and get the first element in a list, or block until one is available.RedisFuture<KeyValue<K,V>>
brpop(double timeout, K... keys)
Remove and get the last element in a list, or block until one is available.RedisFuture<KeyValue<K,V>>
brpop(long timeout, K... keys)
Remove and get the last element in a list, or block until one is available.RedisFuture<V>
brpoplpush(double timeout, K source, K destination)
Pop a value from a list, push it to another list and return it; or block until one is available.RedisFuture<V>
brpoplpush(long timeout, K source, K destination)
Pop a value from a list, push it to another list and return it; or block until one is available.RedisFuture<KeyValue<K,List<ScoredValue<V>>>>
bzmpop(double timeout, int count, ZPopArgs args, K... keys)
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of keys.RedisFuture<KeyValue<K,ScoredValue<V>>>
bzmpop(double timeout, ZPopArgs args, K... keys)
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of keys.RedisFuture<KeyValue<K,List<ScoredValue<V>>>>
bzmpop(long timeout, long count, ZPopArgs args, K... keys)
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of keys.RedisFuture<KeyValue<K,ScoredValue<V>>>
bzmpop(long timeout, ZPopArgs args, K... keys)
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of keys.RedisFuture<KeyValue<K,ScoredValue<V>>>
bzpopmax(double timeout, K... keys)
Removes and returns a member with the highest scores in the sorted set stored at one of the keys.RedisFuture<KeyValue<K,ScoredValue<V>>>
bzpopmax(long timeout, K... keys)
Removes and returns a member with the highest scores in the sorted set stored at one of the keys.RedisFuture<KeyValue<K,ScoredValue<V>>>
bzpopmin(double timeout, K... keys)
Removes and returns a member with the lowest scores in the sorted set stored at one of the keys.RedisFuture<KeyValue<K,ScoredValue<V>>>
bzpopmin(long timeout, K... keys)
Removes and returns a member with the lowest scores in the sorted set stored at one of the keys.RedisFuture<String>
clientCaching(boolean enabled)
Control tracking of keys in the context of server-assisted client cache invalidation.RedisFuture<K>
clientGetname()
Get the current connection name.RedisFuture<Long>
clientGetredir()
Returns the client ID we are redirecting our tracking notifications to.RedisFuture<Long>
clientId()
Get the id of the current connection.RedisFuture<String>
clientInfo()
Get the list of the current client connection.RedisFuture<Long>
clientKill(KillArgs killArgs)
Kill connections of clients which are filtered bykillArgs
.RedisFuture<String>
clientKill(String addr)
Kill the connection of a client identified by ip:port.RedisFuture<String>
clientList()
Get the list of client connections.RedisFuture<String>
clientList(ClientListArgs clientListArgs)
Get the list of client connections which are filtered byclientListArgs
.RedisFuture<String>
clientNoEvict(boolean on)
Sets the client eviction mode for the current connection.RedisFuture<String>
clientPause(long timeout)
Stop processing commands from clients for some time.RedisFuture<String>
clientSetinfo(String key, String value)
Assign various info attributes to the current connection.RedisFuture<String>
clientSetname(K name)
Set the current connection name.RedisFuture<String>
clientTracking(TrackingArgs args)
Enables the tracking feature of the Redis server, that is used for server assisted client side caching.RedisFuture<Long>
clientUnblock(long id, UnblockType type)
Unblock the specified blocked client.RedisFuture<String>
clusterAddSlots(int... slots)
Adds slots to the cluster node.RedisFuture<String>
clusterAddSlotsRange(Range<Integer>... ranges)
Takes a list of slot ranges (specified by start and end slots) to assign to the node.RedisFuture<String>
clusterBumpepoch()
Generate a new config epoch, incrementing the current epoch, assign the new epoch to this node, WITHOUT any consensus and persist the configuration on disk before sending packets with the new configuration.RedisFuture<Long>
clusterCountFailureReports(String nodeId)
Returns the number of failure reports for the specified node.RedisFuture<Long>
clusterCountKeysInSlot(int slot)
Returns the number of keys in the specified Redis Cluster hashslot
.RedisFuture<String>
clusterDelSlots(int... slots)
Removes slots from the cluster node.RedisFuture<String>
clusterDelSlotsRange(Range<Integer>... ranges)
Takes a list of slot ranges (specified by start and end slots) to remove to the node.RedisFuture<String>
clusterFailover(boolean force)
Failover a cluster node.RedisFuture<String>
clusterFailover(boolean force, boolean takeOver)
Failover a cluster node.RedisFuture<String>
clusterFlushslots()
Delete all the slots associated with the specified node.RedisFuture<String>
clusterForget(String nodeId)
Disallow connections and remove the cluster node from the cluster.RedisFuture<List<K>>
clusterGetKeysInSlot(int slot, int count)
Retrieve the list of keys within theslot
.RedisFuture<String>
clusterInfo()
Get information and statistics about the cluster viewed by the current node.RedisFuture<Long>
clusterKeyslot(K key)
Returns an integer identifying the hash slot the specified key hashes to.RedisFuture<String>
clusterMeet(String ip, int port)
Meet another cluster node to include the node into the cluster.RedisFuture<String>
clusterMyId()
Obtain the nodeId for the currently connected node.RedisFuture<String>
clusterNodes()
Obtain details about all cluster nodes.RedisFuture<List<String>>
clusterReplicas(String nodeId)
List replicas for a certain node identified by itsnodeId
.RedisFuture<String>
clusterReplicate(String nodeId)
Turn this node into a replica of the node with the idnodeId
.RedisFuture<String>
clusterReset(boolean hard)
Reset a node performing a soft or hard reset: All other nodes are forgotten All the assigned / open slots are released If the node is a replica, it turns into a master Only for hard reset: a new Node ID is generated Only for hard reset: currentEpoch and configEpoch are set to 0 The new configuration is saved and the cluster state updated If the node was a replica, the whole data set is flushed awayRedisFuture<String>
clusterSaveconfig()
Forces a node to save the nodes.conf configuration on disk.RedisFuture<String>
clusterSetConfigEpoch(long configEpoch)
This command sets a specific config epoch in a fresh node.RedisFuture<String>
clusterSetSlotImporting(int slot, String nodeId)
Flag a slot as IMPORTING (incoming) from the node specified innodeId
.RedisFuture<String>
clusterSetSlotMigrating(int slot, String nodeId)
Flag a slot as MIGRATING (outgoing) towards the node specified innodeId
.RedisFuture<String>
clusterSetSlotNode(int slot, String nodeId)
Assign a slot to a node.RedisFuture<String>
clusterSetSlotStable(int slot)
Clears migrating / importing state from the slot.RedisFuture<List<Object>>
clusterShards()
Get array of cluster shardsRedisFuture<List<String>>
clusterSlaves(String nodeId)
List replicas for a certain node identified by itsnodeId
.RedisFuture<List<Object>>
clusterSlots()
Get array of cluster slots to node mappings.RedisFuture<List<Object>>
command()
Returns an array reply of details about all Redis commands.RedisFuture<Long>
commandCount()
Get total number of Redis commands.RedisFuture<List<Object>>
commandInfo(CommandType... commands)
Returns an array reply of details about the requested commands.RedisFuture<List<Object>>
commandInfo(String... commands)
Returns an array reply of details about the requested commands.RedisFuture<Map<String,String>>
configGet(String parameter)
Get the value of a configuration parameter.RedisFuture<Map<String,String>>
configGet(String... parameters)
Get the value of multiple pattern parameters.RedisFuture<String>
configResetstat()
Reset the stats returned by INFO.RedisFuture<String>
configRewrite()
Rewrite the configuration file with the in memory configuration.RedisFuture<String>
configSet(String parameter, String value)
Set a configuration parameter to the given value.RedisFuture<String>
configSet(Map<String,String> kvs)
Set multiple parameters to the given value.RedisFuture<Boolean>
copy(K source, K destination)
Copy the value stored at the source key to the destination key.RedisFuture<Boolean>
copy(K source, K destination, CopyArgs copyArgs)
Copy the value stored at the source key to the destination key.RedisFuture<Long>
dbsize()
Return the number of keys in the selected database.RedisFuture<String>
debugCrashAndRecover(Long delay)
Crash and recover.RedisFuture<String>
debugHtstats(int db)
Get debugging information about the internal hash-table state.RedisFuture<String>
debugObject(K key)
Get debugging information about a key.void
debugOom()
Make the server crash: Out of memory.RedisFuture<String>
debugReload()
Save RDB, clear the database and reload RDB.RedisFuture<String>
debugRestart(Long delay)
Restart the server gracefully.RedisFuture<String>
debugSdslen(K key)
Get debugging information about the internal SDS length.void
debugSegfault()
Make the server crash: Invalid pointer access.RedisFuture<Long>
decr(K key)
Decrement the integer value of a key by one.RedisFuture<Long>
decrby(K key, long amount)
Decrement the integer value of a key by the given number.RedisFuture<Long>
del(Iterable<K> keys)
RedisFuture<Long>
del(K... keys)
Delete one or more keys.String
digest(byte[] script)
Create a SHA1 digest from a Lua script.String
digest(String script)
Create a SHA1 digest from a Lua script.RedisFuture<String>
discard()
Discard all commands issued after MULTI.protected <T> RedisFuture<T>
dispatch(CommandType type, CommandOutput<K,V,T> output)
protected <T> RedisFuture<T>
dispatch(CommandType type, CommandOutput<K,V,T> output, CommandArgs<K,V> args)
<T> RedisFuture<T>
dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output)
Dispatch a command to the Redis Server.<T> RedisFuture<T>
dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output, CommandArgs<K,V> args)
Dispatch a command to the Redis Server.<T> AsyncCommand<K,V,T>
dispatch(RedisCommand<K,V,T> cmd)
RedisFuture<byte[]>
dump(K key)
Return a serialized version of the value stored at the specified key.RedisFuture<V>
echo(V msg)
Echo the given string.<T> RedisFuture<T>
eval(byte[] script, ScriptOutputType type, K... keys)
Execute a Lua script server side.<T> RedisFuture<T>
eval(byte[] script, ScriptOutputType type, K[] keys, V... values)
Execute a Lua script server side.<T> RedisFuture<T>
eval(String script, ScriptOutputType type, K... keys)
Execute a Lua script server side.<T> RedisFuture<T>
eval(String script, ScriptOutputType type, K[] keys, V... values)
Execute a Lua script server side.<T> RedisFuture<T>
evalReadOnly(byte[] script, ScriptOutputType type, K[] keys, V... values)
This is a read-only variant of the EVAL command that cannot execute commands that modify data.<T> RedisFuture<T>
evalsha(String digest, ScriptOutputType type, K... keys)
Evaluates a script cached on the server side by its SHA1 digest.<T> RedisFuture<T>
evalsha(String digest, ScriptOutputType type, K[] keys, V... values)
Execute a Lua script server side.<T> RedisFuture<T>
evalshaReadOnly(String digest, ScriptOutputType type, K[] keys, V... values)
This is a read-only variant of the EVALSHA command that cannot execute commands that modify data.RedisFuture<TransactionResult>
exec()
Execute all commands issued after MULTI.RedisFuture<Long>
exists(Iterable<K> keys)
RedisFuture<Long>
exists(K... keys)
Determine how many keys exist.RedisFuture<Boolean>
expire(K key, long seconds)
Set a key's time to live in seconds.RedisFuture<Boolean>
expire(K key, long seconds, ExpireArgs expireArgs)
Set a key's time to live in seconds.RedisFuture<Boolean>
expire(K key, Duration seconds)
Set a key's time to live in seconds.RedisFuture<Boolean>
expire(K key, Duration seconds, ExpireArgs expireArgs)
Set a key's time to live in seconds.RedisFuture<Boolean>
expireat(K key, long timestamp)
Set the expiration for a key as a UNIX timestamp.RedisFuture<Boolean>
expireat(K key, long timestamp, ExpireArgs expireArgs)
Set the expiration for a key as a UNIX timestamp.RedisFuture<Boolean>
expireat(K key, Instant timestamp)
Set the expiration for a key as a UNIX timestamp.RedisFuture<Boolean>
expireat(K key, Instant timestamp, ExpireArgs expireArgs)
Set the expiration for a key as a UNIX timestamp.RedisFuture<Boolean>
expireat(K key, Date timestamp)
Set the expiration for a key as a UNIX timestamp.RedisFuture<Boolean>
expireat(K key, Date timestamp, ExpireArgs expireArgs)
Set the expiration for a key as a UNIX timestamp.RedisFuture<Long>
expiretime(K key)
Get the time to live for a key in as unix timestamp in seconds.<T> RedisFuture<T>
fcall(String function, ScriptOutputType type, K... keys)
Invoke a function.<T> RedisFuture<T>
fcall(String function, ScriptOutputType type, K[] keys, V... values)
Invoke a function.<T> RedisFuture<T>
fcallReadOnly(String function, ScriptOutputType type, K... keys)
Invoke a function in read-only mode.<T> RedisFuture<T>
fcallReadOnly(String function, ScriptOutputType type, K[] keys, V... values)
Invoke a function in read-only mode.RedisFuture<String>
flushall()
Remove all keys from all databases.RedisFuture<String>
flushall(FlushMode flushMode)
Remove all keys from all databases using the specifiedFlushMode
.RedisFuture<String>
flushallAsync()
Remove all keys asynchronously from all databases.void
flushCommands()
Flush pending commands.RedisFuture<String>
flushdb()
Remove all keys from the current database.RedisFuture<String>
flushdb(FlushMode flushMode)
Remove all keys from the current database using the specifiedFlushMode
.RedisFuture<String>
flushdbAsync()
Remove all keys asynchronously from the current database.RedisFuture<byte[]>
functionDump()
Return the serialized payload of loaded libraries.RedisFuture<String>
functionFlush(FlushMode flushMode)
Deletes all the libraries using the specifiedFlushMode
.RedisFuture<String>
functionKill()
Kill a function that is currently executing.RedisFuture<List<Map<String,Object>>>
functionList()
Return information about the functions and libraries.RedisFuture<List<Map<String,Object>>>
functionList(String libraryName)
Return information about the functions and libraries.RedisFuture<String>
functionLoad(String functionCode)
Load a library to Redis.RedisFuture<String>
functionLoad(String functionCode, boolean replace)
Load a library to Redis.RedisFuture<String>
functionRestore(byte[] dump)
You can restore the dumped payload of loaded libraries.RedisFuture<String>
functionRestore(byte[] dump, FunctionRestoreMode mode)
You can restore the dumped payload of loaded libraries.RedisFuture<Long>
geoadd(K key, double longitude, double latitude, V member)
Single geo add.RedisFuture<Long>
geoadd(K key, double longitude, double latitude, V member, GeoAddArgs args)
Single geo add.RedisFuture<Long>
geoadd(K key, GeoAddArgs args, GeoValue<V>... values)
Multi geo add.RedisFuture<Long>
geoadd(K key, GeoAddArgs args, Object... lngLatMember)
Multi geo add.RedisFuture<Long>
geoadd(K key, GeoValue<V>... values)
Multi geo add.RedisFuture<Long>
geoadd(K key, Object... lngLatMember)
Multi geo add.RedisFuture<Double>
geodist(K key, V from, V to, GeoArgs.Unit unit)
Retrieve distance between pointsfrom
andto
.RedisFuture<List<Value<String>>>
geohash(K key, V... members)
Retrieve Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index.RedisFuture<List<GeoCoordinates>>
geopos(K key, V... members)
Get geo coordinates for themembers
.RedisFuture<Set<V>>
georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)
Retrieve members selected by distance with the center oflongitude
andlatitude
.RedisFuture<List<GeoWithin<V>>>
georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
Retrieve members selected by distance with the center oflongitude
andlatitude
.RedisFuture<Long>
georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs<K> geoRadiusStoreArgs)
Perform aRedisGeoAsyncCommands.georadius(Object, double, double, double, GeoArgs.Unit, GeoArgs)
query and store the results in a sorted set.protected RedisFuture<Set<V>>
georadius_ro(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)
protected RedisFuture<List<GeoWithin<V>>>
georadius_ro(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
RedisFuture<Set<V>>
georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit)
Retrieve members selected by distance with the center ofmember
.RedisFuture<List<GeoWithin<V>>>
georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
Retrieve members selected by distance with the center ofmember
.RedisFuture<Long>
georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs<K> geoRadiusStoreArgs)
Perform aRedisGeoAsyncCommands.georadiusbymember(Object, Object, double, GeoArgs.Unit, GeoArgs)
query and store the results in a sorted set.protected RedisFuture<Set<V>>
georadiusbymember_ro(K key, V member, double distance, GeoArgs.Unit unit)
protected RedisFuture<List<GeoWithin<V>>>
georadiusbymember_ro(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
RedisFuture<Set<V>>
geosearch(K key, GeoSearch.GeoRef<K> reference, GeoSearch.GeoPredicate predicate)
Retrieve members selected by distance with the center ofreference
the searchpredicate
.RedisFuture<List<GeoWithin<V>>>
geosearch(K key, GeoSearch.GeoRef<K> reference, GeoSearch.GeoPredicate predicate, GeoArgs geoArgs)
Retrieve members selected by distance with the center ofreference
the searchpredicate
.RedisFuture<Long>
geosearchstore(K destination, K key, GeoSearch.GeoRef<K> reference, GeoSearch.GeoPredicate predicate, GeoArgs geoArgs, boolean storeDist)
Perform aRedisGeoAsyncCommands.geosearch(Object, GeoSearch.GeoRef, GeoSearch.GeoPredicate, GeoArgs)
query and store the results in a sorted set.RedisFuture<V>
get(K key)
Get the value of a key.RedisFuture<Long>
getbit(K key, long offset)
Returns the bit value at offset in the string value stored at key.StatefulConnection<K,V>
getConnection()
RedisFuture<V>
getdel(K key)
Get the value of key and delete the key.RedisFuture<V>
getex(K key, GetExArgs args)
Get the value of key and optionally set its expiration.RedisFuture<V>
getrange(K key, long start, long end)
Get a substring of the string stored at a key.RedisFuture<V>
getset(K key, V value)
Set the string value of a key and return its old value.RedisFuture<Long>
hdel(K key, K... fields)
Delete one or more hash fields.RedisFuture<Boolean>
hexists(K key, K field)
Determine if a hash field exists.RedisFuture<V>
hget(K key, K field)
Get the value of a hash field.RedisFuture<Long>
hgetall(KeyValueStreamingChannel<K,V> channel, K key)
Stream over all the fields and values in a hash.RedisFuture<Map<K,V>>
hgetall(K key)
Get all the fields and values in a hash.RedisFuture<Long>
hincrby(K key, K field, long amount)
Increment the integer value of a hash field by the given number.RedisFuture<Double>
hincrbyfloat(K key, K field, double amount)
Increment the float value of a hash field by the given amount.RedisFuture<Long>
hkeys(KeyStreamingChannel<K> channel, K key)
Stream over all the fields in a hash.RedisFuture<List<K>>
hkeys(K key)
Get all the fields in a hash.RedisFuture<Long>
hlen(K key)
Get the number of fields in a hash.RedisFuture<Long>
hmget(KeyValueStreamingChannel<K,V> channel, K key, K... fields)
Stream over the values of all the given hash fields.RedisFuture<List<KeyValue<K,V>>>
hmget(K key, K... fields)
Get the values of all the given hash fields.RedisFuture<String>
hmset(K key, Map<K,V> map)
Set multiple hash fields to multiple values.RedisFuture<K>
hrandfield(K key)
Return a random field from the hash stored atkey
.RedisFuture<List<K>>
hrandfield(K key, long count)
Returncount
random fields from the hash stored atkey
.RedisFuture<KeyValue<K,V>>
hrandfieldWithvalues(K key)
Return a random field along its value from the hash stored atkey
.RedisFuture<List<KeyValue<K,V>>>
hrandfieldWithvalues(K key, long count)
Returncount
random fields along their value from the hash stored atkey
.RedisFuture<StreamScanCursor>
hscan(KeyValueStreamingChannel<K,V> channel, K key)
Incrementally iterate hash fields and associated values.RedisFuture<StreamScanCursor>
hscan(KeyValueStreamingChannel<K,V> channel, K key, ScanArgs scanArgs)
Incrementally iterate hash fields and associated values.RedisFuture<StreamScanCursor>
hscan(KeyValueStreamingChannel<K,V> channel, K key, ScanCursor scanCursor)
Incrementally iterate hash fields and associated values.RedisFuture<StreamScanCursor>
hscan(KeyValueStreamingChannel<K,V> channel, K key, ScanCursor scanCursor, ScanArgs scanArgs)
Incrementally iterate hash fields and associated values.RedisFuture<MapScanCursor<K,V>>
hscan(K key)
Incrementally iterate hash fields and associated values.RedisFuture<MapScanCursor<K,V>>
hscan(K key, ScanArgs scanArgs)
Incrementally iterate hash fields and associated values.RedisFuture<MapScanCursor<K,V>>
hscan(K key, ScanCursor scanCursor)
Incrementally iterate hash fields and associated values.RedisFuture<MapScanCursor<K,V>>
hscan(K key, ScanCursor scanCursor, ScanArgs scanArgs)
Incrementally iterate hash fields and associated values.RedisFuture<Long>
hset(K key, Map<K,V> map)
Set multiple hash fields to multiple values.RedisFuture<Boolean>
hset(K key, K field, V value)
Set the string value of a hash field.RedisFuture<Boolean>
hsetnx(K key, K field, V value)
Set the value of a hash field, only if the field does not exist.RedisFuture<Long>
hstrlen(K key, K field)
Get the string length of the field value in a hash.RedisFuture<Long>
hvals(ValueStreamingChannel<V> channel, K key)
Stream over all the values in a hash.RedisFuture<List<V>>
hvals(K key)
Get all the values in a hash.RedisFuture<Long>
incr(K key)
Increment the integer value of a key by one.RedisFuture<Long>
incrby(K key, long amount)
Increment the integer value of a key by the given amount.RedisFuture<Double>
incrbyfloat(K key, double amount)
Increment the float value of a key by the given amount.RedisFuture<String>
info()
Get information and statistics about the server.RedisFuture<String>
info(String section)
Get information and statistics about the server.boolean
isOpen()
RedisFuture<Long>
keys(KeyStreamingChannel<K> channel, K pattern)
Find all keys matching the given pattern.RedisFuture<List<K>>
keys(K pattern)
Find all keys matching the given pattern.RedisFuture<Date>
lastsave()
Get the UNIX time stamp of the last successful save to disk.RedisFuture<V>
lindex(K key, long index)
Get an element from a list by its index.RedisFuture<Long>
linsert(K key, boolean before, V pivot, V value)
Insert an element before or after another element in a list.RedisFuture<Long>
llen(K key)
Get the length of a list.RedisFuture<V>
lmove(K source, K destination, LMoveArgs args)
Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination.RedisFuture<KeyValue<K,List<V>>>
lmpop(LMPopArgs args, K... keys)
Remove and get the first/last elements in a list.RedisFuture<V>
lpop(K key)
Remove and get the first element in a list.RedisFuture<List<V>>
lpop(K key, long count)
Remove and get the firstcount
elements in a list.RedisFuture<Long>
lpos(K key, V value)
Return the index of matching elements inside a Redis list.RedisFuture<List<Long>>
lpos(K key, V value, int count)
Return the index of matching elements inside a Redis list using theCOUNT
option.RedisFuture<List<Long>>
lpos(K key, V value, int count, LPosArgs args)
Return the index of matching elements inside a Redis list using theCOUNT
option.RedisFuture<Long>
lpos(K key, V value, LPosArgs args)
Return the index of matching elements inside a Redis list.RedisFuture<Long>
lpush(K key, V... values)
Prepend one or multiple values to a list.RedisFuture<Long>
lpushx(K key, V... values)
Prepend values to a list, only if the list exists.RedisFuture<Long>
lrange(ValueStreamingChannel<V> channel, K key, long start, long stop)
Get a range of elements from a list.RedisFuture<List<V>>
lrange(K key, long start, long stop)
Get a range of elements from a list.RedisFuture<Long>
lrem(K key, long count, V value)
Remove elements from a list.RedisFuture<String>
lset(K key, long index, V value)
Set the value of an element in a list by its index.RedisFuture<String>
ltrim(K key, long start, long stop)
Trim a list to the specified range.RedisFuture<Long>
memoryUsage(K key)
Reports the number of bytes that a key and its value require to be stored in RAM.RedisFuture<Long>
mget(KeyValueStreamingChannel<K,V> channel, Iterable<K> keys)
RedisFuture<Long>
mget(KeyValueStreamingChannel<K,V> channel, K... keys)
Stream over the values of all the given keys.RedisFuture<List<KeyValue<K,V>>>
mget(Iterable<K> keys)
RedisFuture<List<KeyValue<K,V>>>
mget(K... keys)
Get the values of all the given keys.RedisFuture<String>
migrate(String host, int port, int db, long timeout, MigrateArgs<K> migrateArgs)
Atomically transfer one or more keys from a Redis instance to another one.RedisFuture<String>
migrate(String host, int port, K key, int db, long timeout)
Atomically transfer a key from a Redis instance to another one.RedisFuture<Boolean>
move(K key, int db)
Move a key to another database.RedisFuture<String>
mset(Map<K,V> map)
Set multiple keys to multiple values.RedisFuture<Boolean>
msetnx(Map<K,V> map)
Set multiple keys to multiple values, only if none of the keys exist.RedisFuture<String>
multi()
Mark the start of a transaction block.RedisFuture<String>
objectEncoding(K key)
Returns the kind of internal representation used in order to store the value associated with thekey
.RedisFuture<Long>
objectFreq(K key)
Returns the logarithmic access frequency counter of the object stored at the specifiedkey
.RedisFuture<Long>
objectIdletime(K key)
Returns the number of seconds since the object stored at the specified key is idle (not requested by read or write operations).RedisFuture<Long>
objectRefcount(K key)
Returns the number of references of the value associated with the specified key.RedisFuture<Boolean>
persist(K key)
Remove the expiration from a key.RedisFuture<Boolean>
pexpire(K key, long milliseconds)
Set a key's time to live in milliseconds.RedisFuture<Boolean>
pexpire(K key, long milliseconds, ExpireArgs expireArgs)
Set a key's time to live in milliseconds.RedisFuture<Boolean>
pexpire(K key, Duration milliseconds)
Set a key's time to live in milliseconds.RedisFuture<Boolean>
pexpire(K key, Duration milliseconds, ExpireArgs expireArgs)
Set a key's time to live in milliseconds.RedisFuture<Boolean>
pexpireat(K key, long timestamp)
Set the expiration for a key as a UNIX timestamp specified in milliseconds.RedisFuture<Boolean>
pexpireat(K key, long timestamp, ExpireArgs expireArgs)
Set the expiration for a key as a UNIX timestamp specified in milliseconds.RedisFuture<Boolean>
pexpireat(K key, Instant timestamp)
Set the expiration for a key as a UNIX timestamp specified in milliseconds.RedisFuture<Boolean>
pexpireat(K key, Instant timestamp, ExpireArgs expireArgs)
Set the expiration for a key as a UNIX timestamp specified in milliseconds.RedisFuture<Boolean>
pexpireat(K key, Date timestamp)
Set the expiration for a key as a UNIX timestamp specified in milliseconds.RedisFuture<Boolean>
pexpireat(K key, Date timestamp, ExpireArgs expireArgs)
Set the expiration for a key as a UNIX timestamp specified in milliseconds.RedisFuture<Long>
pexpiretime(K key)
Get the time to live for a key in as unix timestamp in milliseconds.RedisFuture<Long>
pfadd(K key, V... values)
Adds the specified elements to the specified HyperLogLog.RedisFuture<Long>
pfcount(K... keys)
Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).RedisFuture<String>
pfmerge(K destkey, K... sourcekeys)
Merge N different HyperLogLogs into a single one.RedisFuture<String>
ping()
Ping the server.RedisFuture<String>
psetex(K key, long milliseconds, V value)
Set the value and expiration in milliseconds of a key.RedisFuture<Long>
pttl(K key)
Get the time to live for a key in milliseconds.RedisFuture<Long>
publish(K channel, V message)
Post a message to a channel.RedisFuture<List<K>>
pubsubChannels()
Lists the currently *active channels*.RedisFuture<List<K>>
pubsubChannels(K channel)
Lists the currently *active channels*.RedisFuture<Long>
pubsubNumpat()
Returns the number of subscriptions to patterns.RedisFuture<Map<K,Long>>
pubsubNumsub(K... channels)
Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channels.RedisFuture<String>
quit()
Instructs Redis to disconnect the connection.RedisFuture<K>
randomkey()
Return a random key from the keyspace.RedisFuture<String>
readOnly()
Switch connection to Read-Only mode when connecting to a cluster.RedisFuture<String>
readWrite()
Switch connection to Read-Write mode (default) when connecting to a cluster.RedisFuture<String>
rename(K key, K newKey)
Rename a key.RedisFuture<Boolean>
renamenx(K key, K newKey)
Rename a key, only if the new key does not exist.RedisFuture<String>
replicaof(String host, int port)
Make the server a replica of another instance.RedisFuture<String>
replicaofNoOne()
Promote server as master.void
reset()
Reset the command state.RedisFuture<String>
restore(K key, byte[] value, RestoreArgs args)
Create a key using the provided serialized value, previously obtained using DUMP.RedisFuture<String>
restore(K key, long ttl, byte[] value)
Create a key using the provided serialized value, previously obtained using DUMP.RedisFuture<List<Object>>
role()
Return the role of the instance in the context of replication.RedisFuture<V>
rpop(K key)
Remove and get the last element in a list.RedisFuture<List<V>>
rpop(K key, long count)
Remove and get the lastcount
elements in a list.RedisFuture<V>
rpoplpush(K source, K destination)
Remove the last element in a list, append it to another list and return it.RedisFuture<Long>
rpush(K key, V... values)
Append one or multiple values to a list.RedisFuture<Long>
rpushx(K key, V... values)
Append values to a list, only if the list exists.RedisFuture<Long>
sadd(K key, V... members)
Add one or more members to a set.RedisFuture<String>
save()
Synchronously save the dataset to disk.RedisFuture<KeyScanCursor<K>>
scan()
Incrementally iterate the keys space.RedisFuture<StreamScanCursor>
scan(KeyStreamingChannel<K> channel)
Incrementally iterate the keys space.RedisFuture<StreamScanCursor>
scan(KeyStreamingChannel<K> channel, ScanArgs scanArgs)
Incrementally iterate the keys space.RedisFuture<StreamScanCursor>
scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor)
Incrementally iterate the keys space.RedisFuture<StreamScanCursor>
scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor, ScanArgs scanArgs)
Incrementally iterate the keys space.RedisFuture<KeyScanCursor<K>>
scan(ScanArgs scanArgs)
Incrementally iterate the keys space.RedisFuture<KeyScanCursor<K>>
scan(ScanCursor scanCursor)
Incrementally iterate the keys space.RedisFuture<KeyScanCursor<K>>
scan(ScanCursor scanCursor, ScanArgs scanArgs)
Incrementally iterate the keys space.RedisFuture<Long>
scard(K key)
Get the number of members in a set.RedisFuture<List<Boolean>>
scriptExists(String... digests)
Check existence of scripts in the script cache.RedisFuture<String>
scriptFlush()
Remove all the scripts from the script cache.RedisFuture<String>
scriptFlush(FlushMode flushMode)
Remove all the scripts from the script cache using the specifiedFlushMode
.RedisFuture<String>
scriptKill()
Kill the script currently in execution.RedisFuture<String>
scriptLoad(byte[] script)
Load the specified Lua script into the script cache.RedisFuture<String>
scriptLoad(String script)
Load the specified Lua script into the script cache.RedisFuture<Long>
sdiff(ValueStreamingChannel<V> channel, K... keys)
Subtract multiple sets.RedisFuture<Set<V>>
sdiff(K... keys)
Subtract multiple sets.RedisFuture<Long>
sdiffstore(K destination, K... keys)
Subtract multiple sets and store the resulting set in a key.RedisFuture<String>
select(int db)
RedisFuture<String>
set(K key, V value)
Set the string value of a key.RedisFuture<String>
set(K key, V value, SetArgs setArgs)
Set the string value of a key.void
setAutoFlushCommands(boolean autoFlush)
Disable or enable auto-flush behavior.RedisFuture<Long>
setbit(K key, long offset, int value)
Sets or clears the bit at offset in the string value stored at key.RedisFuture<String>
setex(K key, long seconds, V value)
Set the value and expiration of a key.RedisFuture<V>
setGet(K key, V value)
Set the string value of a key and return its old value.RedisFuture<V>
setGet(K key, V value, SetArgs setArgs)
Set the string value of a key and return its old value.RedisFuture<Boolean>
setnx(K key, V value)
Set the value of a key, only if the key does not exist.RedisFuture<Long>
setrange(K key, long offset, V value)
Overwrite part of a string at key starting at the specified offset.void
setTimeout(Duration timeout)
Set the default timeout for operations.void
shutdown(boolean save)
Synchronously save the dataset to disk and then shut down the server.void
shutdown(ShutdownArgs args)
Synchronously save the dataset to disk and then shutdown the server.RedisFuture<Long>
sinter(ValueStreamingChannel<V> channel, K... keys)
Intersect multiple sets.RedisFuture<Set<V>>
sinter(K... keys)
Intersect multiple sets.RedisFuture<Long>
sintercard(long limit, K... keys)
This command works exactly likeRedisSetAsyncCommands.sinter(java.lang.Object[])
but instead of returning the result set, it returns just the cardinality of the result.RedisFuture<Long>
sintercard(K... keys)
This command works exactly likeRedisSetAsyncCommands.sinter(java.lang.Object[])
but instead of returning the result set, it returns just the cardinality of the result.RedisFuture<Long>
sinterstore(K destination, K... keys)
Intersect multiple sets and store the resulting set in a key.RedisFuture<Boolean>
sismember(K key, V member)
Determine if a given value is a member of a set.RedisFuture<String>
slaveof(String host, int port)
Make the server a replica of another instance.RedisFuture<String>
slaveofNoOne()
Promote server as master.RedisFuture<List<Object>>
slowlogGet()
Read the slow log.RedisFuture<List<Object>>
slowlogGet(int count)
Read the slow log.RedisFuture<Long>
slowlogLen()
Obtaining the current length of the slow log.RedisFuture<String>
slowlogReset()
Resetting the slow log.RedisFuture<Long>
smembers(ValueStreamingChannel<V> channel, K key)
Get all the members in a set.RedisFuture<Set<V>>
smembers(K key)
Get all the members in a set.RedisFuture<List<Boolean>>
smismember(K key, V... members)
Returns whether each member is a member of the set stored at key.RedisFuture<Boolean>
smove(K source, K destination, V member)
Move a member from one set to another.RedisFuture<Long>
sort(ValueStreamingChannel<V> channel, K key)
Sort the elements in a list, set or sorted set.RedisFuture<Long>
sort(ValueStreamingChannel<V> channel, K key, SortArgs sortArgs)
Sort the elements in a list, set or sorted set.RedisFuture<List<V>>
sort(K key)
Sort the elements in a list, set or sorted set.RedisFuture<List<V>>
sort(K key, SortArgs sortArgs)
Sort the elements in a list, set or sorted set.RedisFuture<Long>
sortReadOnly(ValueStreamingChannel<V> channel, K key)
Sort the elements in a list, set or sorted set.RedisFuture<Long>
sortReadOnly(ValueStreamingChannel<V> channel, K key, SortArgs sortArgs)
Sort the elements in a list, set or sorted set.RedisFuture<List<V>>
sortReadOnly(K key)
Sort the elements in a list, set or sorted set.RedisFuture<List<V>>
sortReadOnly(K key, SortArgs sortArgs)
Sort the elements in a list, set or sorted set.RedisFuture<Long>
sortStore(K key, SortArgs sortArgs, K destination)
Sort the elements in a list, set or sorted set.RedisFuture<V>
spop(K key)
Remove and return a random member from a set.RedisFuture<Set<V>>
spop(K key, long count)
Remove and return one or multiple random members from a set.RedisFuture<Long>
srandmember(ValueStreamingChannel<V> channel, K key, long count)
Get one or multiple random members from a set.RedisFuture<V>
srandmember(K key)
Get one random member from a set.RedisFuture<List<V>>
srandmember(K key, long count)
Get one or multiple random members from a set.RedisFuture<Long>
srem(K key, V... members)
Remove one or more members from a set.RedisFuture<StreamScanCursor>
sscan(ValueStreamingChannel<V> channel, K key)
Incrementally iterate Set elements.RedisFuture<StreamScanCursor>
sscan(ValueStreamingChannel<V> channel, K key, ScanArgs scanArgs)
Incrementally iterate Set elements.RedisFuture<StreamScanCursor>
sscan(ValueStreamingChannel<V> channel, K key, ScanCursor scanCursor)
Incrementally iterate Set elements.RedisFuture<StreamScanCursor>
sscan(ValueStreamingChannel<V> channel, K key, ScanCursor scanCursor, ScanArgs scanArgs)
Incrementally iterate Set elements.RedisFuture<ValueScanCursor<V>>
sscan(K key)
Incrementally iterate Set elements.RedisFuture<ValueScanCursor<V>>
sscan(K key, ScanArgs scanArgs)
Incrementally iterate Set elements.RedisFuture<ValueScanCursor<V>>
sscan(K key, ScanCursor scanCursor)
Incrementally iterate Set elements.RedisFuture<ValueScanCursor<V>>
sscan(K key, ScanCursor scanCursor, ScanArgs scanArgs)
Incrementally iterate Set elements.RedisFuture<StringMatchResult>
stralgoLcs(StrAlgoArgs args)
The STRALGO command implements complex algorithms that operate on strings.RedisFuture<Long>
strlen(K key)
Get the length of the value stored in a key.RedisFuture<Long>
sunion(ValueStreamingChannel<V> channel, K... keys)
Add multiple sets.RedisFuture<Set<V>>
sunion(K... keys)
Add multiple sets.RedisFuture<Long>
sunionstore(K destination, K... keys)
Add multiple sets and store the resulting set in a key.RedisFuture<String>
swapdb(int db1, int db2)
RedisFuture<List<V>>
time()
Return the current server time.RedisFuture<Long>
touch(Iterable<K> keys)
RedisFuture<Long>
touch(K... keys)
Touch one or more keys.RedisFuture<Long>
ttl(K key)
Get the time to live for a key.RedisFuture<String>
type(K key)
Determine the type stored at key.RedisFuture<Long>
unlink(Iterable<K> keys)
RedisFuture<Long>
unlink(K... keys)
Unlink one or more keys (non blocking DEL).RedisFuture<String>
unwatch()
Forget about all watched keys.RedisFuture<Long>
waitForReplication(int replicas, long timeout)
Wait for replication.RedisFuture<String>
watch(K... keys)
Watch the given keys to determine execution of the MULTI/EXEC block.RedisFuture<Long>
xack(K key, K group, String... messageIds)
Acknowledge one or more messages as processed.RedisFuture<String>
xadd(K key, XAddArgs args, Object... keysAndValues)
Append a message to the streamkey
.RedisFuture<String>
xadd(K key, XAddArgs args, Map<K,V> body)
Append a message to the streamkey
.RedisFuture<String>
xadd(K key, Object... keysAndValues)
Append a message to the streamkey
.RedisFuture<String>
xadd(K key, Map<K,V> body)
Append a message to the streamkey
.RedisFuture<ClaimedMessages<K,V>>
xautoclaim(K key, XAutoClaimArgs<K> args)
Gets ownership of one or multiple messages in the Pending Entries List of a given stream consumer group.RedisFuture<List<StreamMessage<K,V>>>
xclaim(K key, Consumer<K> consumer, long minIdleTime, String... messageIds)
Gets ownership of one or multiple messages in the Pending Entries List of a given stream consumer group.RedisFuture<List<StreamMessage<K,V>>>
xclaim(K key, Consumer<K> consumer, XClaimArgs args, String... messageIds)
Gets ownership of one or multiple messages in the Pending Entries List of a given stream consumer group.RedisFuture<Long>
xdel(K key, String... messageIds)
Removes the specified entries from the stream.RedisFuture<String>
xgroupCreate(XReadArgs.StreamOffset<K> offset, K group)
Create a consumer group.RedisFuture<String>
xgroupCreate(XReadArgs.StreamOffset<K> offset, K group, XGroupCreateArgs args)
Create a consumer group.RedisFuture<Boolean>
xgroupCreateconsumer(K key, Consumer<K> consumer)
Create a consumer from a consumer group.RedisFuture<Long>
xgroupDelconsumer(K key, Consumer<K> consumer)
Delete a consumer from a consumer group.RedisFuture<Boolean>
xgroupDestroy(K key, K group)
Destroy a consumer group.RedisFuture<String>
xgroupSetid(XReadArgs.StreamOffset<K> offset, K group)
Set the currentgroup
id.RedisFuture<List<Object>>
xinfoConsumers(K key, K group)
Retrieve information about consumer groups of groupgroup
and stream atkey
.RedisFuture<List<Object>>
xinfoGroups(K key)
Retrieve information about the stream consumer groups atkey
.RedisFuture<List<Object>>
xinfoStream(K key)
Retrieve information about the stream atkey
.RedisFuture<Long>
xlen(K key)
Get the length of a steam.RedisFuture<List<PendingMessage>>
xpending(K key, Consumer<K> consumer, Range<String> range, Limit limit)
Read pending messages from a stream within a specificRange
.RedisFuture<List<PendingMessage>>
xpending(K key, XPendingArgs<K> args)
Read pending messages from a stream within a specificXPendingArgs
.RedisFuture<PendingMessages>
xpending(K key, K group)
Read pending messages from a stream for agroup
.RedisFuture<List<PendingMessage>>
xpending(K key, K group, Range<String> range, Limit limit)
Read pending messages from a stream within a specificRange
.RedisFuture<List<StreamMessage<K,V>>>
xrange(K key, Range<String> range)
Read messages from a stream within a specificRange
.RedisFuture<List<StreamMessage<K,V>>>
xrange(K key, Range<String> range, Limit limit)
RedisFuture<List<StreamMessage<K,V>>>
xread(XReadArgs.StreamOffset<K>... streams)
Read messages from one or moreXReadArgs.StreamOffset
s.RedisFuture<List<StreamMessage<K,V>>>
xread(XReadArgs args, XReadArgs.StreamOffset<K>... streams)
Read messages from one or moreXReadArgs.StreamOffset
s.RedisFuture<List<StreamMessage<K,V>>>
xreadgroup(Consumer<K> consumer, XReadArgs.StreamOffset<K>... streams)
Read messages from one or moreXReadArgs.StreamOffset
s using a consumer group.RedisFuture<List<StreamMessage<K,V>>>
xreadgroup(Consumer<K> consumer, XReadArgs args, XReadArgs.StreamOffset<K>... streams)
Read messages from one or moreXReadArgs.StreamOffset
s using a consumer group.RedisFuture<List<StreamMessage<K,V>>>
xrevrange(K key, Range<String> range)
Read messages from a stream within a specificRange
in reverse order.RedisFuture<List<StreamMessage<K,V>>>
xrevrange(K key, Range<String> range, Limit limit)
RedisFuture<Long>
xtrim(K key, boolean approximateTrimming, long count)
Trims the stream tocount
elements.RedisFuture<Long>
xtrim(K key, long count)
Trims the stream tocount
elements.RedisFuture<Long>
xtrim(K key, XTrimArgs args)
Trims the stream within a specificXTrimArgs
.RedisFuture<Long>
zadd(K key, double score, V member)
Add one or more members to a sorted set, or update its score if it already exists.RedisFuture<Long>
zadd(K key, ScoredValue<V>... scoredValues)
Add one or more members to a sorted set, or update its score if it already exists.RedisFuture<Long>
zadd(K key, ZAddArgs zAddArgs, double score, V member)
Add one or more members to a sorted set, or update its score if it already exists.RedisFuture<Long>
zadd(K key, ZAddArgs zAddArgs, ScoredValue<V>... scoredValues)
Add one or more members to a sorted set, or update its score if it already exists.RedisFuture<Long>
zadd(K key, ZAddArgs zAddArgs, Object... scoresAndValues)
Add one or more members to a sorted set, or update its score if it already exists.RedisFuture<Long>
zadd(K key, Object... scoresAndValues)
Add one or more members to a sorted set, or update its score if it already exists.RedisFuture<Double>
zaddincr(K key, double score, V member)
Add one or more members to a sorted set, or update its score if it already exists applying theINCR
option.RedisFuture<Double>
zaddincr(K key, ZAddArgs zAddArgs, double score, V member)
Add one or more members to a sorted set, or update its score if it already exists applying theINCR
option.RedisFuture<Long>
zcard(K key)
Get the number of members in a sorted set.RedisFuture<Long>
zcount(K key, double min, double max)
Count the members in a sorted set with scores within the given values.RedisFuture<Long>
zcount(K key, Range<? extends Number> range)
Count the members in a sorted set with scores within the givenRange
.RedisFuture<Long>
zcount(K key, String min, String max)
Count the members in a sorted set with scores within the given values.RedisFuture<List<V>>
zdiff(K... keys)
Computes the difference between the first and all successive input sorted sets.RedisFuture<Long>
zdiffstore(K destKey, K... srcKeys)
Computes the difference between the first and all successive input sorted sets and stores the result in destination.RedisFuture<List<ScoredValue<V>>>
zdiffWithScores(K... keys)
Computes the difference between the first and all successive input sorted sets.RedisFuture<Double>
zincrby(K key, double amount, V member)
Increment the score of a member in a sorted set.RedisFuture<List<V>>
zinter(ZAggregateArgs aggregateArgs, K... keys)
Intersect multiple sorted sets and returns the resulting sorted.RedisFuture<List<V>>
zinter(K... keys)
Intersect multiple sorted sets and returns the resulting sorted.RedisFuture<Long>
zintercard(long limit, K... keys)
This command is similar toRedisSortedSetAsyncCommands.zinter(java.lang.Object[])
, but instead of returning the result set, it returns just the cardinality of the result.RedisFuture<Long>
zintercard(K... keys)
This command is similar toRedisSortedSetAsyncCommands.zinter(java.lang.Object[])
, but instead of returning the result set, it returns just the cardinality of the result.RedisFuture<Long>
zinterstore(K destination, ZStoreArgs zStoreArgs, K... keys)
Intersect multiple sorted sets and store the resulting sorted set in a new key.RedisFuture<Long>
zinterstore(K destination, K... keys)
Intersect multiple sorted sets and store the resulting sorted set in a new key.RedisFuture<List<ScoredValue<V>>>
zinterWithScores(ZAggregateArgs aggregateArgs, K... keys)
Intersect multiple sorted sets and returns the resulting sorted.RedisFuture<List<ScoredValue<V>>>
zinterWithScores(K... keys)
Intersect multiple sorted sets and returns the resulting sorted.RedisFuture<Long>
zlexcount(K key, Range<? extends V> range)
Count the number of members in a sorted set between a given lexicographical range.RedisFuture<Long>
zlexcount(K key, String min, String max)
Count the number of members in a sorted set between a given lexicographical range.RedisFuture<KeyValue<K,List<ScoredValue<V>>>>
zmpop(int count, ZPopArgs args, K... keys)
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of keys.RedisFuture<KeyValue<K,ScoredValue<V>>>
zmpop(ZPopArgs args, K... keys)
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of keys.RedisFuture<List<Double>>
zmscore(K key, V... members)
Returns the scores associated with the specified members in the sorted set stored at key.RedisFuture<ScoredValue<V>>
zpopmax(K key)
Removes and returns up to count members with the highest scores in the sorted set stored at key.RedisFuture<List<ScoredValue<V>>>
zpopmax(K key, long count)
Removes and returns up to count members with the highest scores in the sorted set stored at key.RedisFuture<ScoredValue<V>>
zpopmin(K key)
Removes and returns up to count members with the lowest scores in the sorted set stored at key.RedisFuture<List<ScoredValue<V>>>
zpopmin(K key, long count)
Removes and returns up to count members with the lowest scores in the sorted set stored at key.RedisFuture<V>
zrandmember(K key)
Return a random member from the sorted set stored atkey
.RedisFuture<List<V>>
zrandmember(K key, long count)
Returncount
random members from the sorted set stored atkey
.RedisFuture<ScoredValue<V>>
zrandmemberWithScores(K key)
Return a random member along its value from the sorted set stored atkey
.RedisFuture<List<ScoredValue<V>>>
zrandmemberWithScores(K key, long count)
Returncount
random members along their value from the sorted set stored atkey
.RedisFuture<Long>
zrange(ValueStreamingChannel<V> channel, K key, long start, long stop)
Return a range of members in a sorted set, by index.RedisFuture<List<V>>
zrange(K key, long start, long stop)
Return a range of members in a sorted set, by index.RedisFuture<List<V>>
zrangebylex(K key, Range<? extends V> range)
Return a range of members in a sorted set, by lexicographical range.RedisFuture<List<V>>
zrangebylex(K key, Range<? extends V> range, Limit limit)
Return a range of members in a sorted set, by lexicographical range.RedisFuture<List<V>>
zrangebylex(K key, String min, String max)
Return a range of members in a sorted set, by lexicographical range.RedisFuture<List<V>>
zrangebylex(K key, String min, String max, long offset, long count)
Return a range of members in a sorted set, by lexicographical range.RedisFuture<Long>
zrangebyscore(ValueStreamingChannel<V> channel, K key, double min, double max)
Stream over a range of members in a sorted set, by score.RedisFuture<Long>
zrangebyscore(ValueStreamingChannel<V> channel, K key, double min, double max, long offset, long count)
Stream over range of members in a sorted set, by score.RedisFuture<Long>
zrangebyscore(ValueStreamingChannel<V> channel, K key, Range<? extends Number> range)
Stream over a range of members in a sorted set, by score.RedisFuture<Long>
zrangebyscore(ValueStreamingChannel<V> channel, K key, Range<? extends Number> range, Limit limit)
Stream over a range of members in a sorted set, by score.RedisFuture<Long>
zrangebyscore(ValueStreamingChannel<V> channel, K key, String min, String max)
Stream over a range of members in a sorted set, by score.RedisFuture<Long>
zrangebyscore(ValueStreamingChannel<V> channel, K key, String min, String max, long offset, long count)
Stream over a range of members in a sorted set, by score.RedisFuture<List<V>>
zrangebyscore(K key, double min, double max)
Return a range of members in a sorted set, by score.RedisFuture<List<V>>
zrangebyscore(K key, double min, double max, long offset, long count)
Return a range of members in a sorted set, by score.RedisFuture<List<V>>
zrangebyscore(K key, Range<? extends Number> range)
Return a range of members in a sorted set, by score.RedisFuture<List<V>>
zrangebyscore(K key, Range<? extends Number> range, Limit limit)
Return a range of members in a sorted set, by score.RedisFuture<List<V>>
zrangebyscore(K key, String min, String max)
Return a range of members in a sorted set, by score.RedisFuture<List<V>>
zrangebyscore(K key, String min, String max, long offset, long count)
Return a range of members in a sorted set, by score.RedisFuture<Long>
zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, double min, double max)
Stream over a range of members with scores in a sorted set, by score.RedisFuture<Long>
zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, double min, double max, long offset, long count)
Stream over a range of members with scores in a sorted set, by score.RedisFuture<Long>
zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, Range<? extends Number> range)
Stream over a range of members with scores in a sorted set, by score.RedisFuture<Long>
zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, Range<? extends Number> range, Limit limit)
Stream over a range of members with scores in a sorted set, by score.RedisFuture<Long>
zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, String min, String max)
Stream over a range of members with scores in a sorted set, by score.RedisFuture<Long>
zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, String min, String max, long offset, long count)
Stream over a range of members with scores in a sorted set, by score.RedisFuture<List<ScoredValue<V>>>
zrangebyscoreWithScores(K key, double min, double max)
Return a range of members with score in a sorted set, by score.RedisFuture<List<ScoredValue<V>>>
zrangebyscoreWithScores(K key, double min, double max, long offset, long count)
Return a range of members with score in a sorted set, by score.RedisFuture<List<ScoredValue<V>>>
zrangebyscoreWithScores(K key, Range<? extends Number> range)
Return a range of members with score in a sorted set, by score.RedisFuture<List<ScoredValue<V>>>
zrangebyscoreWithScores(K key, Range<? extends Number> range, Limit limit)
Return a range of members with score in a sorted set, by score.RedisFuture<List<ScoredValue<V>>>
zrangebyscoreWithScores(K key, String min, String max)
Return a range of members with score in a sorted set, by score.RedisFuture<List<ScoredValue<V>>>
zrangebyscoreWithScores(K key, String min, String max, long offset, long count)
Return a range of members with score in a sorted set, by score.RedisFuture<Long>
zrangestore(K dstKey, K srcKey, Range<Long> range)
Get the specified range of elements in the sorted set stored atsrcKey
and stores the result in thedstKey
destination key.RedisFuture<Long>
zrangestorebylex(K dstKey, K srcKey, Range<? extends V> range, Limit limit)
Get the specified range of elements in the sorted set stored atsrcKey
and stores the result in thedstKey
destination key.RedisFuture<Long>
zrangestorebyscore(K dstKey, K srcKey, Range<? extends Number> range, Limit limit)
Get the specified range of elements in the sorted set stored atsrcKey
and stores the result in thedstKey
destination key.RedisFuture<Long>
zrangeWithScores(ScoredValueStreamingChannel<V> channel, K key, long start, long stop)
Stream over a range of members with scores in a sorted set, by index.RedisFuture<List<ScoredValue<V>>>
zrangeWithScores(K key, long start, long stop)
Return a range of members with scores in a sorted set, by index.RedisFuture<Long>
zrank(K key, V member)
Determine the index of a member in a sorted set.RedisFuture<ScoredValue<Long>>
zrankWithScore(K key, V member)
Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.RedisFuture<Long>
zrem(K key, V... members)
Remove one or more members from a sorted set.RedisFuture<Long>
zremrangebylex(K key, Range<? extends V> range)
Remove all members in a sorted set between the given lexicographical range.RedisFuture<Long>
zremrangebylex(K key, String min, String max)
Remove all members in a sorted set between the given lexicographical range.RedisFuture<Long>
zremrangebyrank(K key, long start, long stop)
Remove all members in a sorted set within the given indexes.RedisFuture<Long>
zremrangebyscore(K key, double min, double max)
Remove all members in a sorted set within the given scores.RedisFuture<Long>
zremrangebyscore(K key, Range<? extends Number> range)
Remove all members in a sorted set within the given scores.RedisFuture<Long>
zremrangebyscore(K key, String min, String max)
Remove all members in a sorted set within the given scores.RedisFuture<Long>
zrevrange(ValueStreamingChannel<V> channel, K key, long start, long stop)
Stream over a range of members in a sorted set, by index, with scores ordered from high to low.RedisFuture<List<V>>
zrevrange(K key, long start, long stop)
Return a range of members in a sorted set, by index, with scores ordered from high to low.RedisFuture<List<V>>
zrevrangebylex(K key, Range<? extends V> range)
Return a range of members in a sorted set, by lexicographical range ordered from high to low.RedisFuture<List<V>>
zrevrangebylex(K key, Range<? extends V> range, Limit limit)
Return a range of members in a sorted set, by lexicographical range ordered from high to low.RedisFuture<Long>
zrevrangebyscore(ValueStreamingChannel<V> channel, K key, double max, double min)
Stream over a range of members in a sorted set, by score, with scores ordered from high to low.RedisFuture<Long>
zrevrangebyscore(ValueStreamingChannel<V> channel, K key, double max, double min, long offset, long count)
Stream over a range of members in a sorted set, by score, with scores ordered from high to low.RedisFuture<Long>
zrevrangebyscore(ValueStreamingChannel<V> channel, K key, Range<? extends Number> range)
Stream over a range of members in a sorted set, by score, with scores ordered from high to low.RedisFuture<Long>
zrevrangebyscore(ValueStreamingChannel<V> channel, K key, Range<? extends Number> range, Limit limit)
Stream over a range of members in a sorted set, by score, with scores ordered from high to low.RedisFuture<Long>
zrevrangebyscore(ValueStreamingChannel<V> channel, K key, String max, String min)
Stream over a range of members in a sorted set, by score, with scores ordered from high to low.RedisFuture<Long>
zrevrangebyscore(ValueStreamingChannel<V> channel, K key, String max, String min, long offset, long count)
Stream over a range of members in a sorted set, by score, with scores ordered from high to low.RedisFuture<List<V>>
zrevrangebyscore(K key, double max, double min)
Return a range of members in a sorted set, by score, with scores ordered from high to low.RedisFuture<List<V>>
zrevrangebyscore(K key, double max, double min, long offset, long count)
Return a range of members in a sorted set, by score, with scores ordered from high to low.RedisFuture<List<V>>
zrevrangebyscore(K key, Range<? extends Number> range)
Return a range of members in a sorted set, by score, with scores ordered from high to low.RedisFuture<List<V>>
zrevrangebyscore(K key, Range<? extends Number> range, Limit limit)
Return a range of members in a sorted set, by score, with scores ordered from high to low.RedisFuture<List<V>>
zrevrangebyscore(K key, String max, String min)
Return a range of members in a sorted set, by score, with scores ordered from high to low.RedisFuture<List<V>>
zrevrangebyscore(K key, String max, String min, long offset, long count)
Return a range of members in a sorted set, by score, with scores ordered from high to low.RedisFuture<Long>
zrevrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, double max, double min)
Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.RedisFuture<Long>
zrevrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, double max, double min, long offset, long count)
Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.RedisFuture<Long>
zrevrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, Range<? extends Number> range)
Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.RedisFuture<Long>
zrevrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, Range<? extends Number> range, Limit limit)
Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.RedisFuture<Long>
zrevrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, String max, String min)
Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.RedisFuture<Long>
zrevrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, String max, String min, long offset, long count)
Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.RedisFuture<List<ScoredValue<V>>>
zrevrangebyscoreWithScores(K key, double max, double min)
Return a range of members with scores in a sorted set, by score, with scores ordered from high to low.RedisFuture<List<ScoredValue<V>>>
zrevrangebyscoreWithScores(K key, double max, double min, long offset, long count)
Return a range of members with scores in a sorted set, by score, with scores ordered from high to low.RedisFuture<List<ScoredValue<V>>>
zrevrangebyscoreWithScores(K key, Range<? extends Number> range)
Return a range of members with scores in a sorted set, by score, with scores ordered from high to low.RedisFuture<List<ScoredValue<V>>>
zrevrangebyscoreWithScores(K key, Range<? extends Number> range, Limit limit)
Return a range of members with scores in a sorted set, by score, with scores ordered from high to low.RedisFuture<List<ScoredValue<V>>>
zrevrangebyscoreWithScores(K key, String max, String min)
Return a range of members with scores in a sorted set, by score, with scores ordered from high to low.RedisFuture<List<ScoredValue<V>>>
zrevrangebyscoreWithScores(K key, String max, String min, long offset, long count)
Return a range of members with scores in a sorted set, by score, with scores ordered from high to low.RedisFuture<Long>
zrevrangestore(K dstKey, K srcKey, Range<Long> range)
Get the specified range of elements ordered from high to low in the sorted set stored atsrcKey
and stores the result in thedstKey
destination key.RedisFuture<Long>
zrevrangestorebylex(K dstKey, K srcKey, Range<? extends V> range, Limit limit)
Get the lexicographical range ordered from high to low of elements in the sorted set stored atsrcKey
and stores the result in thedstKey
destination key.RedisFuture<Long>
zrevrangestorebyscore(K dstKey, K srcKey, Range<? extends Number> range, Limit limit)
Get the specified range of elements in the sorted set stored at {@code srcKey with scores ordered from high to low and stores the result in the {@code dstKey} destination key.RedisFuture<Long>
zrevrangeWithScores(ScoredValueStreamingChannel<V> channel, K key, long start, long stop)
Stream over a range of members with scores in a sorted set, by index, with scores ordered from high to low.RedisFuture<List<ScoredValue<V>>>
zrevrangeWithScores(K key, long start, long stop)
Return a range of members with scores in a sorted set, by index, with scores ordered from high to low.RedisFuture<Long>
zrevrank(K key, V member)
Determine the index of a member in a sorted set, with scores ordered from high to low.RedisFuture<ScoredValue<Long>>
zrevrankWithScore(K key, V member)
Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low.RedisFuture<StreamScanCursor>
zscan(ScoredValueStreamingChannel<V> channel, K key)
Incrementally iterate sorted sets elements and associated scores.RedisFuture<StreamScanCursor>
zscan(ScoredValueStreamingChannel<V> channel, K key, ScanArgs scanArgs)
Incrementally iterate sorted sets elements and associated scores.RedisFuture<StreamScanCursor>
zscan(ScoredValueStreamingChannel<V> channel, K key, ScanCursor scanCursor)
Incrementally iterate sorted sets elements and associated scores.RedisFuture<StreamScanCursor>
zscan(ScoredValueStreamingChannel<V> channel, K key, ScanCursor scanCursor, ScanArgs scanArgs)
Incrementally iterate sorted sets elements and associated scores.RedisFuture<ScoredValueScanCursor<V>>
zscan(K key)
Incrementally iterate sorted sets elements and associated scores.RedisFuture<ScoredValueScanCursor<V>>
zscan(K key, ScanArgs scanArgs)
Incrementally iterate sorted sets elements and associated scores.RedisFuture<ScoredValueScanCursor<V>>
zscan(K key, ScanCursor scanCursor)
Incrementally iterate sorted sets elements and associated scores.RedisFuture<ScoredValueScanCursor<V>>
zscan(K key, ScanCursor scanCursor, ScanArgs scanArgs)
Incrementally iterate sorted sets elements and associated scores.RedisFuture<Double>
zscore(K key, V member)
Get the score associated with the given member in a sorted set.RedisFuture<List<V>>
zunion(ZAggregateArgs aggregateArgs, K... keys)
Add multiple sorted sets and returns the resulting sorted set.RedisFuture<List<V>>
zunion(K... keys)
Add multiple sorted sets and returns the resulting sorted set.RedisFuture<Long>
zunionstore(K destination, ZStoreArgs zStoreArgs, K... keys)
Add multiple sorted sets and store the resulting sorted set in a new key.RedisFuture<Long>
zunionstore(K destination, K... keys)
Add multiple sorted sets and store the resulting sorted set in a new key.RedisFuture<List<ScoredValue<V>>>
zunionWithScores(ZAggregateArgs aggregateArgs, K... keys)
Add multiple sorted sets and returns the resulting sorted set.RedisFuture<List<ScoredValue<V>>>
zunionWithScores(K... keys)
Add multiple sorted sets and returns the resulting sorted set.
-
-
-
Constructor Detail
-
AbstractRedisAsyncCommands
public AbstractRedisAsyncCommands(StatefulConnection<K,V> connection, RedisCodec<K,V> codec)
Initialize a new instance.- Parameters:
connection
- the connection to operate oncodec
- the codec for command encoding
-
-
Method Detail
-
aclCat
public RedisFuture<Set<AclCategory>> aclCat()
Description copied from interface:RedisAclAsyncCommands
The command shows the available ACL categories if called without arguments.- Specified by:
aclCat
in interfaceRedisAclAsyncCommands<K,V>
- Returns:
- List<AclCategory> a list of ACL categories or
-
aclCat
public RedisFuture<Set<CommandType>> aclCat(AclCategory category)
Description copied from interface:RedisAclAsyncCommands
The command shows all the Redis commands in the specified category.- Specified by:
aclCat
in interfaceRedisAclAsyncCommands<K,V>
- Parameters:
category
- the specified category- Returns:
- List<CommandType> a list of commands inside a given category
-
aclDeluser
public RedisFuture<Long> aclDeluser(String... usernames)
Description copied from interface:RedisAclAsyncCommands
Delete all the specified ACL users and terminate all the connections that are authenticated with such users.- Specified by:
aclDeluser
in interfaceRedisAclAsyncCommands<K,V>
- Parameters:
usernames
- the specified usernames- Returns:
- Long The number of users that were deleted
-
aclDryRun
public RedisFuture<String> aclDryRun(String username, String command, String... args)
Description copied from interface:RedisAclAsyncCommands
Simulate the execution of a given command by a given user.- Specified by:
aclDryRun
in interfaceRedisAclAsyncCommands<K,V>
- Parameters:
username
- the specified usernamecommand
- the specified commandargs
- the specified args of command- Returns:
- String reply: OK on success.
-
aclDryRun
public RedisFuture<String> aclDryRun(String username, RedisCommand<K,V,?> command)
Description copied from interface:RedisAclAsyncCommands
Simulate the execution of a given command by a given user.- Specified by:
aclDryRun
in interfaceRedisAclAsyncCommands<K,V>
- Parameters:
username
- the specified usernamecommand
- the specified command to inspect- Returns:
- String reply: OK on success.
-
aclGenpass
public RedisFuture<String> aclGenpass()
Description copied from interface:RedisAclAsyncCommands
The command generates a password.- Specified by:
aclGenpass
in interfaceRedisAclAsyncCommands<K,V>
- Returns:
- String bulk-string-reply 64 bytes string password representing 256 bits of pseudorandom data.
-
aclGenpass
public RedisFuture<String> aclGenpass(int bits)
Description copied from interface:RedisAclAsyncCommands
The command generates a password.- Specified by:
aclGenpass
in interfaceRedisAclAsyncCommands<K,V>
- Parameters:
bits
- amount of bits- Returns:
- String bulk-string-reply N/4 bytes string password representing N bits of pseudorandom data.
-
aclGetuser
public RedisFuture<List<Object>> aclGetuser(String username)
Description copied from interface:RedisAclAsyncCommands
The command returns all the rules defined for an existing ACL user.- Specified by:
aclGetuser
in interfaceRedisAclAsyncCommands<K,V>
- Parameters:
username
- the specified username- Returns:
- Map<String, Object> a map of ACL rule definitions for the user.
-
aclList
public RedisFuture<List<String>> aclList()
Description copied from interface:RedisAclAsyncCommands
The command shows the currently active ACL rules in the Redis server.- Specified by:
aclList
in interfaceRedisAclAsyncCommands<K,V>
- Returns:
- List<String> a list of strings.
-
aclLoad
public RedisFuture<String> aclLoad()
Description copied from interface:RedisAclAsyncCommands
When Redis is configured to use an ACL file (with the aclfile configuration option), this command will reload the ACLs from the file, replacing all the current ACL rules with the ones defined in the file.- Specified by:
aclLoad
in interfaceRedisAclAsyncCommands<K,V>
- Returns:
- String simple-string-reply OK or error message.
-
aclLog
public RedisFuture<List<Map<String,Object>>> aclLog()
Description copied from interface:RedisAclAsyncCommands
The command shows a list of recent ACL security events.- Specified by:
aclLog
in interfaceRedisAclAsyncCommands<K,V>
- Returns:
- List<Map<K,Object>> list of security events.
-
aclLog
public RedisFuture<List<Map<String,Object>>> aclLog(int count)
Description copied from interface:RedisAclAsyncCommands
The command shows a list of recent ACL security events.- Specified by:
aclLog
in interfaceRedisAclAsyncCommands<K,V>
- Parameters:
count
- max count of events- Returns:
- List<Map<K, Object>> list of security events.
-
aclLogReset
public RedisFuture<String> aclLogReset()
Description copied from interface:RedisAclAsyncCommands
The command clears ACL security events.- Specified by:
aclLogReset
in interfaceRedisAclAsyncCommands<K,V>
- Returns:
- String simple-string-reply OK if the security log was cleared.
-
aclSave
public RedisFuture<String> aclSave()
Description copied from interface:RedisAclAsyncCommands
When Redis is configured to use an ACL file (with the aclfile configuration option), this command will save the currently defined ACLs from the server memory to the ACL file.- Specified by:
aclSave
in interfaceRedisAclAsyncCommands<K,V>
- Returns:
- String simple-string-reply OK or error message.
-
aclSetuser
public RedisFuture<String> aclSetuser(String username, AclSetuserArgs args)
Description copied from interface:RedisAclAsyncCommands
Create an ACL user with the specified rules or modify the rules of an existing user.- Specified by:
aclSetuser
in interfaceRedisAclAsyncCommands<K,V>
- Parameters:
username
- the specified usernameargs
- rules- Returns:
- String simple-string-reply OK or error message.
-
aclUsers
public RedisFuture<List<String>> aclUsers()
Description copied from interface:RedisAclAsyncCommands
The command shows a list of all the usernames of the currently configured users in the Redis ACL system.- Specified by:
aclUsers
in interfaceRedisAclAsyncCommands<K,V>
- Returns:
- List<K> a list of usernames.
-
aclWhoami
public RedisFuture<String> aclWhoami()
Description copied from interface:RedisAclAsyncCommands
The command shows a list of all the usernames of the currently configured users in the Redis ACL system.- Specified by:
aclWhoami
in interfaceRedisAclAsyncCommands<K,V>
- Returns:
- K bulk-string-reply the username of the current connection.
-
append
public RedisFuture<Long> append(K key, V value)
Description copied from interface:RedisStringAsyncCommands
Append a value to a key.- Specified by:
append
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the value.- Returns:
- Long integer-reply the length of the string after the append operation.
-
asking
public RedisFuture<String> asking()
Description copied from interface:RedisClusterAsyncCommands
The asking command is required after a-ASK
redirection. The client should issueASKING
before to actually send the command to the target instance. See the Redis Cluster specification for more information.- Specified by:
asking
in interfaceRedisClusterAsyncCommands<K,V>
- Returns:
- String simple-string-reply
-
auth
public RedisFuture<String> auth(CharSequence password)
Description copied from interface:RedisClusterAsyncCommands
Authenticate to the server.- Specified by:
auth
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
password
- the password- Returns:
- String simple-string-reply
-
auth
public RedisFuture<String> auth(char[] password)
-
auth
public RedisFuture<String> auth(String username, CharSequence password)
Description copied from interface:RedisClusterAsyncCommands
Authenticate to the server with username and password. Requires Redis 6 or newer.- Specified by:
auth
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
username
- the usernamepassword
- the password- Returns:
- String simple-string-reply
-
auth
public RedisFuture<String> auth(String username, char[] password)
-
bgrewriteaof
public RedisFuture<String> bgrewriteaof()
Description copied from interface:RedisServerAsyncCommands
Asynchronously rewrite the append-only file.- Specified by:
bgrewriteaof
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply always
OK
.
-
bgsave
public RedisFuture<String> bgsave()
Description copied from interface:RedisServerAsyncCommands
Asynchronously save the dataset to disk.- Specified by:
bgsave
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
bitcount
public RedisFuture<Long> bitcount(K key)
Description copied from interface:RedisStringAsyncCommands
Count set bits in a string.- Specified by:
bitcount
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long integer-reply The number of bits set to 1.
-
bitcount
public RedisFuture<Long> bitcount(K key, long start, long end)
Description copied from interface:RedisStringAsyncCommands
Count set bits in a string.- Specified by:
bitcount
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.start
- the start.end
- the end.- Returns:
- Long integer-reply The number of bits set to 1.
-
bitfield
public RedisFuture<List<Long>> bitfield(K key, BitFieldArgs bitFieldArgs)
Description copied from interface:RedisStringAsyncCommands
ExecuteBITFIELD
with its subcommands.- Specified by:
bitfield
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.bitFieldArgs
- the args containing subcommands, must not benull
.- Returns:
- Long bulk-reply the results from the bitfield commands.
-
bitopAnd
public RedisFuture<Long> bitopAnd(K destination, K... keys)
Description copied from interface:RedisStringAsyncCommands
Perform bitwise AND between strings.- Specified by:
bitopAnd
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
destination
- result key of the operation.keys
- operation input key names.- Returns:
- Long integer-reply The size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopNot
public RedisFuture<Long> bitopNot(K destination, K source)
Description copied from interface:RedisStringAsyncCommands
Perform bitwise NOT between strings.- Specified by:
bitopNot
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
destination
- result key of the operation.source
- operation input key names.- Returns:
- Long integer-reply The size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopOr
public RedisFuture<Long> bitopOr(K destination, K... keys)
Description copied from interface:RedisStringAsyncCommands
Perform bitwise OR between strings.- Specified by:
bitopOr
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
destination
- result key of the operation.keys
- operation input key names.- Returns:
- Long integer-reply The size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopXor
public RedisFuture<Long> bitopXor(K destination, K... keys)
Description copied from interface:RedisStringAsyncCommands
Perform bitwise XOR between strings.- Specified by:
bitopXor
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
destination
- result key of the operation.keys
- operation input key names.- Returns:
- Long integer-reply The size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitpos
public RedisFuture<Long> bitpos(K key, boolean state)
Description copied from interface:RedisStringAsyncCommands
Find first bit set or clear in a string.- Specified by:
bitpos
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.state
- the state.- Returns:
- Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request.
If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is
returned.
If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns
the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the
command
BITPOS key 0
will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the start argument only.
-
bitpos
public RedisFuture<Long> bitpos(K key, boolean state, long start)
Description copied from interface:RedisStringAsyncCommands
Find first bit set or clear in a string.- Specified by:
bitpos
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.state
- the bit type: long.start
- the start type: long.- Returns:
- Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request.
If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is
returned.
If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns
the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the
command
BITPOS key 0
will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the start argument only.
-
bitpos
public RedisFuture<Long> bitpos(K key, boolean state, long start, long end)
Description copied from interface:RedisStringAsyncCommands
Find first bit set or clear in a string.- Specified by:
bitpos
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.state
- the bit type: long.start
- the start type: long.end
- the end type: long.- Returns:
- Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request.
If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is
returned.
If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns
the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the
command
BITPOS key 0
will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the start argument only. However this behavior changes if you are looking for clear bits and specify a range with both start and end. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
-
blmove
public RedisFuture<V> blmove(K source, K destination, LMoveArgs args, long timeout)
Description copied from interface:RedisListAsyncCommands
Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination. When source is empty, Redis will block the connection until another client pushes to it or until timeout is reached.- Specified by:
blmove
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
source
- the source key.destination
- the destination type: key.args
- command arguments to configure source and destination directions.timeout
- the timeout in seconds.- Returns:
- V bulk-string-reply the element being popped and pushed.
-
blmove
public RedisFuture<V> blmove(K source, K destination, LMoveArgs args, double timeout)
Description copied from interface:RedisListAsyncCommands
Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination. When source is empty, Redis will block the connection until another client pushes to it or until timeout is reached.- Specified by:
blmove
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
source
- the source key.destination
- the destination type: key.args
- command arguments to configure source and destination directions.timeout
- the timeout in seconds.- Returns:
- V bulk-string-reply the element being popped and pushed.
-
blmpop
public RedisFuture<KeyValue<K,List<V>>> blmpop(long timeout, LMPopArgs args, K... keys)
Description copied from interface:RedisListAsyncCommands
Remove and get the first/last elements in a list, or block until one is available.- Specified by:
blmpop
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.args
- the additional command arguments.keys
- the keys.- Returns:
- KeyValue<K,V> array-reply specifically.
null
whenkey
does not exist or the timeout was exceeded.
-
blmpop
public RedisFuture<KeyValue<K,List<V>>> blmpop(double timeout, LMPopArgs args, K... keys)
Description copied from interface:RedisListAsyncCommands
Remove and get the first/last elements in a list, or block until one is available.- Specified by:
blmpop
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.args
- the additional command arguments.keys
- the keys.- Returns:
- KeyValue<K,V> array-reply specifically.
null
whenkey
does not exist or the timeout was exceeded.
-
blpop
public RedisFuture<KeyValue<K,V>> blpop(long timeout, K... keys)
Description copied from interface:RedisListAsyncCommands
Remove and get the first element in a list, or block until one is available.- Specified by:
blpop
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.keys
- the keys.- Returns:
- KeyValue<K,V> array-reply specifically:
A
null
multi-bulk when no element could be popped and the timeout expired. A two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
-
blpop
public RedisFuture<KeyValue<K,V>> blpop(double timeout, K... keys)
Description copied from interface:RedisListAsyncCommands
Remove and get the first element in a list, or block until one is available.- Specified by:
blpop
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.keys
- the keys.- Returns:
- KeyValue<K,V> array-reply specifically:
A
null
multi-bulk when no element could be popped and the timeout expired. A two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
-
brpop
public RedisFuture<KeyValue<K,V>> brpop(long timeout, K... keys)
Description copied from interface:RedisListAsyncCommands
Remove and get the last element in a list, or block until one is available.- Specified by:
brpop
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.keys
- the keys.- Returns:
- KeyValue<K,V> array-reply specifically:
A
null
multi-bulk when no element could be popped and the timeout expired. A two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
-
brpop
public RedisFuture<KeyValue<K,V>> brpop(double timeout, K... keys)
Description copied from interface:RedisListAsyncCommands
Remove and get the last element in a list, or block until one is available.- Specified by:
brpop
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.keys
- the keys.- Returns:
- KeyValue<K,V> array-reply specifically:
A
null
multi-bulk when no element could be popped and the timeout expired. A two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
-
brpoplpush
public RedisFuture<V> brpoplpush(long timeout, K source, K destination)
Description copied from interface:RedisListAsyncCommands
Pop a value from a list, push it to another list and return it; or block until one is available.- Specified by:
brpoplpush
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.source
- the source key.destination
- the destination type: key.- Returns:
- V bulk-string-reply the element being popped from
source
and pushed todestination
. Iftimeout
is reached, a.
-
brpoplpush
public RedisFuture<V> brpoplpush(double timeout, K source, K destination)
Description copied from interface:RedisListAsyncCommands
Pop a value from a list, push it to another list and return it; or block until one is available.- Specified by:
brpoplpush
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.source
- the source key.destination
- the destination type: key.- Returns:
- V bulk-string-reply the element being popped from
source
and pushed todestination
. Iftimeout
is reached, a.
-
clientCaching
public RedisFuture<String> clientCaching(boolean enabled)
Description copied from interface:RedisServerAsyncCommands
Control tracking of keys in the context of server-assisted client cache invalidation.- Specified by:
clientCaching
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
enabled
-true
to enable key tracking.- Returns:
- String simple-string-reply
OK
.
-
clientGetname
public RedisFuture<K> clientGetname()
Description copied from interface:RedisServerAsyncCommands
Get the current connection name.- Specified by:
clientGetname
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- K bulk-string-reply The connection name, or a null bulk reply if no name is set.
-
clientGetredir
public RedisFuture<Long> clientGetredir()
Description copied from interface:RedisServerAsyncCommands
Returns the client ID we are redirecting our tracking notifications to.- Specified by:
clientGetredir
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- the ID of the client we are redirecting the notifications to. The command returns -1 if client tracking is not enabled, or 0 if client tracking is enabled but we are not redirecting the notifications to any client.
-
clientKill
public RedisFuture<String> clientKill(String addr)
Description copied from interface:RedisServerAsyncCommands
Kill the connection of a client identified by ip:port.- Specified by:
clientKill
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
addr
- ip:port.- Returns:
- String simple-string-reply
OK
if the connection exists and has been closed.
-
clientKill
public RedisFuture<Long> clientKill(KillArgs killArgs)
Description copied from interface:RedisServerAsyncCommands
Kill connections of clients which are filtered bykillArgs
.- Specified by:
clientKill
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
killArgs
- args for the kill operation.- Returns:
- Long integer-reply number of killed connections.
-
clientList
public RedisFuture<String> clientList()
Description copied from interface:RedisServerAsyncCommands
Get the list of client connections.- Specified by:
clientList
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String bulk-string-reply a unique string, formatted as follows: One client connection per line (separated by LF), each line is composed of a succession of property=value fields separated by a space character.
-
clientList
public RedisFuture<String> clientList(ClientListArgs clientListArgs)
Description copied from interface:RedisServerAsyncCommands
Get the list of client connections which are filtered byclientListArgs
.- Specified by:
clientList
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String bulk-string-reply a unique string, formatted as follows: One client connection per line (separated by LF), each line is composed of a succession of property=value fields separated by a space character.
-
clientInfo
public RedisFuture<String> clientInfo()
Description copied from interface:RedisServerAsyncCommands
Get the list of the current client connection.- Specified by:
clientInfo
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String bulk-string-reply a unique string, formatted as a succession of property=value fields separated by a space character.
-
clientNoEvict
public RedisFuture<String> clientNoEvict(boolean on)
Description copied from interface:RedisServerAsyncCommands
Sets the client eviction mode for the current connection.- Specified by:
clientNoEvict
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
on
-true
will turn eviction mode on, andfalse
will turn it off.- Returns:
- String simple-string-reply
OK
.
-
clientId
public RedisFuture<Long> clientId()
Description copied from interface:RedisServerAsyncCommands
Get the id of the current connection.- Specified by:
clientId
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- Long The command just returns the ID of the current connection.
-
clientPause
public RedisFuture<String> clientPause(long timeout)
Description copied from interface:RedisServerAsyncCommands
Stop processing commands from clients for some time.- Specified by:
clientPause
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
timeout
- the timeout value in milliseconds.- Returns:
- String simple-string-reply The command returns OK or an error if the timeout is invalid.
-
clientSetname
public RedisFuture<String> clientSetname(K name)
Description copied from interface:RedisServerAsyncCommands
Set the current connection name.- Specified by:
clientSetname
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
name
- the client name.- Returns:
- simple-string-reply
OK
if the connection name was successfully set.
-
clientSetinfo
public RedisFuture<String> clientSetinfo(String key, String value)
Description copied from interface:RedisServerAsyncCommands
Assign various info attributes to the current connection.- Specified by:
clientSetinfo
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the value.- Returns:
- simple-string-reply
OK
if the connection name was successfully set.
-
clientTracking
public RedisFuture<String> clientTracking(TrackingArgs args)
Description copied from interface:RedisServerAsyncCommands
Enables the tracking feature of the Redis server, that is used for server assisted client side caching. Tracking messages are either available when using the RESP3 protocol or through Pub/Sub notification when using RESP2.- Specified by:
clientTracking
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
args
- for the CLIENT TRACKING operation.- Returns:
- String simple-string-reply
OK
.
-
clientUnblock
public RedisFuture<Long> clientUnblock(long id, UnblockType type)
Description copied from interface:RedisServerAsyncCommands
Unblock the specified blocked client.- Specified by:
clientUnblock
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
id
- the client id.type
- unblock type.- Returns:
- Long integer-reply number of unblocked connections.
-
clusterAddSlots
public RedisFuture<String> clusterAddSlots(int... slots)
Description copied from interface:RedisClusterAsyncCommands
Adds slots to the cluster node. The current node will become the upstream for the specified slots.- Specified by:
clusterAddSlots
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
slots
- one or more slots from 0 to 16384- Returns:
- String simple-string-reply
-
clusterAddSlotsRange
public RedisFuture<String> clusterAddSlotsRange(Range<Integer>... ranges)
Description copied from interface:RedisClusterAsyncCommands
Takes a list of slot ranges (specified by start and end slots) to assign to the node.- Specified by:
clusterAddSlotsRange
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
ranges
- a list of slot ranges (specified by start and end slots)- Returns:
- String simple-string-reply
-
clusterBumpepoch
public RedisFuture<String> clusterBumpepoch()
Description copied from interface:RedisClusterAsyncCommands
Generate a new config epoch, incrementing the current epoch, assign the new epoch to this node, WITHOUT any consensus and persist the configuration on disk before sending packets with the new configuration.- Specified by:
clusterBumpepoch
in interfaceRedisClusterAsyncCommands<K,V>
- Returns:
- String simple-string-reply If the new config epoch is generated and assigned either BUMPED (epoch) or STILL (epoch) are returned.
-
clusterCountFailureReports
public RedisFuture<Long> clusterCountFailureReports(String nodeId)
Description copied from interface:RedisClusterAsyncCommands
Returns the number of failure reports for the specified node. Failure reports are the way Redis Cluster uses in order to promote a PFAIL state, that means a node is not reachable, to a FAIL state, that means that the majority of masters in the cluster agreed within a window of time that the node is not reachable.- Specified by:
clusterCountFailureReports
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
nodeId
- the node id- Returns:
- Integer reply: The number of active failure reports for the node.
-
clusterCountKeysInSlot
public RedisFuture<Long> clusterCountKeysInSlot(int slot)
Description copied from interface:RedisClusterAsyncCommands
Returns the number of keys in the specified Redis Cluster hashslot
.- Specified by:
clusterCountKeysInSlot
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
slot
- the slot- Returns:
- Integer reply: The number of keys in the specified hash slot, or an error if the hash slot is invalid.
-
clusterDelSlots
public RedisFuture<String> clusterDelSlots(int... slots)
Description copied from interface:RedisClusterAsyncCommands
Removes slots from the cluster node.- Specified by:
clusterDelSlots
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
slots
- one or more slots from 0 to 16384- Returns:
- String simple-string-reply
-
clusterDelSlotsRange
public RedisFuture<String> clusterDelSlotsRange(Range<Integer>... ranges)
Description copied from interface:RedisClusterAsyncCommands
Takes a list of slot ranges (specified by start and end slots) to remove to the node.- Specified by:
clusterDelSlotsRange
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
ranges
- a list of slot ranges (specified by start and end slots)- Returns:
- String simple-string-reply
-
clusterFailover
public RedisFuture<String> clusterFailover(boolean force)
Description copied from interface:RedisClusterAsyncCommands
Failover a cluster node. Turns the currently connected node into a master and the master into its replica.- Specified by:
clusterFailover
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
force
- do not coordinate with master iftrue
- Returns:
- String simple-string-reply
-
clusterFailover
public RedisFuture<String> clusterFailover(boolean force, boolean takeOver)
Description copied from interface:RedisClusterAsyncCommands
Failover a cluster node. Turns the currently connected node into a master and the master into its replica.- Specified by:
clusterFailover
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
force
- do not coordinate with master iftrue
takeOver
- do not coordinate with the rest of the cluster iftrue
force will take precedence over takeOver if both are set.- Returns:
- String simple-string-reply
-
clusterFlushslots
public RedisFuture<String> clusterFlushslots()
Description copied from interface:RedisClusterAsyncCommands
Delete all the slots associated with the specified node. The number of deleted slots is returned.- Specified by:
clusterFlushslots
in interfaceRedisClusterAsyncCommands<K,V>
- Returns:
- String simple-string-reply
-
clusterForget
public RedisFuture<String> clusterForget(String nodeId)
Description copied from interface:RedisClusterAsyncCommands
Disallow connections and remove the cluster node from the cluster.- Specified by:
clusterForget
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
nodeId
- the node Id- Returns:
- String simple-string-reply
-
clusterGetKeysInSlot
public RedisFuture<List<K>> clusterGetKeysInSlot(int slot, int count)
Description copied from interface:RedisClusterAsyncCommands
Retrieve the list of keys within theslot
.- Specified by:
clusterGetKeysInSlot
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
slot
- the slotcount
- maximal number of keys- Returns:
- List<K> array-reply list of keys
-
clusterInfo
public RedisFuture<String> clusterInfo()
Description copied from interface:RedisClusterAsyncCommands
Get information and statistics about the cluster viewed by the current node.- Specified by:
clusterInfo
in interfaceRedisClusterAsyncCommands<K,V>
- Returns:
- String bulk-string-reply as a collection of text lines.
-
clusterKeyslot
public RedisFuture<Long> clusterKeyslot(K key)
Description copied from interface:RedisClusterAsyncCommands
Returns an integer identifying the hash slot the specified key hashes to. This command is mainly useful for debugging and testing, since it exposes via an API the underlying Redis implementation of the hashing algorithm. Basically the same asSlotHash.getSlot(byte[])
. If not, call Houston and report that we've got a problem.- Specified by:
clusterKeyslot
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Integer reply: The hash slot number.
-
clusterMeet
public RedisFuture<String> clusterMeet(String ip, int port)
Description copied from interface:RedisClusterAsyncCommands
Meet another cluster node to include the node into the cluster. The command starts the cluster handshake and returns with OK when the node was added to the cluster.- Specified by:
clusterMeet
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
ip
- IP address of the hostport
- port number.- Returns:
- String simple-string-reply
-
clusterMyId
public RedisFuture<String> clusterMyId()
Description copied from interface:RedisClusterAsyncCommands
Obtain the nodeId for the currently connected node.- Specified by:
clusterMyId
in interfaceRedisClusterAsyncCommands<K,V>
- Returns:
- String simple-string-reply
-
clusterNodes
public RedisFuture<String> clusterNodes()
Description copied from interface:RedisClusterAsyncCommands
Obtain details about all cluster nodes. Can be parsed usingClusterPartitionParser.parse(java.util.List<java.lang.Object>)
- Specified by:
clusterNodes
in interfaceRedisClusterAsyncCommands<K,V>
- Returns:
- String bulk-string-reply as a collection of text lines
-
clusterReplicate
public RedisFuture<String> clusterReplicate(String nodeId)
Description copied from interface:RedisClusterAsyncCommands
Turn this node into a replica of the node with the idnodeId
.- Specified by:
clusterReplicate
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
nodeId
- master node id- Returns:
- String simple-string-reply
-
clusterReplicas
public RedisFuture<List<String>> clusterReplicas(String nodeId)
Description copied from interface:RedisClusterAsyncCommands
List replicas for a certain node identified by itsnodeId
. Can be parsed usingClusterPartitionParser.parse(java.util.List<java.lang.Object>)
- Specified by:
clusterReplicas
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
nodeId
- node id of the master node- Returns:
- List<String> array-reply list of replicas. The command returns data in the same format as
RedisClusterAsyncCommands.clusterNodes()
but one line per replica.
-
clusterReset
public RedisFuture<String> clusterReset(boolean hard)
Description copied from interface:RedisClusterAsyncCommands
Reset a node performing a soft or hard reset:- All other nodes are forgotten
- All the assigned / open slots are released
- If the node is a replica, it turns into a master
- Only for hard reset: a new Node ID is generated
- Only for hard reset: currentEpoch and configEpoch are set to 0
- The new configuration is saved and the cluster state updated
- If the node was a replica, the whole data set is flushed away
- Specified by:
clusterReset
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
hard
-true
for hard reset. Generates a new nodeId and currentEpoch/configEpoch are set to 0- Returns:
- String simple-string-reply
-
clusterSaveconfig
public RedisFuture<String> clusterSaveconfig()
Description copied from interface:RedisClusterAsyncCommands
Forces a node to save the nodes.conf configuration on disk.- Specified by:
clusterSaveconfig
in interfaceRedisClusterAsyncCommands<K,V>
- Returns:
- String simple-string-reply:
OK
or an error if the operation fails.
-
clusterSetConfigEpoch
public RedisFuture<String> clusterSetConfigEpoch(long configEpoch)
Description copied from interface:RedisClusterAsyncCommands
This command sets a specific config epoch in a fresh node. It only works when:- The nodes table of the node is empty.
- The node current config epoch is zero.
- Specified by:
clusterSetConfigEpoch
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
configEpoch
- the config epoch- Returns:
- String simple-string-reply:
OK
or an error if the operation fails.
-
clusterSetSlotImporting
public RedisFuture<String> clusterSetSlotImporting(int slot, String nodeId)
Description copied from interface:RedisClusterAsyncCommands
Flag a slot as IMPORTING (incoming) from the node specified innodeId
.- Specified by:
clusterSetSlotImporting
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
slot
- the slotnodeId
- the id of the node is the master of the slot- Returns:
- String simple-string-reply
-
clusterSetSlotMigrating
public RedisFuture<String> clusterSetSlotMigrating(int slot, String nodeId)
Description copied from interface:RedisClusterAsyncCommands
Flag a slot as MIGRATING (outgoing) towards the node specified innodeId
. The slot must be handled by the current node in order to be migrated.- Specified by:
clusterSetSlotMigrating
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
slot
- the slotnodeId
- the id of the node is targeted to become the master for the slot- Returns:
- String simple-string-reply
-
clusterSetSlotNode
public RedisFuture<String> clusterSetSlotNode(int slot, String nodeId)
Description copied from interface:RedisClusterAsyncCommands
Assign a slot to a node. The command migrates the specified slot from the current node to the specified node innodeId
- Specified by:
clusterSetSlotNode
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
slot
- the slotnodeId
- the id of the node that will become the master for the slot- Returns:
- String simple-string-reply
-
clusterSetSlotStable
public RedisFuture<String> clusterSetSlotStable(int slot)
Description copied from interface:RedisClusterAsyncCommands
Clears migrating / importing state from the slot.- Specified by:
clusterSetSlotStable
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
slot
- the slot- Returns:
- String simple-string-reply
-
clusterShards
public RedisFuture<List<Object>> clusterShards()
Description copied from interface:RedisClusterAsyncCommands
Get array of cluster shards- Specified by:
clusterShards
in interfaceRedisClusterAsyncCommands<K,V>
- Returns:
- RedisFuture<List<Object>> array-reply nested list of the shards response.
-
clusterSlaves
public RedisFuture<List<String>> clusterSlaves(String nodeId)
Description copied from interface:RedisClusterAsyncCommands
List replicas for a certain node identified by itsnodeId
. Can be parsed usingClusterPartitionParser.parse(java.util.List<java.lang.Object>)
- Specified by:
clusterSlaves
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
nodeId
- node id of the master node- Returns:
- List<String> array-reply list of replicas. The command returns data in the same format as
RedisClusterAsyncCommands.clusterNodes()
but one line per replica.
-
clusterSlots
public RedisFuture<List<Object>> clusterSlots()
Description copied from interface:RedisClusterAsyncCommands
Get array of cluster slots to node mappings.- Specified by:
clusterSlots
in interfaceRedisClusterAsyncCommands<K,V>
- Returns:
- RedisFuture<List<Object>> array-reply nested list of slot ranges with IP/Port mappings.
-
command
public RedisFuture<List<Object>> command()
Description copied from interface:RedisServerAsyncCommands
Returns an array reply of details about all Redis commands.- Specified by:
command
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- List<Object> array-reply.
-
commandCount
public RedisFuture<Long> commandCount()
Description copied from interface:RedisServerAsyncCommands
Get total number of Redis commands.- Specified by:
commandCount
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- Long integer-reply of number of total commands in this Redis server.
-
commandInfo
public RedisFuture<List<Object>> commandInfo(String... commands)
Description copied from interface:RedisServerAsyncCommands
Returns an array reply of details about the requested commands.- Specified by:
commandInfo
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
commands
- the commands to query for.- Returns:
- List<Object> array-reply.
-
commandInfo
public RedisFuture<List<Object>> commandInfo(CommandType... commands)
Description copied from interface:RedisServerAsyncCommands
Returns an array reply of details about the requested commands.- Specified by:
commandInfo
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
commands
- the commands to query for.- Returns:
- List<Object> array-reply.
-
configGet
public RedisFuture<Map<String,String>> configGet(String parameter)
Description copied from interface:RedisServerAsyncCommands
Get the value of a configuration parameter.- Specified by:
configGet
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
parameter
- name of the parameter.- Returns:
- Map<String, String> bulk-string-reply.
-
configGet
public RedisFuture<Map<String,String>> configGet(String... parameters)
Description copied from interface:RedisServerAsyncCommands
Get the value of multiple pattern parameters.- Specified by:
configGet
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
parameters
- patterns names of Redis server's configuration.- Returns:
- Map<String, String> bulk-string-reply.
-
configResetstat
public RedisFuture<String> configResetstat()
Description copied from interface:RedisServerAsyncCommands
Reset the stats returned by INFO.- Specified by:
configResetstat
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply always
OK
.
-
configRewrite
public RedisFuture<String> configRewrite()
Description copied from interface:RedisServerAsyncCommands
Rewrite the configuration file with the in memory configuration.- Specified by:
configRewrite
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply
OK
when the configuration was rewritten properly. Otherwise an error is returned.
-
configSet
public RedisFuture<String> configSet(String parameter, String value)
Description copied from interface:RedisServerAsyncCommands
Set a configuration parameter to the given value.- Specified by:
configSet
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
parameter
- the parameter name.value
- the parameter value.- Returns:
- String simple-string-reply:
OK
when the configuration was set properly. Otherwise an error is returned.
-
configSet
public RedisFuture<String> configSet(Map<String,String> kvs)
Description copied from interface:RedisServerAsyncCommands
Set multiple parameters to the given value.- Specified by:
configSet
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
kvs
- the parameter name and value.- Returns:
- String simple-string-reply:
OK
when the configuration was set properly. Otherwise an error is returned.
-
dbsize
public RedisFuture<Long> dbsize()
Description copied from interface:RedisServerAsyncCommands
Return the number of keys in the selected database.- Specified by:
dbsize
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- Long integer-reply.
-
debugCrashAndRecover
public RedisFuture<String> debugCrashAndRecover(Long delay)
Description copied from interface:RedisServerAsyncCommands
Crash and recover.- Specified by:
debugCrashAndRecover
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
delay
- optional delay in milliseconds.- Returns:
- String simple-string-reply.
-
debugHtstats
public RedisFuture<String> debugHtstats(int db)
Description copied from interface:RedisServerAsyncCommands
Get debugging information about the internal hash-table state.- Specified by:
debugHtstats
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
db
- the database number.- Returns:
- String simple-string-reply.
-
debugObject
public RedisFuture<String> debugObject(K key)
Description copied from interface:RedisServerAsyncCommands
Get debugging information about a key.- Specified by:
debugObject
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- String simple-string-reply.
-
debugOom
public void debugOom()
Description copied from interface:RedisServerAsyncCommands
Make the server crash: Out of memory.- Specified by:
debugOom
in interfaceRedisServerAsyncCommands<K,V>
-
debugReload
public RedisFuture<String> debugReload()
Description copied from interface:RedisServerAsyncCommands
Save RDB, clear the database and reload RDB.- Specified by:
debugReload
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply The commands returns OK on success.
-
debugRestart
public RedisFuture<String> debugRestart(Long delay)
Description copied from interface:RedisServerAsyncCommands
Restart the server gracefully.- Specified by:
debugRestart
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
delay
- optional delay in milliseconds.- Returns:
- String simple-string-reply.
-
debugSdslen
public RedisFuture<String> debugSdslen(K key)
Description copied from interface:RedisServerAsyncCommands
Get debugging information about the internal SDS length.- Specified by:
debugSdslen
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- String simple-string-reply.
-
debugSegfault
public void debugSegfault()
Description copied from interface:RedisServerAsyncCommands
Make the server crash: Invalid pointer access.- Specified by:
debugSegfault
in interfaceRedisServerAsyncCommands<K,V>
-
decr
public RedisFuture<Long> decr(K key)
Description copied from interface:RedisStringAsyncCommands
Decrement the integer value of a key by one.- Specified by:
decr
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long integer-reply the value of
key
after the decrement.
-
decrby
public RedisFuture<Long> decrby(K key, long amount)
Description copied from interface:RedisStringAsyncCommands
Decrement the integer value of a key by the given number.- Specified by:
decrby
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.amount
- the decrement type: long.- Returns:
- Long integer-reply the value of
key
after the decrement.
-
del
public RedisFuture<Long> del(K... keys)
Description copied from interface:RedisKeyAsyncCommands
Delete one or more keys.- Specified by:
del
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply The number of keys that were removed.
-
del
public RedisFuture<Long> del(Iterable<K> keys)
-
digest
public String digest(String script)
Description copied from interface:RedisScriptingAsyncCommands
Create a SHA1 digest from a Lua script.- Specified by:
digest
in interfaceRedisScriptingAsyncCommands<K,V>
- Parameters:
script
- script content.- Returns:
- the SHA1 value.
-
digest
public String digest(byte[] script)
Description copied from interface:RedisScriptingAsyncCommands
Create a SHA1 digest from a Lua script.- Specified by:
digest
in interfaceRedisScriptingAsyncCommands<K,V>
- Parameters:
script
- script content.- Returns:
- the SHA1 value.
-
discard
public RedisFuture<String> discard()
Description copied from interface:RedisTransactionalAsyncCommands
Discard all commands issued after MULTI.- Specified by:
discard
in interfaceRedisTransactionalAsyncCommands<K,V>
- Returns:
- String simple-string-reply always
OK
.
-
dispatch
public <T> RedisFuture<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output)
Description copied from interface:BaseRedisAsyncCommands
Dispatch a command to the Redis Server. Please note the command output type must fit to the command response.- Specified by:
dispatch
in interfaceBaseRedisAsyncCommands<K,V>
- Type Parameters:
T
- response type.- Parameters:
type
- the command, must not benull
.output
- the command output, must not benull
.- Returns:
- the command response.
-
dispatch
public <T> RedisFuture<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output, CommandArgs<K,V> args)
Description copied from interface:BaseRedisAsyncCommands
Dispatch a command to the Redis Server. Please note the command output type must fit to the command response.- Specified by:
dispatch
in interfaceBaseRedisAsyncCommands<K,V>
- Type Parameters:
T
- response type.- Parameters:
type
- the command, must not benull
.output
- the command output, must not benull
.args
- the command arguments, must not benull
.- Returns:
- the command response.
-
dispatch
protected <T> RedisFuture<T> dispatch(CommandType type, CommandOutput<K,V,T> output)
-
dispatch
protected <T> RedisFuture<T> dispatch(CommandType type, CommandOutput<K,V,T> output, CommandArgs<K,V> args)
-
dispatch
public <T> AsyncCommand<K,V,T> dispatch(RedisCommand<K,V,T> cmd)
-
dump
public RedisFuture<byte[]> dump(K key)
Description copied from interface:RedisKeyAsyncCommands
Return a serialized version of the value stored at the specified key.- Specified by:
dump
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- byte[] bulk-string-reply the serialized value.
-
echo
public RedisFuture<V> echo(V msg)
Description copied from interface:BaseRedisAsyncCommands
Echo the given string.- Specified by:
echo
in interfaceBaseRedisAsyncCommands<K,V>
- Parameters:
msg
- the message type: value.- Returns:
- V bulk-string-reply.
-
eval
public <T> RedisFuture<T> eval(String script, ScriptOutputType type, K... keys)
Description copied from interface:RedisScriptingAsyncCommands
Execute a Lua script server side.- Specified by:
eval
in interfaceRedisScriptingAsyncCommands<K,V>
- Type Parameters:
T
- expected return type.- Parameters:
script
- Lua 5.1 script.type
- output type.keys
- key names.- Returns:
- script result.
-
eval
public <T> RedisFuture<T> eval(byte[] script, ScriptOutputType type, K... keys)
Description copied from interface:RedisScriptingAsyncCommands
Execute a Lua script server side.- Specified by:
eval
in interfaceRedisScriptingAsyncCommands<K,V>
- Type Parameters:
T
- expected return type.- Parameters:
script
- Lua 5.1 script.type
- output type.keys
- key names.- Returns:
- script result.
-
eval
public <T> RedisFuture<T> eval(String script, ScriptOutputType type, K[] keys, V... values)
Description copied from interface:RedisScriptingAsyncCommands
Execute a Lua script server side.- Specified by:
eval
in interfaceRedisScriptingAsyncCommands<K,V>
- Type Parameters:
T
- expected return type.- Parameters:
script
- Lua 5.1 script.type
- the type.keys
- the keys.values
- the values.- Returns:
- script result.
-
eval
public <T> RedisFuture<T> eval(byte[] script, ScriptOutputType type, K[] keys, V... values)
Description copied from interface:RedisScriptingAsyncCommands
Execute a Lua script server side.- Specified by:
eval
in interfaceRedisScriptingAsyncCommands<K,V>
- Type Parameters:
T
- expected return type.- Parameters:
script
- Lua 5.1 script.type
- the type.keys
- the keys.values
- the values.- Returns:
- script result.
-
evalReadOnly
public <T> RedisFuture<T> evalReadOnly(byte[] script, ScriptOutputType type, K[] keys, V... values)
Description copied from interface:RedisScriptingAsyncCommands
This is a read-only variant of the EVAL command that cannot execute commands that modify data.- Specified by:
evalReadOnly
in interfaceRedisScriptingAsyncCommands<K,V>
- Type Parameters:
T
- expected return type.- Parameters:
script
- Lua 5.1 script.type
- the type.keys
- the keys.values
- the values.- Returns:
- script result.
-
evalsha
public <T> RedisFuture<T> evalsha(String digest, ScriptOutputType type, K... keys)
Description copied from interface:RedisScriptingAsyncCommands
Evaluates a script cached on the server side by its SHA1 digest.- Specified by:
evalsha
in interfaceRedisScriptingAsyncCommands<K,V>
- Type Parameters:
T
- expected return type.- Parameters:
digest
- SHA1 of the script.type
- the type.keys
- the keys.- Returns:
- script result.
-
evalsha
public <T> RedisFuture<T> evalsha(String digest, ScriptOutputType type, K[] keys, V... values)
Description copied from interface:RedisScriptingAsyncCommands
Execute a Lua script server side.- Specified by:
evalsha
in interfaceRedisScriptingAsyncCommands<K,V>
- Type Parameters:
T
- expected return type.- Parameters:
digest
- SHA1 of the script.type
- the type.keys
- the keys.values
- the values.- Returns:
- script result.
-
evalshaReadOnly
public <T> RedisFuture<T> evalshaReadOnly(String digest, ScriptOutputType type, K[] keys, V... values)
Description copied from interface:RedisScriptingAsyncCommands
This is a read-only variant of the EVALSHA command that cannot execute commands that modify data.- Specified by:
evalshaReadOnly
in interfaceRedisScriptingAsyncCommands<K,V>
- Type Parameters:
T
- expected return type.- Parameters:
digest
- SHA1 of the script.type
- the type.keys
- the keys.values
- the values.- Returns:
- script result.
-
exec
public RedisFuture<TransactionResult> exec()
Description copied from interface:RedisTransactionalAsyncCommands
Execute all commands issued after MULTI.- Specified by:
exec
in interfaceRedisTransactionalAsyncCommands<K,V>
- Returns:
- List<Object> array-reply each element being the reply to each of the commands in the atomic transaction.
When using
WATCH
,EXEC
can return adiscarded TransactionResult
. - See Also:
TransactionResult.wasDiscarded()
-
exists
public RedisFuture<Long> exists(K... keys)
Description copied from interface:RedisKeyAsyncCommands
Determine how many keys exist.- Specified by:
exists
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply specifically: Number of existing keys.
-
exists
public RedisFuture<Long> exists(Iterable<K> keys)
-
expire
public RedisFuture<Boolean> expire(K key, long seconds)
Description copied from interface:RedisKeyAsyncCommands
Set a key's time to live in seconds.- Specified by:
expire
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.seconds
- the seconds type: long.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set.
-
expire
public RedisFuture<Boolean> expire(K key, long seconds, ExpireArgs expireArgs)
Description copied from interface:RedisKeyAsyncCommands
Set a key's time to live in seconds.- Specified by:
expire
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.seconds
- the seconds type: long.expireArgs
- the expire arguments.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set.
-
expire
public RedisFuture<Boolean> expire(K key, Duration seconds)
Description copied from interface:RedisKeyAsyncCommands
Set a key's time to live in seconds.- Specified by:
expire
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.seconds
- the seconds.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set.
-
expire
public RedisFuture<Boolean> expire(K key, Duration seconds, ExpireArgs expireArgs)
Description copied from interface:RedisKeyAsyncCommands
Set a key's time to live in seconds.- Specified by:
expire
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.seconds
- the seconds.expireArgs
- the expire arguments.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set.
-
expireat
public RedisFuture<Boolean> expireat(K key, long timestamp)
Description copied from interface:RedisKeyAsyncCommands
Set the expiration for a key as a UNIX timestamp.- Specified by:
expireat
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.timestamp
- the timestamp type: posix time.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set (see:EXPIRE
).
-
expireat
public RedisFuture<Boolean> expireat(K key, long timestamp, ExpireArgs expireArgs)
Description copied from interface:RedisKeyAsyncCommands
Set the expiration for a key as a UNIX timestamp.- Specified by:
expireat
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.timestamp
- the timestamp type: posix time.expireArgs
- the expire arguments.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set (see:EXPIRE
).
-
expireat
public RedisFuture<Boolean> expireat(K key, Date timestamp)
Description copied from interface:RedisKeyAsyncCommands
Set the expiration for a key as a UNIX timestamp.- Specified by:
expireat
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.timestamp
- the timestamp type: posix time.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set (see:EXPIRE
).
-
expireat
public RedisFuture<Boolean> expireat(K key, Date timestamp, ExpireArgs expireArgs)
Description copied from interface:RedisKeyAsyncCommands
Set the expiration for a key as a UNIX timestamp.- Specified by:
expireat
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.timestamp
- the timestamp type: posix time.expireArgs
- the expire arguments.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set (see:EXPIRE
).
-
expireat
public RedisFuture<Boolean> expireat(K key, Instant timestamp)
Description copied from interface:RedisKeyAsyncCommands
Set the expiration for a key as a UNIX timestamp.- Specified by:
expireat
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.timestamp
- the timestamp type: posix time.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set (see:EXPIRE
).
-
expireat
public RedisFuture<Boolean> expireat(K key, Instant timestamp, ExpireArgs expireArgs)
Description copied from interface:RedisKeyAsyncCommands
Set the expiration for a key as a UNIX timestamp.- Specified by:
expireat
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.timestamp
- the timestamp type: posix time.expireArgs
- the expire arguments.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set (see:EXPIRE
).
-
expiretime
public RedisFuture<Long> expiretime(K key)
Description copied from interface:RedisKeyAsyncCommands
Get the time to live for a key in as unix timestamp in seconds.- Specified by:
expiretime
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long integer-reply in seconds, or a negative value in order to signal an error. The command returns
-1
if the key exists but has no associated expiration time. The command returns-2
if the key does not exist.
-
fcall
public <T> RedisFuture<T> fcall(String function, ScriptOutputType type, K... keys)
Description copied from interface:RedisFunctionAsyncCommands
Invoke a function.- Specified by:
fcall
in interfaceRedisFunctionAsyncCommands<K,V>
- Type Parameters:
T
- expected return type.- Parameters:
function
- the function name.type
- output type.keys
- key names.- Returns:
- function result.
-
fcall
public <T> RedisFuture<T> fcall(String function, ScriptOutputType type, K[] keys, V... values)
Description copied from interface:RedisFunctionAsyncCommands
Invoke a function.- Specified by:
fcall
in interfaceRedisFunctionAsyncCommands<K,V>
- Type Parameters:
T
- expected return type.- Parameters:
function
- the function name.type
- output type.keys
- the keys.values
- the values (arguments).- Returns:
- function result.
-
fcallReadOnly
public <T> RedisFuture<T> fcallReadOnly(String function, ScriptOutputType type, K... keys)
Description copied from interface:RedisFunctionAsyncCommands
Invoke a function in read-only mode.- Specified by:
fcallReadOnly
in interfaceRedisFunctionAsyncCommands<K,V>
- Type Parameters:
T
- expected return type.- Parameters:
function
- the function name.type
- output type.keys
- key names.- Returns:
- function result.
-
fcallReadOnly
public <T> RedisFuture<T> fcallReadOnly(String function, ScriptOutputType type, K[] keys, V... values)
Description copied from interface:RedisFunctionAsyncCommands
Invoke a function in read-only mode.- Specified by:
fcallReadOnly
in interfaceRedisFunctionAsyncCommands<K,V>
- Type Parameters:
T
- expected return type.- Parameters:
function
- the function name.type
- output type.keys
- the keys.values
- the values (arguments).- Returns:
- function result.
-
functionLoad
public RedisFuture<String> functionLoad(String functionCode)
Description copied from interface:RedisFunctionAsyncCommands
Load a library to Redis.- Specified by:
functionLoad
in interfaceRedisFunctionAsyncCommands<K,V>
- Parameters:
functionCode
- code of the function.- Returns:
- name of the library.
-
functionLoad
public RedisFuture<String> functionLoad(String functionCode, boolean replace)
Description copied from interface:RedisFunctionAsyncCommands
Load a library to Redis.- Specified by:
functionLoad
in interfaceRedisFunctionAsyncCommands<K,V>
- Parameters:
functionCode
- code of the function.replace
- whether to replace an existing function.- Returns:
- name of the library.
-
functionDump
public RedisFuture<byte[]> functionDump()
Description copied from interface:RedisFunctionAsyncCommands
Return the serialized payload of loaded libraries. You can restore the dump throughRedisFunctionAsyncCommands.functionRestore(byte[])
.- Specified by:
functionDump
in interfaceRedisFunctionAsyncCommands<K,V>
- Returns:
- the serialized payload.
-
functionRestore
public RedisFuture<String> functionRestore(byte[] dump)
Description copied from interface:RedisFunctionAsyncCommands
You can restore the dumped payload of loaded libraries.- Specified by:
functionRestore
in interfaceRedisFunctionAsyncCommands<K,V>
- Returns:
- Simple string reply
-
functionRestore
public RedisFuture<String> functionRestore(byte[] dump, FunctionRestoreMode mode)
Description copied from interface:RedisFunctionAsyncCommands
You can restore the dumped payload of loaded libraries.- Specified by:
functionRestore
in interfaceRedisFunctionAsyncCommands<K,V>
- Returns:
- Simple string reply
-
functionFlush
public RedisFuture<String> functionFlush(FlushMode flushMode)
Description copied from interface:RedisFunctionAsyncCommands
Deletes all the libraries using the specifiedFlushMode
.- Specified by:
functionFlush
in interfaceRedisFunctionAsyncCommands<K,V>
- Parameters:
flushMode
- the flush mode (sync/async).- Returns:
- String simple-string-reply.
-
functionKill
public RedisFuture<String> functionKill()
Description copied from interface:RedisFunctionAsyncCommands
Kill a function that is currently executing.- Specified by:
functionKill
in interfaceRedisFunctionAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
functionList
public RedisFuture<List<Map<String,Object>>> functionList()
Description copied from interface:RedisFunctionAsyncCommands
Return information about the functions and libraries.- Specified by:
functionList
in interfaceRedisFunctionAsyncCommands<K,V>
- Returns:
- Array reply.
-
functionList
public RedisFuture<List<Map<String,Object>>> functionList(String libraryName)
Description copied from interface:RedisFunctionAsyncCommands
Return information about the functions and libraries.- Specified by:
functionList
in interfaceRedisFunctionAsyncCommands<K,V>
- Parameters:
libraryName
- specify a pattern for matching library names.- Returns:
- Array reply.
-
flushCommands
public void flushCommands()
Description copied from interface:BaseRedisAsyncCommands
Flush pending commands. This commands forces a flush on the channel and can be used to buffer ("pipeline") commands to achieve batching. No-op if channel is not connected.- Specified by:
flushCommands
in interfaceBaseRedisAsyncCommands<K,V>
-
flushall
public RedisFuture<String> flushall()
Description copied from interface:RedisServerAsyncCommands
Remove all keys from all databases.- Specified by:
flushall
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
flushall
public RedisFuture<String> flushall(FlushMode flushMode)
Description copied from interface:RedisServerAsyncCommands
Remove all keys from all databases using the specifiedFlushMode
.- Specified by:
flushall
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
flushMode
- the flush mode (sync/async).- Returns:
- String simple-string-reply.
-
flushallAsync
public RedisFuture<String> flushallAsync()
Description copied from interface:RedisServerAsyncCommands
Remove all keys asynchronously from all databases.- Specified by:
flushallAsync
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
flushdb
public RedisFuture<String> flushdb()
Description copied from interface:RedisServerAsyncCommands
Remove all keys from the current database.- Specified by:
flushdb
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
flushdb
public RedisFuture<String> flushdb(FlushMode flushMode)
Description copied from interface:RedisServerAsyncCommands
Remove all keys from the current database using the specifiedFlushMode
.- Specified by:
flushdb
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
flushMode
- the flush mode (sync/async).- Returns:
- String simple-string-reply.
-
flushdbAsync
public RedisFuture<String> flushdbAsync()
Description copied from interface:RedisServerAsyncCommands
Remove all keys asynchronously from the current database.- Specified by:
flushdbAsync
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
geoadd
public RedisFuture<Long> geoadd(K key, double longitude, double latitude, V member)
Description copied from interface:RedisGeoAsyncCommands
Single geo add.- Specified by:
geoadd
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.longitude
- the longitude coordinate according to WGS84.latitude
- the latitude coordinate according to WGS84.member
- the member to add.- Returns:
- Long integer-reply the number of elements that were added to the set.
-
geoadd
public RedisFuture<Long> geoadd(K key, double longitude, double latitude, V member, GeoAddArgs args)
Description copied from interface:RedisGeoAsyncCommands
Single geo add.- Specified by:
geoadd
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.longitude
- the longitude coordinate according to WGS84.latitude
- the latitude coordinate according to WGS84.member
- the member to add.args
- additional arguments.- Returns:
- Long integer-reply the number of elements that were added to the set.
-
geoadd
public RedisFuture<Long> geoadd(K key, Object... lngLatMember)
Description copied from interface:RedisGeoAsyncCommands
Multi geo add.- Specified by:
geoadd
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.lngLatMember
- triplets of double longitude, double latitude and V member.- Returns:
- Long integer-reply the number of elements that were added to the set.
-
geoadd
public RedisFuture<Long> geoadd(K key, GeoValue<V>... values)
Description copied from interface:RedisGeoAsyncCommands
Multi geo add.- Specified by:
geoadd
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.values
-GeoValue
values to add.- Returns:
- Long integer-reply the number of elements that were added to the set.
-
geoadd
public RedisFuture<Long> geoadd(K key, GeoAddArgs args, Object... lngLatMember)
Description copied from interface:RedisGeoAsyncCommands
Multi geo add.- Specified by:
geoadd
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.args
- additional arguments.lngLatMember
- triplets of double longitude, double latitude and V member.- Returns:
- Long integer-reply the number of elements that were added to the set.
-
geoadd
public RedisFuture<Long> geoadd(K key, GeoAddArgs args, GeoValue<V>... values)
Description copied from interface:RedisGeoAsyncCommands
Multi geo add.- Specified by:
geoadd
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.args
- additional arguments.values
-GeoValue
values to add.- Returns:
- Long integer-reply the number of elements that were added to the set.
-
geodist
public RedisFuture<Double> geodist(K key, V from, V to, GeoArgs.Unit unit)
Description copied from interface:RedisGeoAsyncCommands
Retrieve distance between pointsfrom
andto
. If one or more elements are missingnull
is returned. Default in meters by, otherwise according tounit
- Specified by:
geodist
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.from
- from member.to
- to member.unit
- distance unit.- Returns:
- distance between points
from
andto
. If one or more elements are missingnull
is returned.
-
geohash
public RedisFuture<List<Value<String>>> geohash(K key, V... members)
Description copied from interface:RedisGeoAsyncCommands
Retrieve Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index.- Specified by:
geohash
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.members
- the members.- Returns:
- bulk reply Geohash strings in the order of
members
. Returnsnull
if a member is not found.
-
geopos
public RedisFuture<List<GeoCoordinates>> geopos(K key, V... members)
Description copied from interface:RedisGeoAsyncCommands
Get geo coordinates for themembers
.- Specified by:
geopos
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.members
- the members.- Returns:
- a list of
GeoCoordinates
s representing the x,y position of each element specified in the arguments. For missing elementsnull
is returned.
-
georadius
public RedisFuture<Set<V>> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)
Description copied from interface:RedisGeoAsyncCommands
Retrieve members selected by distance with the center oflongitude
andlatitude
.- Specified by:
georadius
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.longitude
- the longitude coordinate according to WGS84.latitude
- the latitude coordinate according to WGS84.distance
- radius distance.unit
- distance unit.- Returns:
- bulk reply.
-
georadius
public RedisFuture<List<GeoWithin<V>>> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
Description copied from interface:RedisGeoAsyncCommands
Retrieve members selected by distance with the center oflongitude
andlatitude
.- Specified by:
georadius
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.longitude
- the longitude coordinate according to WGS84.latitude
- the latitude coordinate according to WGS84.distance
- radius distance.unit
- distance unit.geoArgs
- args to control the result.- Returns:
- nested multi-bulk reply. The
GeoWithin
contains only fields which were requested byGeoArgs
.
-
georadius
public RedisFuture<Long> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs<K> geoRadiusStoreArgs)
Description copied from interface:RedisGeoAsyncCommands
Perform aRedisGeoAsyncCommands.georadius(Object, double, double, double, GeoArgs.Unit, GeoArgs)
query and store the results in a sorted set.- Specified by:
georadius
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.longitude
- the longitude coordinate according to WGS84.latitude
- the latitude coordinate according to WGS84.distance
- radius distance.unit
- distance unit.geoRadiusStoreArgs
- args to store either the resulting elements with their distance or the resulting elements with their locations a sorted set.- Returns:
- Long integer-reply the number of elements in the result.
-
georadius_ro
protected RedisFuture<Set<V>> georadius_ro(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)
-
georadius_ro
protected RedisFuture<List<GeoWithin<V>>> georadius_ro(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
-
georadiusbymember
public RedisFuture<Set<V>> georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit)
Description copied from interface:RedisGeoAsyncCommands
Retrieve members selected by distance with the center ofmember
. The member itself is always contained in the results.- Specified by:
georadiusbymember
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.member
- reference member.distance
- radius distance.unit
- distance unit.- Returns:
- set of members.
-
georadiusbymember
public RedisFuture<List<GeoWithin<V>>> georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
Description copied from interface:RedisGeoAsyncCommands
Retrieve members selected by distance with the center ofmember
. The member itself is always contained in the results.- Specified by:
georadiusbymember
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.member
- reference member.distance
- radius distance.unit
- distance unit.geoArgs
- args to control the result.- Returns:
- nested multi-bulk reply. The
GeoWithin
contains only fields which were requested byGeoArgs
.
-
georadiusbymember
public RedisFuture<Long> georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs<K> geoRadiusStoreArgs)
Description copied from interface:RedisGeoAsyncCommands
Perform aRedisGeoAsyncCommands.georadiusbymember(Object, Object, double, GeoArgs.Unit, GeoArgs)
query and store the results in a sorted set.- Specified by:
georadiusbymember
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.member
- reference member.distance
- radius distance.unit
- distance unit.geoRadiusStoreArgs
- args to store either the resulting elements with their distance or the resulting elements with their locations a sorted set.- Returns:
- Long integer-reply the number of elements in the result.
-
georadiusbymember_ro
protected RedisFuture<Set<V>> georadiusbymember_ro(K key, V member, double distance, GeoArgs.Unit unit)
-
georadiusbymember_ro
protected RedisFuture<List<GeoWithin<V>>> georadiusbymember_ro(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
-
geosearch
public RedisFuture<Set<V>> geosearch(K key, GeoSearch.GeoRef<K> reference, GeoSearch.GeoPredicate predicate)
Description copied from interface:RedisGeoAsyncCommands
Retrieve members selected by distance with the center ofreference
the searchpredicate
. UseGeoSearch
to create reference and predicate objects.- Specified by:
geosearch
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.reference
- the reference member or longitude/latitude coordinates.predicate
- the bounding box or radius to search in.- Returns:
- bulk reply.
-
geosearch
public RedisFuture<List<GeoWithin<V>>> geosearch(K key, GeoSearch.GeoRef<K> reference, GeoSearch.GeoPredicate predicate, GeoArgs geoArgs)
Description copied from interface:RedisGeoAsyncCommands
Retrieve members selected by distance with the center ofreference
the searchpredicate
. UseGeoSearch
to create reference and predicate objects.- Specified by:
geosearch
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
key
- the key of the geo set.reference
- the reference member or longitude/latitude coordinates.predicate
- the bounding box or radius to search in.geoArgs
- args to control the result.- Returns:
- nested multi-bulk reply. The
GeoWithin
contains only fields which were requested byGeoArgs
.
-
geosearchstore
public RedisFuture<Long> geosearchstore(K destination, K key, GeoSearch.GeoRef<K> reference, GeoSearch.GeoPredicate predicate, GeoArgs geoArgs, boolean storeDist)
Description copied from interface:RedisGeoAsyncCommands
Perform aRedisGeoAsyncCommands.geosearch(Object, GeoSearch.GeoRef, GeoSearch.GeoPredicate, GeoArgs)
query and store the results in a sorted set.- Specified by:
geosearchstore
in interfaceRedisGeoAsyncCommands<K,V>
- Parameters:
destination
- the destination where to store results.key
- the key of the geo set.reference
- the reference member or longitude/latitude coordinates.predicate
- the bounding box or radius to search in.geoArgs
- args to control the result.storeDist
- stores the items in a sorted set populated with their distance from the center of the circle or box, as a floating-point number, in the same unit specified for that shape.- Returns:
- Long integer-reply the number of elements in the result.
-
get
public RedisFuture<V> get(K key)
Description copied from interface:RedisStringAsyncCommands
Get the value of a key.- Specified by:
get
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- V bulk-string-reply the value of
key
, ornull
whenkey
does not exist.
-
getConnection
public StatefulConnection<K,V> getConnection()
-
getbit
public RedisFuture<Long> getbit(K key, long offset)
Description copied from interface:RedisStringAsyncCommands
Returns the bit value at offset in the string value stored at key.- Specified by:
getbit
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.offset
- the offset type: long.- Returns:
- Long integer-reply the bit value stored at offset.
-
getdel
public RedisFuture<V> getdel(K key)
Description copied from interface:RedisStringAsyncCommands
Get the value of key and delete the key.- Specified by:
getdel
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- V bulk-string-reply the value of
key
, ornull
whenkey
does not exist.
-
getex
public RedisFuture<V> getex(K key, GetExArgs args)
Description copied from interface:RedisStringAsyncCommands
Get the value of key and optionally set its expiration.- Specified by:
getex
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.args
- the arguments forGETEX
.- Returns:
- V bulk-string-reply the value of
key
, ornull
whenkey
does not exist.
-
getrange
public RedisFuture<V> getrange(K key, long start, long end)
Description copied from interface:RedisStringAsyncCommands
Get a substring of the string stored at a key.- Specified by:
getrange
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.start
- the start type: long.end
- the end type: long.- Returns:
- V bulk-string-reply.
-
getset
public RedisFuture<V> getset(K key, V value)
Description copied from interface:RedisStringAsyncCommands
Set the string value of a key and return its old value.- Specified by:
getset
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the value.- Returns:
- V bulk-string-reply the old value stored at
key
, ornull
whenkey
did not exist.
-
hdel
public RedisFuture<Long> hdel(K key, K... fields)
Description copied from interface:RedisHashAsyncCommands
Delete one or more hash fields.- Specified by:
hdel
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.fields
- the field type: key.- Returns:
- Long integer-reply the number of fields that were removed from the hash, not including specified but non existing fields.
-
hexists
public RedisFuture<Boolean> hexists(K key, K field)
Description copied from interface:RedisHashAsyncCommands
Determine if a hash field exists.- Specified by:
hexists
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.field
- the field type: key.- Returns:
- Boolean integer-reply specifically:
true
if the hash containsfield
.false
if the hash does not containfield
, orkey
does not exist.
-
hget
public RedisFuture<V> hget(K key, K field)
Description copied from interface:RedisHashAsyncCommands
Get the value of a hash field.- Specified by:
hget
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.field
- the field type: key.- Returns:
- V bulk-string-reply the value associated with
field
, ornull
whenfield
is not present in the hash orkey
does not exist.
-
hgetall
public RedisFuture<Map<K,V>> hgetall(K key)
Description copied from interface:RedisHashAsyncCommands
Get all the fields and values in a hash.- Specified by:
hgetall
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Map<K,V> array-reply list of fields and their values stored in the hash, or an empty list when
key
does not exist.
-
hgetall
public RedisFuture<Long> hgetall(KeyValueStreamingChannel<K,V> channel, K key)
Description copied from interface:RedisHashAsyncCommands
Stream over all the fields and values in a hash.- Specified by:
hgetall
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
channel
- the channel.key
- the key.- Returns:
- Long count of the keys.
-
hincrby
public RedisFuture<Long> hincrby(K key, K field, long amount)
Description copied from interface:RedisHashAsyncCommands
Increment the integer value of a hash field by the given number.- Specified by:
hincrby
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.field
- the field type: key.amount
- the increment type: long.- Returns:
- Long integer-reply the value at
field
after the increment operation.
-
hincrbyfloat
public RedisFuture<Double> hincrbyfloat(K key, K field, double amount)
Description copied from interface:RedisHashAsyncCommands
Increment the float value of a hash field by the given amount.- Specified by:
hincrbyfloat
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.field
- the field type: key.amount
- the increment type: double.- Returns:
- Double bulk-string-reply the value of
field
after the increment.
-
hkeys
public RedisFuture<List<K>> hkeys(K key)
Description copied from interface:RedisHashAsyncCommands
Get all the fields in a hash.- Specified by:
hkeys
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- List<K> array-reply list of fields in the hash, or an empty list when
key
does not exist.
-
hkeys
public RedisFuture<Long> hkeys(KeyStreamingChannel<K> channel, K key)
Description copied from interface:RedisHashAsyncCommands
Stream over all the fields in a hash.- Specified by:
hkeys
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
channel
- the channel.key
- the key.- Returns:
- Long count of the keys.
-
hlen
public RedisFuture<Long> hlen(K key)
Description copied from interface:RedisHashAsyncCommands
Get the number of fields in a hash.- Specified by:
hlen
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long integer-reply number of fields in the hash, or
0
whenkey
does not exist.
-
hmget
public RedisFuture<List<KeyValue<K,V>>> hmget(K key, K... fields)
Description copied from interface:RedisHashAsyncCommands
Get the values of all the given hash fields.- Specified by:
hmget
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.fields
- the field type: key.- Returns:
- List<V> array-reply list of values associated with the given fields, in the same.
-
hmget
public RedisFuture<Long> hmget(KeyValueStreamingChannel<K,V> channel, K key, K... fields)
Description copied from interface:RedisHashAsyncCommands
Stream over the values of all the given hash fields.- Specified by:
hmget
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
channel
- the channel.key
- the key.fields
- the fields.- Returns:
- Long count of the keys.
-
hmset
public RedisFuture<String> hmset(K key, Map<K,V> map)
Description copied from interface:RedisHashAsyncCommands
Set multiple hash fields to multiple values.- Specified by:
hmset
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.map
- the hash to apply.- Returns:
- String simple-string-reply.
-
hrandfield
public RedisFuture<K> hrandfield(K key)
Description copied from interface:RedisHashAsyncCommands
Return a random field from the hash stored atkey
.- Specified by:
hrandfield
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- hash field name.
-
hrandfield
public RedisFuture<List<K>> hrandfield(K key, long count)
Description copied from interface:RedisHashAsyncCommands
Returncount
random fields from the hash stored atkey
.- Specified by:
hrandfield
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.count
- the number of fields to return. If the provided count argument is positive, return an array of distinct fields.- Returns:
- array-reply list of field names.
-
hrandfieldWithvalues
public RedisFuture<KeyValue<K,V>> hrandfieldWithvalues(K key)
Description copied from interface:RedisHashAsyncCommands
Return a random field along its value from the hash stored atkey
.- Specified by:
hrandfieldWithvalues
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- array-reply the key and value.
-
hrandfieldWithvalues
public RedisFuture<List<KeyValue<K,V>>> hrandfieldWithvalues(K key, long count)
Description copied from interface:RedisHashAsyncCommands
Returncount
random fields along their value from the hash stored atkey
.- Specified by:
hrandfieldWithvalues
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.count
- the number of fields to return. If the provided count argument is positive, return an array of distinct fields.- Returns:
- array-reply the keys and values.
-
hscan
public RedisFuture<MapScanCursor<K,V>> hscan(K key)
Description copied from interface:RedisHashAsyncCommands
Incrementally iterate hash fields and associated values.- Specified by:
hscan
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- MapScanCursor<K, V> map scan cursor.
-
hscan
public RedisFuture<MapScanCursor<K,V>> hscan(K key, ScanArgs scanArgs)
Description copied from interface:RedisHashAsyncCommands
Incrementally iterate hash fields and associated values.- Specified by:
hscan
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.scanArgs
- scan arguments.- Returns:
- MapScanCursor<K, V> map scan cursor.
-
hscan
public RedisFuture<MapScanCursor<K,V>> hscan(K key, ScanCursor scanCursor, ScanArgs scanArgs)
Description copied from interface:RedisHashAsyncCommands
Incrementally iterate hash fields and associated values.- Specified by:
hscan
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.scanCursor
- cursor to resume from a previous scan, must not benull
.scanArgs
- scan arguments.- Returns:
- MapScanCursor<K, V> map scan cursor.
-
hscan
public RedisFuture<MapScanCursor<K,V>> hscan(K key, ScanCursor scanCursor)
Description copied from interface:RedisHashAsyncCommands
Incrementally iterate hash fields and associated values.- Specified by:
hscan
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.scanCursor
- cursor to resume from a previous scan, must not benull
.- Returns:
- MapScanCursor<K, V> map scan cursor.
-
hscan
public RedisFuture<StreamScanCursor> hscan(KeyValueStreamingChannel<K,V> channel, K key)
Description copied from interface:RedisHashAsyncCommands
Incrementally iterate hash fields and associated values.- Specified by:
hscan
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every key-value pair.key
- the key.- Returns:
- StreamScanCursor scan cursor.
-
hscan
public RedisFuture<StreamScanCursor> hscan(KeyValueStreamingChannel<K,V> channel, K key, ScanArgs scanArgs)
Description copied from interface:RedisHashAsyncCommands
Incrementally iterate hash fields and associated values.- Specified by:
hscan
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every key-value pair.key
- the key.scanArgs
- scan arguments.- Returns:
- StreamScanCursor scan cursor.
-
hscan
public RedisFuture<StreamScanCursor> hscan(KeyValueStreamingChannel<K,V> channel, K key, ScanCursor scanCursor, ScanArgs scanArgs)
Description copied from interface:RedisHashAsyncCommands
Incrementally iterate hash fields and associated values.- Specified by:
hscan
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every key-value pair.key
- the key.scanCursor
- cursor to resume from a previous scan, must not benull
.scanArgs
- scan arguments.- Returns:
- StreamScanCursor scan cursor.
-
hscan
public RedisFuture<StreamScanCursor> hscan(KeyValueStreamingChannel<K,V> channel, K key, ScanCursor scanCursor)
Description copied from interface:RedisHashAsyncCommands
Incrementally iterate hash fields and associated values.- Specified by:
hscan
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every key-value pair.key
- the key.scanCursor
- cursor to resume from a previous scan, must not benull
.- Returns:
- StreamScanCursor scan cursor.
-
hset
public RedisFuture<Boolean> hset(K key, K field, V value)
Description copied from interface:RedisHashAsyncCommands
Set the string value of a hash field.- Specified by:
hset
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.field
- the field type: key.value
- the value.- Returns:
- Boolean integer-reply specifically:
true
iffield
is a new field in the hash andvalue
was set.false
iffield
already exists in the hash and the value was updated.
-
hset
public RedisFuture<Long> hset(K key, Map<K,V> map)
Description copied from interface:RedisHashAsyncCommands
Set multiple hash fields to multiple values.- Specified by:
hset
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key of the hash.map
- the field/value pairs to update.- Returns:
- Long integer-reply: the number of fields that were added.
-
hsetnx
public RedisFuture<Boolean> hsetnx(K key, K field, V value)
Description copied from interface:RedisHashAsyncCommands
Set the value of a hash field, only if the field does not exist.- Specified by:
hsetnx
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.field
- the field type: key.value
- the value.- Returns:
- Boolean integer-reply specifically:
1
iffield
is a new field in the hash andvalue
was set.0
iffield
already exists in the hash and no operation was performed.
-
hstrlen
public RedisFuture<Long> hstrlen(K key, K field)
Description copied from interface:RedisHashAsyncCommands
Get the string length of the field value in a hash.- Specified by:
hstrlen
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.field
- the field type: key.- Returns:
- Long integer-reply the string length of the
field
value, or0
whenfield
is not present in the hash orkey
does not exist at all.
-
hvals
public RedisFuture<List<V>> hvals(K key)
Description copied from interface:RedisHashAsyncCommands
Get all the values in a hash.- Specified by:
hvals
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- List<V> array-reply list of values in the hash, or an empty list when
key
does not exist.
-
hvals
public RedisFuture<Long> hvals(ValueStreamingChannel<V> channel, K key)
Description copied from interface:RedisHashAsyncCommands
Stream over all the values in a hash.- Specified by:
hvals
in interfaceRedisHashAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.- Returns:
- Long count of the keys.
-
incr
public RedisFuture<Long> incr(K key)
Description copied from interface:RedisStringAsyncCommands
Increment the integer value of a key by one.- Specified by:
incr
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long integer-reply the value of
key
after the increment.
-
incrby
public RedisFuture<Long> incrby(K key, long amount)
Description copied from interface:RedisStringAsyncCommands
Increment the integer value of a key by the given amount.- Specified by:
incrby
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.amount
- the increment type: long.- Returns:
- Long integer-reply the value of
key
after the increment.
-
incrbyfloat
public RedisFuture<Double> incrbyfloat(K key, double amount)
Description copied from interface:RedisStringAsyncCommands
Increment the float value of a key by the given amount.- Specified by:
incrbyfloat
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.amount
- the increment type: double.- Returns:
- Double bulk-string-reply the value of
key
after the increment.
-
info
public RedisFuture<String> info()
Description copied from interface:RedisServerAsyncCommands
Get information and statistics about the server.- Specified by:
info
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String bulk-string-reply as a collection of text lines.
-
info
public RedisFuture<String> info(String section)
Description copied from interface:RedisServerAsyncCommands
Get information and statistics about the server.- Specified by:
info
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
section
- the section type: string.- Returns:
- String bulk-string-reply as a collection of text lines.
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interfaceBaseRedisAsyncCommands<K,V>
- Returns:
true
if the connection is open (connected and not closed).
-
keys
public RedisFuture<List<K>> keys(K pattern)
Description copied from interface:RedisKeyAsyncCommands
Find all keys matching the given pattern.- Specified by:
keys
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
pattern
- the pattern type: patternkey (pattern).- Returns:
- List<K> array-reply list of keys matching
pattern
.
-
keys
public RedisFuture<Long> keys(KeyStreamingChannel<K> channel, K pattern)
Description copied from interface:RedisKeyAsyncCommands
Find all keys matching the given pattern.- Specified by:
keys
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
channel
- the channel.pattern
- the pattern.- Returns:
- Long array-reply list of keys matching
pattern
.
-
lastsave
public RedisFuture<Date> lastsave()
Description copied from interface:RedisServerAsyncCommands
Get the UNIX time stamp of the last successful save to disk.- Specified by:
lastsave
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- Date integer-reply an UNIX time stamp.
-
lindex
public RedisFuture<V> lindex(K key, long index)
Description copied from interface:RedisListAsyncCommands
Get an element from a list by its index.- Specified by:
lindex
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.index
- the index type: long.- Returns:
- V bulk-string-reply the requested element, or
null
whenindex
is out of range.
-
linsert
public RedisFuture<Long> linsert(K key, boolean before, V pivot, V value)
Description copied from interface:RedisListAsyncCommands
Insert an element before or after another element in a list.- Specified by:
linsert
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.before
- the before.pivot
- the pivot.value
- the value.- Returns:
- Long integer-reply the length of the list after the insert operation, or
-1
when the valuepivot
was not found.
-
llen
public RedisFuture<Long> llen(K key)
Description copied from interface:RedisListAsyncCommands
Get the length of a list.- Specified by:
llen
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long integer-reply the length of the list at
key
.
-
lmove
public RedisFuture<V> lmove(K source, K destination, LMoveArgs args)
Description copied from interface:RedisListAsyncCommands
Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination.- Specified by:
lmove
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
source
- the source key.destination
- the destination type: key.args
- command arguments to configure source and destination directions.- Returns:
- V bulk-string-reply the element being popped and pushed.
-
lpop
public RedisFuture<V> lpop(K key)
Description copied from interface:RedisListAsyncCommands
Remove and get the first element in a list.- Specified by:
lpop
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- V bulk-string-reply the value of the first element, or
null
whenkey
does not exist.
-
lpop
public RedisFuture<List<V>> lpop(K key, long count)
Description copied from interface:RedisListAsyncCommands
Remove and get the firstcount
elements in a list.- Specified by:
lpop
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.count
- the number of elements to return.- Returns:
-
lmpop
public RedisFuture<KeyValue<K,List<V>>> lmpop(LMPopArgs args, K... keys)
Description copied from interface:RedisListAsyncCommands
Remove and get the first/last elements in a list.- Specified by:
lmpop
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
args
- the additional command arguments.keys
- the keys.- Returns:
- KeyValue<K,V> array-reply specifically.
null
whenkey
does not exist.
-
lpos
public RedisFuture<Long> lpos(K key, V value)
Description copied from interface:RedisListAsyncCommands
Return the index of matching elements inside a Redis list. By default, when no options are given, it will scan the list from head to tail, looking for the first match of "element". If the element is found, its index (the zero-based position in the list) is returned. Otherwise, if no match is found,null
is returned. The returned elements indexes are always referring to whatRedisListAsyncCommands.lindex(java.lang.Object, long)
would return. So first element from head is0
, and so forth.- Specified by:
lpos
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the element to search for.- Returns:
- V integer-reply representing the matching element, or null if there is no match.
-
lpos
public RedisFuture<Long> lpos(K key, V value, LPosArgs args)
Description copied from interface:RedisListAsyncCommands
Return the index of matching elements inside a Redis list. By default, when no options are given, it will scan the list from head to tail, looking for the first match of "element". If the element is found, its index (the zero-based position in the list) is returned. Otherwise, if no match is found,null
is returned. The returned elements indexes are always referring to whatRedisListAsyncCommands.lindex(java.lang.Object, long)
would return. So first element from head is0
, and so forth.- Specified by:
lpos
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the element to search for.args
- command arguments to configureFIRST
andMAXLEN
options.- Returns:
- V integer-reply representing the matching element, or null if there is no match.
-
lpos
public RedisFuture<List<Long>> lpos(K key, V value, int count)
Description copied from interface:RedisListAsyncCommands
Return the index of matching elements inside a Redis list using theCOUNT
option. By default, when no options are given, it will scan the list from head to tail, looking for the first match of "element". The returned elements indexes are always referring to whatRedisListAsyncCommands.lindex(java.lang.Object, long)
would return. So first element from head is0
, and so forth.- Specified by:
lpos
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the element to search for.count
- limit the number of matches.- Returns:
- V integer-reply representing the matching elements, or empty if there is no match.
-
lpos
public RedisFuture<List<Long>> lpos(K key, V value, int count, LPosArgs args)
Description copied from interface:RedisListAsyncCommands
Return the index of matching elements inside a Redis list using theCOUNT
option. By default, when no options are given, it will scan the list from head to tail, looking for the first match of "element". The returned elements indexes are always referring to whatRedisListAsyncCommands.lindex(java.lang.Object, long)
would return. So first element from head is0
, and so forth.- Specified by:
lpos
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the element to search for.count
- limit the number of matches.args
- command arguments to configureFIRST
andMAXLEN
options.- Returns:
- V integer-reply representing the matching elements, or empty if there is no match.
-
lpush
public RedisFuture<Long> lpush(K key, V... values)
Description copied from interface:RedisListAsyncCommands
Prepend one or multiple values to a list.- Specified by:
lpush
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.values
- the value.- Returns:
- Long integer-reply the length of the list after the push operations.
-
lpushx
public RedisFuture<Long> lpushx(K key, V... values)
Description copied from interface:RedisListAsyncCommands
Prepend values to a list, only if the list exists.- Specified by:
lpushx
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.values
- the values.- Returns:
- Long integer-reply the length of the list after the push operation.
-
lrange
public RedisFuture<List<V>> lrange(K key, long start, long stop)
Description copied from interface:RedisListAsyncCommands
Get a range of elements from a list.- Specified by:
lrange
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.start
- the start type: long.stop
- the stop type: long.- Returns:
- List<V> array-reply list of elements in the specified range.
-
lrange
public RedisFuture<Long> lrange(ValueStreamingChannel<V> channel, K key, long start, long stop)
Description copied from interface:RedisListAsyncCommands
Get a range of elements from a list.- Specified by:
lrange
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
channel
- the channel.key
- the key.start
- the start type: long.stop
- the stop type: long.- Returns:
- Long count of elements in the specified range.
-
lrem
public RedisFuture<Long> lrem(K key, long count, V value)
Description copied from interface:RedisListAsyncCommands
Remove elements from a list.- Specified by:
lrem
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.count
- the count type: long.value
- the value.- Returns:
- Long integer-reply the number of removed elements.
-
lset
public RedisFuture<String> lset(K key, long index, V value)
Description copied from interface:RedisListAsyncCommands
Set the value of an element in a list by its index.- Specified by:
lset
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.index
- the index type: long.value
- the value.- Returns:
- String simple-string-reply.
-
ltrim
public RedisFuture<String> ltrim(K key, long start, long stop)
Description copied from interface:RedisListAsyncCommands
Trim a list to the specified range.- Specified by:
ltrim
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.start
- the start type: long.stop
- the stop type: long.- Returns:
- String simple-string-reply.
-
memoryUsage
public RedisFuture<Long> memoryUsage(K key)
Description copied from interface:RedisServerAsyncCommands
Reports the number of bytes that a key and its value require to be stored in RAM.- Specified by:
memoryUsage
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- memory usage in bytes.
-
mget
public RedisFuture<List<KeyValue<K,V>>> mget(K... keys)
Description copied from interface:RedisStringAsyncCommands
Get the values of all the given keys.- Specified by:
mget
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
keys
- the key.- Returns:
- List<V> array-reply list of values at the specified keys.
-
mget
public RedisFuture<Long> mget(KeyValueStreamingChannel<K,V> channel, K... keys)
Description copied from interface:RedisStringAsyncCommands
Stream over the values of all the given keys.- Specified by:
mget
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
channel
- the channel.keys
- the keys.- Returns:
- Long array-reply list of values at the specified keys.
-
mget
public RedisFuture<Long> mget(KeyValueStreamingChannel<K,V> channel, Iterable<K> keys)
-
migrate
public RedisFuture<String> migrate(String host, int port, K key, int db, long timeout)
Description copied from interface:RedisKeyAsyncCommands
Atomically transfer a key from a Redis instance to another one.- Specified by:
migrate
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
host
- the host.port
- the port.key
- the key.db
- the database.timeout
- the timeout in milliseconds.- Returns:
- String simple-string-reply The command returns OK on success.
-
migrate
public RedisFuture<String> migrate(String host, int port, int db, long timeout, MigrateArgs<K> migrateArgs)
Description copied from interface:RedisKeyAsyncCommands
Atomically transfer one or more keys from a Redis instance to another one.- Specified by:
migrate
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
host
- the host.port
- the port.db
- the database.timeout
- the timeout in milliseconds.migrateArgs
- migrate args that allow to configure further options.- Returns:
- String simple-string-reply The command returns OK on success.
-
move
public RedisFuture<Boolean> move(K key, int db)
Description copied from interface:RedisKeyAsyncCommands
Move a key to another database.- Specified by:
move
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.db
- the db type: long.- Returns:
- Boolean integer-reply specifically:.
-
mset
public RedisFuture<String> mset(Map<K,V> map)
Description copied from interface:RedisStringAsyncCommands
Set multiple keys to multiple values.- Specified by:
mset
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
map
- the map.- Returns:
- String simple-string-reply always
OK
sinceMSET
can't fail.
-
msetnx
public RedisFuture<Boolean> msetnx(Map<K,V> map)
Description copied from interface:RedisStringAsyncCommands
Set multiple keys to multiple values, only if none of the keys exist.- Specified by:
msetnx
in interfaceRedisClusterAsyncCommands<K,V>
- Specified by:
msetnx
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
map
- the map.- Returns:
- Boolean integer-reply specifically:
1
if the all the keys were set.0
if no key was set (at least one key already existed).
-
multi
public RedisFuture<String> multi()
Description copied from interface:RedisTransactionalAsyncCommands
Mark the start of a transaction block.- Specified by:
multi
in interfaceRedisTransactionalAsyncCommands<K,V>
- Returns:
- String simple-string-reply always
OK
.
-
objectEncoding
public RedisFuture<String> objectEncoding(K key)
Description copied from interface:RedisKeyAsyncCommands
Returns the kind of internal representation used in order to store the value associated with thekey
.- Specified by:
objectEncoding
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- String.
-
objectFreq
public RedisFuture<Long> objectFreq(K key)
Description copied from interface:RedisKeyAsyncCommands
Returns the logarithmic access frequency counter of the object stored at the specifiedkey
.- Specified by:
objectFreq
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long.
-
objectIdletime
public RedisFuture<Long> objectIdletime(K key)
Description copied from interface:RedisKeyAsyncCommands
Returns the number of seconds since the object stored at the specified key is idle (not requested by read or write operations).- Specified by:
objectIdletime
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- number of seconds since the object stored at the specified key is idle.
-
objectRefcount
public RedisFuture<Long> objectRefcount(K key)
Description copied from interface:RedisKeyAsyncCommands
Returns the number of references of the value associated with the specified key.- Specified by:
objectRefcount
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long.
-
persist
public RedisFuture<Boolean> persist(K key)
Description copied from interface:RedisKeyAsyncCommands
Remove the expiration from a key.- Specified by:
persist
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was removed.false
ifkey
does not exist or does not have an associated timeout.
-
pexpire
public RedisFuture<Boolean> pexpire(K key, long milliseconds)
Description copied from interface:RedisKeyAsyncCommands
Set a key's time to live in milliseconds.- Specified by:
pexpire
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.milliseconds
- the milliseconds type: long.- Returns:
- integer-reply, specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set.
-
pexpire
public RedisFuture<Boolean> pexpire(K key, long milliseconds, ExpireArgs expireArgs)
Description copied from interface:RedisKeyAsyncCommands
Set a key's time to live in milliseconds.- Specified by:
pexpire
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.milliseconds
- the milliseconds type: long.expireArgs
- the expire arguments.- Returns:
- integer-reply, specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set.
-
pexpire
public RedisFuture<Boolean> pexpire(K key, Duration milliseconds)
Description copied from interface:RedisKeyAsyncCommands
Set a key's time to live in milliseconds.- Specified by:
pexpire
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.milliseconds
- the milliseconds.- Returns:
- integer-reply, specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set.
-
pexpire
public RedisFuture<Boolean> pexpire(K key, Duration milliseconds, ExpireArgs expireArgs)
Description copied from interface:RedisKeyAsyncCommands
Set a key's time to live in milliseconds.- Specified by:
pexpire
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.milliseconds
- the milliseconds.expireArgs
- the expire arguments.- Returns:
- integer-reply, specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set.
-
pexpireat
public RedisFuture<Boolean> pexpireat(K key, Date timestamp)
Description copied from interface:RedisKeyAsyncCommands
Set the expiration for a key as a UNIX timestamp specified in milliseconds.- Specified by:
pexpireat
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.timestamp
- the milliseconds-timestamp type: posix time.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set (see:EXPIRE
).
-
pexpireat
public RedisFuture<Boolean> pexpireat(K key, Date timestamp, ExpireArgs expireArgs)
Description copied from interface:RedisKeyAsyncCommands
Set the expiration for a key as a UNIX timestamp specified in milliseconds.- Specified by:
pexpireat
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.timestamp
- the milliseconds-timestamp type: posix time.expireArgs
- the expire arguments.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set (see:EXPIRE
).
-
pexpireat
public RedisFuture<Boolean> pexpireat(K key, Instant timestamp)
Description copied from interface:RedisKeyAsyncCommands
Set the expiration for a key as a UNIX timestamp specified in milliseconds.- Specified by:
pexpireat
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.timestamp
- the milliseconds-timestamp type: posix time.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set (see:EXPIRE
).
-
pexpireat
public RedisFuture<Boolean> pexpireat(K key, Instant timestamp, ExpireArgs expireArgs)
Description copied from interface:RedisKeyAsyncCommands
Set the expiration for a key as a UNIX timestamp specified in milliseconds.- Specified by:
pexpireat
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.timestamp
- the milliseconds-timestamp type: posix time.expireArgs
- the expire arguments.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set (see:EXPIRE
).
-
pexpireat
public RedisFuture<Boolean> pexpireat(K key, long timestamp)
Description copied from interface:RedisKeyAsyncCommands
Set the expiration for a key as a UNIX timestamp specified in milliseconds.- Specified by:
pexpireat
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.timestamp
- the milliseconds-timestamp type: posix time.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set (see:EXPIRE
).
-
pexpireat
public RedisFuture<Boolean> pexpireat(K key, long timestamp, ExpireArgs expireArgs)
Description copied from interface:RedisKeyAsyncCommands
Set the expiration for a key as a UNIX timestamp specified in milliseconds.- Specified by:
pexpireat
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.timestamp
- the milliseconds-timestamp type: posix time.expireArgs
- the expire arguments.- Returns:
- Boolean integer-reply specifically:
true
if the timeout was set.false
ifkey
does not exist or the timeout could not be set (see:EXPIRE
).
-
pexpiretime
public RedisFuture<Long> pexpiretime(K key)
Description copied from interface:RedisKeyAsyncCommands
Get the time to live for a key in as unix timestamp in milliseconds.- Specified by:
pexpiretime
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long integer-reply in milliseconds, or a negative value in order to signal an error. The command returns
-1
if the key exists but has no associated expiration time. The command returns-2
if the key does not exist.
-
pfadd
public RedisFuture<Long> pfadd(K key, V... values)
Description copied from interface:RedisHLLAsyncCommands
Adds the specified elements to the specified HyperLogLog.- Specified by:
pfadd
in interfaceRedisHLLAsyncCommands<K,V>
- Parameters:
key
- the key.values
- the values.- Returns:
- Long integer-reply specifically: 1 if at least 1 HyperLogLog internal register was altered. 0 otherwise.
-
pfcount
public RedisFuture<Long> pfcount(K... keys)
Description copied from interface:RedisHLLAsyncCommands
Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).- Specified by:
pfcount
in interfaceRedisHLLAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply specifically:
The approximated number of unique elements observed via
PFADD
.
-
pfmerge
public RedisFuture<String> pfmerge(K destkey, K... sourcekeys)
Description copied from interface:RedisHLLAsyncCommands
Merge N different HyperLogLogs into a single one.- Specified by:
pfmerge
in interfaceRedisHLLAsyncCommands<K,V>
- Parameters:
destkey
- the destination key.sourcekeys
- the source key.- Returns:
- String simple-string-reply The command just returns
OK
.
-
ping
public RedisFuture<String> ping()
Description copied from interface:BaseRedisAsyncCommands
Ping the server.- Specified by:
ping
in interfaceBaseRedisAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
psetex
public RedisFuture<String> psetex(K key, long milliseconds, V value)
Description copied from interface:RedisStringAsyncCommands
Set the value and expiration in milliseconds of a key.- Specified by:
psetex
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.milliseconds
- the milliseconds type: long.value
- the value.- Returns:
- String simple-string-reply.
-
pttl
public RedisFuture<Long> pttl(K key)
Description copied from interface:RedisKeyAsyncCommands
Get the time to live for a key in milliseconds.- Specified by:
pttl
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long integer-reply in milliseconds, or a negative value in order to signal an error. The command returns
-1
if the key exists but has no associated expiration time. The command returns-2
if the key does not exist.
-
publish
public RedisFuture<Long> publish(K channel, V message)
Description copied from interface:BaseRedisAsyncCommands
Post a message to a channel.- Specified by:
publish
in interfaceBaseRedisAsyncCommands<K,V>
- Parameters:
channel
- the channel type: key.message
- the message type: value.- Returns:
- Long integer-reply the number of clients that received the message.
-
pubsubChannels
public RedisFuture<List<K>> pubsubChannels()
Description copied from interface:BaseRedisAsyncCommands
Lists the currently *active channels*.- Specified by:
pubsubChannels
in interfaceBaseRedisAsyncCommands<K,V>
- Returns:
- List<K> array-reply a list of active channels, optionally matching the specified pattern.
-
pubsubChannels
public RedisFuture<List<K>> pubsubChannels(K channel)
Description copied from interface:BaseRedisAsyncCommands
Lists the currently *active channels*.- Specified by:
pubsubChannels
in interfaceBaseRedisAsyncCommands<K,V>
- Parameters:
channel
- the key.- Returns:
- List<K> array-reply a list of active channels, optionally matching the specified pattern.
-
pubsubNumpat
public RedisFuture<Long> pubsubNumpat()
Description copied from interface:BaseRedisAsyncCommands
Returns the number of subscriptions to patterns.- Specified by:
pubsubNumpat
in interfaceBaseRedisAsyncCommands<K,V>
- Returns:
- Long integer-reply the number of patterns all the clients are subscribed to.
-
pubsubNumsub
public RedisFuture<Map<K,Long>> pubsubNumsub(K... channels)
Description copied from interface:BaseRedisAsyncCommands
Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channels.- Specified by:
pubsubNumsub
in interfaceBaseRedisAsyncCommands<K,V>
- Parameters:
channels
- channel keys.- Returns:
- array-reply a list of channels and number of subscribers for every channel.
-
quit
public RedisFuture<String> quit()
Description copied from interface:BaseRedisAsyncCommands
Instructs Redis to disconnect the connection. Note that if auto-reconnect is enabled then Lettuce will auto-reconnect if the connection was disconnected. UseStatefulConnection.close()
to close connections and release resources.- Specified by:
quit
in interfaceBaseRedisAsyncCommands<K,V>
- Returns:
- String simple-string-reply always OK.
-
randomkey
public RedisFuture<K> randomkey()
Description copied from interface:RedisKeyAsyncCommands
Return a random key from the keyspace.- Specified by:
randomkey
in interfaceRedisKeyAsyncCommands<K,V>
- Returns:
- K bulk-string-reply the random key, or
null
when the database is empty.
-
readOnly
public RedisFuture<String> readOnly()
Description copied from interface:BaseRedisAsyncCommands
Switch connection to Read-Only mode when connecting to a cluster.- Specified by:
readOnly
in interfaceBaseRedisAsyncCommands<K,V>
- Specified by:
readOnly
in interfaceRedisClusterAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
readWrite
public RedisFuture<String> readWrite()
Description copied from interface:BaseRedisAsyncCommands
Switch connection to Read-Write mode (default) when connecting to a cluster.- Specified by:
readWrite
in interfaceBaseRedisAsyncCommands<K,V>
- Specified by:
readWrite
in interfaceRedisClusterAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
rename
public RedisFuture<String> rename(K key, K newKey)
Description copied from interface:RedisKeyAsyncCommands
Rename a key.- Specified by:
rename
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.newKey
- the newkey type: key.- Returns:
- String simple-string-reply.
-
renamenx
public RedisFuture<Boolean> renamenx(K key, K newKey)
Description copied from interface:RedisKeyAsyncCommands
Rename a key, only if the new key does not exist.- Specified by:
renamenx
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.newKey
- the newkey type: key.- Returns:
- Boolean integer-reply specifically:
true
ifkey
was renamed tonewkey
.false
ifnewkey
already exists.
-
replicaof
public RedisFuture<String> replicaof(String host, int port)
Description copied from interface:RedisServerAsyncCommands
Make the server a replica of another instance.- Specified by:
replicaof
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
host
- the host type: string.port
- the port type: string.- Returns:
- String simple-string-reply.
-
replicaofNoOne
public RedisFuture<String> replicaofNoOne()
Description copied from interface:RedisServerAsyncCommands
Promote server as master.- Specified by:
replicaofNoOne
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
reset
public void reset()
Description copied from interface:BaseRedisAsyncCommands
Reset the command state. Queued commands will be canceled and the internal state will be reset. This is useful when the internal state machine gets out of sync with the connection.- Specified by:
reset
in interfaceBaseRedisAsyncCommands<K,V>
-
restore
public RedisFuture<String> restore(K key, long ttl, byte[] value)
Description copied from interface:RedisKeyAsyncCommands
Create a key using the provided serialized value, previously obtained using DUMP.- Specified by:
restore
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.ttl
- the ttl type: long.value
- the serialized-value type: string.- Returns:
- String simple-string-reply The command returns OK on success.
-
restore
public RedisFuture<String> restore(K key, byte[] value, RestoreArgs args)
Description copied from interface:RedisKeyAsyncCommands
Create a key using the provided serialized value, previously obtained using DUMP.- Specified by:
restore
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the serialized-value type: string.args
- theRestoreArgs
, must not benull
.- Returns:
- String simple-string-reply The command returns OK on success.
-
role
public RedisFuture<List<Object>> role()
Description copied from interface:BaseRedisAsyncCommands
Return the role of the instance in the context of replication.- Specified by:
role
in interfaceBaseRedisAsyncCommands<K,V>
- Returns:
- List<Object> array-reply where the first element is one of master, slave, sentinel and the additional elements are role-specific.
-
rpop
public RedisFuture<V> rpop(K key)
Description copied from interface:RedisListAsyncCommands
Remove and get the last element in a list.- Specified by:
rpop
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- V bulk-string-reply the value of the last element, or
null
whenkey
does not exist.
-
rpop
public RedisFuture<List<V>> rpop(K key, long count)
Description copied from interface:RedisListAsyncCommands
Remove and get the lastcount
elements in a list.- Specified by:
rpop
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.count
- the number of elements to return.- Returns:
- List<V> array-reply list of the last
count
elements, ornull
whenkey
does not exist.
-
rpoplpush
public RedisFuture<V> rpoplpush(K source, K destination)
Description copied from interface:RedisListAsyncCommands
Remove the last element in a list, append it to another list and return it.- Specified by:
rpoplpush
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
source
- the source key.destination
- the destination type: key.- Returns:
- V bulk-string-reply the element being popped and pushed.
-
rpush
public RedisFuture<Long> rpush(K key, V... values)
Description copied from interface:RedisListAsyncCommands
Append one or multiple values to a list.- Specified by:
rpush
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.values
- the value.- Returns:
- Long integer-reply the length of the list after the push operation.
-
rpushx
public RedisFuture<Long> rpushx(K key, V... values)
Description copied from interface:RedisListAsyncCommands
Append values to a list, only if the list exists.- Specified by:
rpushx
in interfaceRedisListAsyncCommands<K,V>
- Parameters:
key
- the key.values
- the values.- Returns:
- Long integer-reply the length of the list after the push operation.
-
sadd
public RedisFuture<Long> sadd(K key, V... members)
Description copied from interface:RedisSetAsyncCommands
Add one or more members to a set.- Specified by:
sadd
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.members
- the member type: value.- Returns:
- Long integer-reply the number of elements that were added to the set, not including all the elements already present into the set.
-
save
public RedisFuture<String> save()
Description copied from interface:RedisServerAsyncCommands
Synchronously save the dataset to disk.- Specified by:
save
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply The commands returns OK on success.
-
scan
public RedisFuture<KeyScanCursor<K>> scan()
Description copied from interface:RedisKeyAsyncCommands
Incrementally iterate the keys space.- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Returns:
- KeyScanCursor<K> scan cursor.
-
scan
public RedisFuture<KeyScanCursor<K>> scan(ScanArgs scanArgs)
Description copied from interface:RedisKeyAsyncCommands
Incrementally iterate the keys space. UseKeyScanArgs
to specifySCAN
-specific arguments.- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
scanArgs
- scan arguments.- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
KeyScanArgs
-
scan
public RedisFuture<KeyScanCursor<K>> scan(ScanCursor scanCursor, ScanArgs scanArgs)
Description copied from interface:RedisKeyAsyncCommands
Incrementally iterate the keys space. UseKeyScanArgs
to specifySCAN
-specific arguments.- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
scanCursor
- cursor to resume from a previous scan, must not benull
.scanArgs
- scan arguments.- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
KeyScanArgs
-
scan
public RedisFuture<KeyScanCursor<K>> scan(ScanCursor scanCursor)
Description copied from interface:RedisKeyAsyncCommands
Incrementally iterate the keys space.- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
scanCursor
- cursor to resume from a previous scan, must not benull
.- Returns:
- KeyScanCursor<K> scan cursor.
-
scan
public RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel)
Description copied from interface:RedisKeyAsyncCommands
Incrementally iterate the keys space.- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every key.- Returns:
- StreamScanCursor scan cursor.
-
scan
public RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanArgs scanArgs)
Description copied from interface:RedisKeyAsyncCommands
Incrementally iterate the keys space. UseKeyScanArgs
to specifySCAN
-specific arguments.- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every key.scanArgs
- scan arguments.- Returns:
- StreamScanCursor scan cursor.
- See Also:
KeyScanArgs
-
scan
public RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor, ScanArgs scanArgs)
Description copied from interface:RedisKeyAsyncCommands
Incrementally iterate the keys space. UseKeyScanArgs
to specifySCAN
-specific arguments.- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every key.scanCursor
- cursor to resume from a previous scan, must not benull
.scanArgs
- scan arguments.- Returns:
- StreamScanCursor scan cursor.
- See Also:
KeyScanArgs
-
scan
public RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor)
Description copied from interface:RedisKeyAsyncCommands
Incrementally iterate the keys space.- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every key.scanCursor
- cursor to resume from a previous scan, must not benull
.- Returns:
- StreamScanCursor scan cursor.
-
scard
public RedisFuture<Long> scard(K key)
Description copied from interface:RedisSetAsyncCommands
Get the number of members in a set.- Specified by:
scard
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long integer-reply the cardinality (number of elements) of the set, or
false
ifkey
does not exist.
-
scriptExists
public RedisFuture<List<Boolean>> scriptExists(String... digests)
Description copied from interface:RedisScriptingAsyncCommands
Check existence of scripts in the script cache.- Specified by:
scriptExists
in interfaceRedisScriptingAsyncCommands<K,V>
- Parameters:
digests
- script digests.- Returns:
- List<Boolean> array-reply The command returns an array of integers that correspond to the specified SHA1 digest arguments. For every corresponding SHA1 digest of a script that actually exists in the script cache, an 1 is returned, otherwise 0 is returned.
-
scriptFlush
public RedisFuture<String> scriptFlush()
Description copied from interface:RedisScriptingAsyncCommands
Remove all the scripts from the script cache.- Specified by:
scriptFlush
in interfaceRedisScriptingAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
scriptFlush
public RedisFuture<String> scriptFlush(FlushMode flushMode)
Description copied from interface:RedisScriptingAsyncCommands
Remove all the scripts from the script cache using the specifiedFlushMode
.- Specified by:
scriptFlush
in interfaceRedisScriptingAsyncCommands<K,V>
- Parameters:
flushMode
- the flush mode (sync/async).- Returns:
- String simple-string-reply.
-
scriptKill
public RedisFuture<String> scriptKill()
Description copied from interface:RedisScriptingAsyncCommands
Kill the script currently in execution.- Specified by:
scriptKill
in interfaceRedisScriptingAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
scriptLoad
public RedisFuture<String> scriptLoad(String script)
Description copied from interface:RedisScriptingAsyncCommands
Load the specified Lua script into the script cache.- Specified by:
scriptLoad
in interfaceRedisScriptingAsyncCommands<K,V>
- Parameters:
script
- script content.- Returns:
- String bulk-string-reply This command returns the SHA1 digest of the script added into the script cache.
-
scriptLoad
public RedisFuture<String> scriptLoad(byte[] script)
Description copied from interface:RedisScriptingAsyncCommands
Load the specified Lua script into the script cache.- Specified by:
scriptLoad
in interfaceRedisScriptingAsyncCommands<K,V>
- Parameters:
script
- script content.- Returns:
- String bulk-string-reply This command returns the SHA1 digest of the script added into the script cache.
-
sdiff
public RedisFuture<Set<V>> sdiff(K... keys)
Description copied from interface:RedisSetAsyncCommands
Subtract multiple sets.- Specified by:
sdiff
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
keys
- the key.- Returns:
- Set<V> array-reply list with members of the resulting set.
-
sdiff
public RedisFuture<Long> sdiff(ValueStreamingChannel<V> channel, K... keys)
Description copied from interface:RedisSetAsyncCommands
Subtract multiple sets.- Specified by:
sdiff
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
channel
- the channel.keys
- the keys.- Returns:
- Long count of members of the resulting set.
-
sdiffstore
public RedisFuture<Long> sdiffstore(K destination, K... keys)
Description copied from interface:RedisSetAsyncCommands
Subtract multiple sets and store the resulting set in a key.- Specified by:
sdiffstore
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
destination
- the destination type: key.keys
- the key.- Returns:
- Long integer-reply the number of elements in the resulting set.
-
select
public RedisFuture<String> select(int db)
-
set
public RedisFuture<String> set(K key, V value)
Description copied from interface:RedisStringAsyncCommands
Set the string value of a key.- Specified by:
set
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the value.- Returns:
- String simple-string-reply
OK
ifSET
was executed correctly.
-
set
public RedisFuture<String> set(K key, V value, SetArgs setArgs)
Description copied from interface:RedisStringAsyncCommands
Set the string value of a key.- Specified by:
set
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the value.setArgs
- the setArgs.- Returns:
- String simple-string-reply
OK
ifSET
was executed correctly.
-
setGet
public RedisFuture<V> setGet(K key, V value)
Description copied from interface:RedisStringAsyncCommands
Set the string value of a key and return its old value.- Specified by:
setGet
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the value.- Returns:
- V bulk-string-reply the old value stored at
key
, ornull
whenkey
did not exist.
-
setGet
public RedisFuture<V> setGet(K key, V value, SetArgs setArgs)
Description copied from interface:RedisStringAsyncCommands
Set the string value of a key and return its old value.- Specified by:
setGet
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the value.setArgs
- the command arguments.- Returns:
- V bulk-string-reply the old value stored at
key
, ornull
whenkey
did not exist.
-
setAutoFlushCommands
public void setAutoFlushCommands(boolean autoFlush)
Description copied from interface:BaseRedisAsyncCommands
Disable or enable auto-flush behavior. Default istrue
. If autoFlushCommands is disabled, multiple commands can be issued without writing them actually to the transport. Commands are buffered until aBaseRedisAsyncCommands.flushCommands()
is issued. After callingBaseRedisAsyncCommands.flushCommands()
commands are sent to the transport and executed by Redis.- Specified by:
setAutoFlushCommands
in interfaceBaseRedisAsyncCommands<K,V>
- Parameters:
autoFlush
- state of autoFlush.
-
setTimeout
public void setTimeout(Duration timeout)
Description copied from interface:RedisClusterAsyncCommands
Set the default timeout for operations. A zero timeout value indicates to not time out.- Specified by:
setTimeout
in interfaceRedisClusterAsyncCommands<K,V>
- Parameters:
timeout
- the timeout value
-
setbit
public RedisFuture<Long> setbit(K key, long offset, int value)
Description copied from interface:RedisStringAsyncCommands
Sets or clears the bit at offset in the string value stored at key.- Specified by:
setbit
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.offset
- the offset type: long.value
- the value type: string.- Returns:
- Long integer-reply the original bit value stored at offset.
-
setex
public RedisFuture<String> setex(K key, long seconds, V value)
Description copied from interface:RedisStringAsyncCommands
Set the value and expiration of a key.- Specified by:
setex
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.seconds
- the seconds type: long.value
- the value.- Returns:
- String simple-string-reply.
-
setnx
public RedisFuture<Boolean> setnx(K key, V value)
Description copied from interface:RedisStringAsyncCommands
Set the value of a key, only if the key does not exist.- Specified by:
setnx
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.value
- the value.- Returns:
- Boolean integer-reply specifically:
1
if the key was set0
if the key was not set.
-
setrange
public RedisFuture<Long> setrange(K key, long offset, V value)
Description copied from interface:RedisStringAsyncCommands
Overwrite part of a string at key starting at the specified offset.- Specified by:
setrange
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.offset
- the offset type: long.value
- the value.- Returns:
- Long integer-reply the length of the string after it was modified by the command.
-
shutdown
public void shutdown(boolean save)
Description copied from interface:RedisServerAsyncCommands
Synchronously save the dataset to disk and then shut down the server.- Specified by:
shutdown
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
save
-true
force save operation.
-
shutdown
public void shutdown(ShutdownArgs args)
Description copied from interface:RedisServerAsyncCommands
Synchronously save the dataset to disk and then shutdown the server.- Specified by:
shutdown
in interfaceRedisServerAsyncCommands<K,V>
-
sinter
public RedisFuture<Set<V>> sinter(K... keys)
Description copied from interface:RedisSetAsyncCommands
Intersect multiple sets.- Specified by:
sinter
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
keys
- the key.- Returns:
- Set<V> array-reply list with members of the resulting set.
-
sinter
public RedisFuture<Long> sinter(ValueStreamingChannel<V> channel, K... keys)
Description copied from interface:RedisSetAsyncCommands
Intersect multiple sets.- Specified by:
sinter
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
channel
- the channel.keys
- the keys.- Returns:
- Long count of members of the resulting set.
-
sintercard
public RedisFuture<Long> sintercard(K... keys)
Description copied from interface:RedisSetAsyncCommands
This command works exactly likeRedisSetAsyncCommands.sinter(java.lang.Object[])
but instead of returning the result set, it returns just the cardinality of the result.- Specified by:
sintercard
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- The cardinality of the set which would result from the intersection of all the given sets.
-
sintercard
public RedisFuture<Long> sintercard(long limit, K... keys)
Description copied from interface:RedisSetAsyncCommands
This command works exactly likeRedisSetAsyncCommands.sinter(java.lang.Object[])
but instead of returning the result set, it returns just the cardinality of the result.- Specified by:
sintercard
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
limit
- If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality.keys
- the keys.- Returns:
- The cardinality of the set which would result from the intersection of all the given sets.
-
sinterstore
public RedisFuture<Long> sinterstore(K destination, K... keys)
Description copied from interface:RedisSetAsyncCommands
Intersect multiple sets and store the resulting set in a key.- Specified by:
sinterstore
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
destination
- the destination type: key.keys
- the key.- Returns:
- Long integer-reply the number of elements in the resulting set.
-
sismember
public RedisFuture<Boolean> sismember(K key, V member)
Description copied from interface:RedisSetAsyncCommands
Determine if a given value is a member of a set.- Specified by:
sismember
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.member
- the member type: value.- Returns:
- Boolean integer-reply specifically:
true
if the element is a member of the set.false
if the element is not a member of the set, or ifkey
does not exist.
-
slaveof
public RedisFuture<String> slaveof(String host, int port)
Description copied from interface:RedisServerAsyncCommands
Make the server a replica of another instance.- Specified by:
slaveof
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
host
- the host type: string.port
- the port type: string.- Returns:
- String simple-string-reply.
-
slaveofNoOne
public RedisFuture<String> slaveofNoOne()
Description copied from interface:RedisServerAsyncCommands
Promote server as master.- Specified by:
slaveofNoOne
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
-
slowlogGet
public RedisFuture<List<Object>> slowlogGet()
Description copied from interface:RedisServerAsyncCommands
Read the slow log.- Specified by:
slowlogGet
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- List<Object> deeply nested multi bulk replies.
-
slowlogGet
public RedisFuture<List<Object>> slowlogGet(int count)
Description copied from interface:RedisServerAsyncCommands
Read the slow log.- Specified by:
slowlogGet
in interfaceRedisServerAsyncCommands<K,V>
- Parameters:
count
- the count.- Returns:
- List<Object> deeply nested multi bulk replies.
-
slowlogLen
public RedisFuture<Long> slowlogLen()
Description copied from interface:RedisServerAsyncCommands
Obtaining the current length of the slow log.- Specified by:
slowlogLen
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- Long length of the slow log.
-
slowlogReset
public RedisFuture<String> slowlogReset()
Description copied from interface:RedisServerAsyncCommands
Resetting the slow log.- Specified by:
slowlogReset
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- String simple-string-reply The commands returns OK on success.
-
smembers
public RedisFuture<Set<V>> smembers(K key)
Description copied from interface:RedisSetAsyncCommands
Get all the members in a set.- Specified by:
smembers
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Set<V> array-reply all elements of the set.
-
smembers
public RedisFuture<Long> smembers(ValueStreamingChannel<V> channel, K key)
Description copied from interface:RedisSetAsyncCommands
Get all the members in a set.- Specified by:
smembers
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
channel
- the channel.key
- the keys.- Returns:
- Long count of members of the resulting set.
-
smismember
public RedisFuture<List<Boolean>> smismember(K key, V... members)
Description copied from interface:RedisSetAsyncCommands
Returns whether each member is a member of the set stored at key.- Specified by:
smismember
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.members
- the member type: value.- Returns:
- List<Boolean> array-reply list representing the membership of the given elements, in the same order as they are requested.
-
smove
public RedisFuture<Boolean> smove(K source, K destination, V member)
Description copied from interface:RedisSetAsyncCommands
Move a member from one set to another.- Specified by:
smove
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
source
- the source key.destination
- the destination type: key.member
- the member type: value.- Returns:
- Boolean integer-reply specifically:
true
if the element is moved.false
if the element is not a member ofsource
and no operation was performed.
-
sort
public RedisFuture<List<V>> sort(K key)
Description copied from interface:RedisKeyAsyncCommands
Sort the elements in a list, set or sorted set.- Specified by:
sort
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- List<V> array-reply list of sorted elements.
-
sort
public RedisFuture<Long> sort(ValueStreamingChannel<V> channel, K key)
Description copied from interface:RedisKeyAsyncCommands
Sort the elements in a list, set or sorted set.- Specified by:
sort
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.- Returns:
- Long number of values.
-
sort
public RedisFuture<List<V>> sort(K key, SortArgs sortArgs)
Description copied from interface:RedisKeyAsyncCommands
Sort the elements in a list, set or sorted set.- Specified by:
sort
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.sortArgs
- sort arguments.- Returns:
- List<V> array-reply list of sorted elements.
-
sort
public RedisFuture<Long> sort(ValueStreamingChannel<V> channel, K key, SortArgs sortArgs)
Description copied from interface:RedisKeyAsyncCommands
Sort the elements in a list, set or sorted set.- Specified by:
sort
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.sortArgs
- sort arguments.- Returns:
- Long number of values.
-
sortReadOnly
public RedisFuture<List<V>> sortReadOnly(K key)
Description copied from interface:RedisKeyAsyncCommands
Sort the elements in a list, set or sorted set.- Specified by:
sortReadOnly
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- List<V> array-reply list of sorted elements.
-
sortReadOnly
public RedisFuture<Long> sortReadOnly(ValueStreamingChannel<V> channel, K key)
Description copied from interface:RedisKeyAsyncCommands
Sort the elements in a list, set or sorted set.- Specified by:
sortReadOnly
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.- Returns:
- Long number of values.
-
sortReadOnly
public RedisFuture<List<V>> sortReadOnly(K key, SortArgs sortArgs)
Description copied from interface:RedisKeyAsyncCommands
Sort the elements in a list, set or sorted set.- Specified by:
sortReadOnly
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.sortArgs
- sort arguments.- Returns:
- List<V> array-reply list of sorted elements.
-
sortReadOnly
public RedisFuture<Long> sortReadOnly(ValueStreamingChannel<V> channel, K key, SortArgs sortArgs)
Description copied from interface:RedisKeyAsyncCommands
Sort the elements in a list, set or sorted set.- Specified by:
sortReadOnly
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.sortArgs
- sort arguments.- Returns:
- Long number of values.
-
sortStore
public RedisFuture<Long> sortStore(K key, SortArgs sortArgs, K destination)
Description copied from interface:RedisKeyAsyncCommands
Sort the elements in a list, set or sorted set.- Specified by:
sortStore
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.sortArgs
- sort arguments.destination
- the destination key to store sort results.- Returns:
- Long number of values.
-
spop
public RedisFuture<V> spop(K key)
Description copied from interface:RedisSetAsyncCommands
Remove and return a random member from a set.- Specified by:
spop
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- V bulk-string-reply the removed element, or
null
whenkey
does not exist.
-
spop
public RedisFuture<Set<V>> spop(K key, long count)
Description copied from interface:RedisSetAsyncCommands
Remove and return one or multiple random members from a set.- Specified by:
spop
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.count
- number of members to pop.- Returns:
- V bulk-string-reply the removed element, or
null
whenkey
does not exist.
-
srandmember
public RedisFuture<V> srandmember(K key)
Description copied from interface:RedisSetAsyncCommands
Get one random member from a set.- Specified by:
srandmember
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- V bulk-string-reply without the additional
count
argument the command returns a Bulk Reply with the randomly selected element, ornull
whenkey
does not exist.
-
srandmember
public RedisFuture<List<V>> srandmember(K key, long count)
Description copied from interface:RedisSetAsyncCommands
Get one or multiple random members from a set.- Specified by:
srandmember
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.count
- the count type: long.- Returns:
- Set<V> bulk-string-reply without the additional
count
argument the command returns a Bulk Reply with the randomly selected element, ornull
whenkey
does not exist.
-
srandmember
public RedisFuture<Long> srandmember(ValueStreamingChannel<V> channel, K key, long count)
Description copied from interface:RedisSetAsyncCommands
Get one or multiple random members from a set.- Specified by:
srandmember
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.count
- the count.- Returns:
- Long count of members of the resulting set.
-
srem
public RedisFuture<Long> srem(K key, V... members)
Description copied from interface:RedisSetAsyncCommands
Remove one or more members from a set.- Specified by:
srem
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.members
- the member type: value.- Returns:
- Long integer-reply the number of members that were removed from the set, not including non existing members.
-
sscan
public RedisFuture<ValueScanCursor<V>> sscan(K key)
Description copied from interface:RedisSetAsyncCommands
Incrementally iterate Set elements.- Specified by:
sscan
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- ValueScanCursor<V> scan cursor.
-
sscan
public RedisFuture<ValueScanCursor<V>> sscan(K key, ScanArgs scanArgs)
Description copied from interface:RedisSetAsyncCommands
Incrementally iterate Set elements.- Specified by:
sscan
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.scanArgs
- scan arguments.- Returns:
- ValueScanCursor<V> scan cursor.
-
sscan
public RedisFuture<ValueScanCursor<V>> sscan(K key, ScanCursor scanCursor, ScanArgs scanArgs)
Description copied from interface:RedisSetAsyncCommands
Incrementally iterate Set elements.- Specified by:
sscan
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.scanCursor
- cursor to resume from a previous scan, must not benull
.scanArgs
- scan arguments.- Returns:
- ValueScanCursor<V> scan cursor.
-
sscan
public RedisFuture<ValueScanCursor<V>> sscan(K key, ScanCursor scanCursor)
Description copied from interface:RedisSetAsyncCommands
Incrementally iterate Set elements.- Specified by:
sscan
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
key
- the key.scanCursor
- cursor to resume from a previous scan, must not benull
.- Returns:
- ValueScanCursor<V> scan cursor.
-
sscan
public RedisFuture<StreamScanCursor> sscan(ValueStreamingChannel<V> channel, K key)
Description copied from interface:RedisSetAsyncCommands
Incrementally iterate Set elements.- Specified by:
sscan
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.- Returns:
- StreamScanCursor scan cursor.
-
sscan
public RedisFuture<StreamScanCursor> sscan(ValueStreamingChannel<V> channel, K key, ScanArgs scanArgs)
Description copied from interface:RedisSetAsyncCommands
Incrementally iterate Set elements.- Specified by:
sscan
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.scanArgs
- scan arguments.- Returns:
- StreamScanCursor scan cursor.
-
sscan
public RedisFuture<StreamScanCursor> sscan(ValueStreamingChannel<V> channel, K key, ScanCursor scanCursor, ScanArgs scanArgs)
Description copied from interface:RedisSetAsyncCommands
Incrementally iterate Set elements.- Specified by:
sscan
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.scanCursor
- cursor to resume from a previous scan, must not benull
.scanArgs
- scan arguments.- Returns:
- StreamScanCursor scan cursor.
-
sscan
public RedisFuture<StreamScanCursor> sscan(ValueStreamingChannel<V> channel, K key, ScanCursor scanCursor)
Description copied from interface:RedisSetAsyncCommands
Incrementally iterate Set elements.- Specified by:
sscan
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.scanCursor
- cursor to resume from a previous scan, must not benull
.- Returns:
- StreamScanCursor scan cursor.
-
strlen
public RedisFuture<Long> strlen(K key)
Description copied from interface:RedisStringAsyncCommands
Get the length of the value stored in a key.- Specified by:
strlen
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long integer-reply the length of the string at
key
, or0
whenkey
does not exist.
-
stralgoLcs
public RedisFuture<StringMatchResult> stralgoLcs(StrAlgoArgs args)
Description copied from interface:RedisStringAsyncCommands
The STRALGO command implements complex algorithms that operate on strings. This method uses the LCS algorithm (longest common substring).- Without modifiers the string representing the longest common substring is returned.
- When
LEN
is given the command returns the length of the longest common substring. - When
IDX
is given the command returns an array with the LCS length and all the ranges in both the strings, start and end offset for each string, where there are matches. WhenWITHMATCHLEN
is given each array representing a match will also have the length of the match.
- Specified by:
stralgoLcs
in interfaceRedisStringAsyncCommands<K,V>
- Parameters:
args
- command arguments.- Returns:
- StringMatchResult.
-
sunion
public RedisFuture<Set<V>> sunion(K... keys)
Description copied from interface:RedisSetAsyncCommands
Add multiple sets.- Specified by:
sunion
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
keys
- the key.- Returns:
- Set<V> array-reply list with members of the resulting set.
-
sunion
public RedisFuture<Long> sunion(ValueStreamingChannel<V> channel, K... keys)
Description copied from interface:RedisSetAsyncCommands
Add multiple sets.- Specified by:
sunion
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.keys
- the keys.- Returns:
- Long count of members of the resulting set.
-
sunionstore
public RedisFuture<Long> sunionstore(K destination, K... keys)
Description copied from interface:RedisSetAsyncCommands
Add multiple sets and store the resulting set in a key.- Specified by:
sunionstore
in interfaceRedisSetAsyncCommands<K,V>
- Parameters:
destination
- the destination type: key.keys
- the key.- Returns:
- Long integer-reply the number of elements in the resulting set.
-
swapdb
public RedisFuture<String> swapdb(int db1, int db2)
-
time
public RedisFuture<List<V>> time()
Description copied from interface:RedisServerAsyncCommands
Return the current server time.- Specified by:
time
in interfaceRedisServerAsyncCommands<K,V>
- Returns:
- List<V> array-reply specifically: A multi bulk reply containing two elements: unix time in seconds. microseconds.
-
touch
public RedisFuture<Long> touch(K... keys)
Description copied from interface:RedisKeyAsyncCommands
Touch one or more keys. Touch sets the last accessed time for a key. Non-exsitent keys wont get created.- Specified by:
touch
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply the number of found keys.
-
touch
public RedisFuture<Long> touch(Iterable<K> keys)
-
ttl
public RedisFuture<Long> ttl(K key)
Description copied from interface:RedisKeyAsyncCommands
Get the time to live for a key.- Specified by:
ttl
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long integer-reply TTL in seconds, or a negative value in order to signal an error. The command returns
-1
if the key exists but has no associated expiration time. The command returns-2
if the key does not exist.
-
type
public RedisFuture<String> type(K key)
Description copied from interface:RedisKeyAsyncCommands
Determine the type stored at key.- Specified by:
type
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- String simple-string-reply type of
key
, ornone
whenkey
does not exist.
-
unlink
public RedisFuture<Long> unlink(K... keys)
Description copied from interface:RedisKeyAsyncCommands
Unlink one or more keys (non blocking DEL).- Specified by:
unlink
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply The number of keys that were removed.
-
unlink
public RedisFuture<Long> unlink(Iterable<K> keys)
-
copy
public RedisFuture<Boolean> copy(K source, K destination)
Description copied from interface:RedisKeyAsyncCommands
Copy the value stored at the source key to the destination key.- Specified by:
copy
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
source
- the source.destination
- the destination.- Returns:
- Boolean integer-reply specifically:
true
if source was copied.false
if source was not copied.
-
copy
public RedisFuture<Boolean> copy(K source, K destination, CopyArgs copyArgs)
Description copied from interface:RedisKeyAsyncCommands
Copy the value stored at the source key to the destination key.- Specified by:
copy
in interfaceRedisKeyAsyncCommands<K,V>
- Parameters:
source
- the source.destination
- the destination.copyArgs
- the copyArgs.- Returns:
- Boolean integer-reply specifically:
true
if source was copied.false
if source was not copied.
-
unwatch
public RedisFuture<String> unwatch()
Description copied from interface:RedisTransactionalAsyncCommands
Forget about all watched keys.- Specified by:
unwatch
in interfaceRedisTransactionalAsyncCommands<K,V>
- Returns:
- String simple-string-reply always
OK
.
-
waitForReplication
public RedisFuture<Long> waitForReplication(int replicas, long timeout)
Description copied from interface:BaseRedisAsyncCommands
Wait for replication.- Specified by:
waitForReplication
in interfaceBaseRedisAsyncCommands<K,V>
- Parameters:
replicas
- minimum number of replicas.timeout
- timeout in milliseconds.- Returns:
- number of replicas.
-
watch
public RedisFuture<String> watch(K... keys)
Description copied from interface:RedisTransactionalAsyncCommands
Watch the given keys to determine execution of the MULTI/EXEC block.- Specified by:
watch
in interfaceRedisTransactionalAsyncCommands<K,V>
- Parameters:
keys
- the key.- Returns:
- String simple-string-reply always
OK
.
-
xack
public RedisFuture<Long> xack(K key, K group, String... messageIds)
Description copied from interface:RedisStreamAsyncCommands
Acknowledge one or more messages as processed.- Specified by:
xack
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.group
- name of the consumer group.messageIds
- message Id's to acknowledge.- Returns:
- simple-reply the lenght of acknowledged messages.
-
xadd
public RedisFuture<String> xadd(K key, Map<K,V> body)
Description copied from interface:RedisStreamAsyncCommands
Append a message to the streamkey
.- Specified by:
xadd
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.body
- message body.- Returns:
- simple-reply the message Id.
-
xadd
public RedisFuture<String> xadd(K key, XAddArgs args, Map<K,V> body)
Description copied from interface:RedisStreamAsyncCommands
Append a message to the streamkey
.- Specified by:
xadd
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.body
- message body.- Returns:
- simple-reply the message Id.
-
xadd
public RedisFuture<String> xadd(K key, Object... keysAndValues)
Description copied from interface:RedisStreamAsyncCommands
Append a message to the streamkey
.- Specified by:
xadd
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.keysAndValues
- message body.- Returns:
- simple-reply the message Id.
-
xadd
public RedisFuture<String> xadd(K key, XAddArgs args, Object... keysAndValues)
Description copied from interface:RedisStreamAsyncCommands
Append a message to the streamkey
.- Specified by:
xadd
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.keysAndValues
- message body.- Returns:
- simple-reply the message Id.
-
xautoclaim
public RedisFuture<ClaimedMessages<K,V>> xautoclaim(K key, XAutoClaimArgs<K> args)
Description copied from interface:RedisStreamAsyncCommands
Gets ownership of one or multiple messages in the Pending Entries List of a given stream consumer group.- Specified by:
xautoclaim
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.- Returns:
- simple-reply the claimed stream messages.
-
xclaim
public RedisFuture<List<StreamMessage<K,V>>> xclaim(K key, Consumer<K> consumer, long minIdleTime, String... messageIds)
Description copied from interface:RedisStreamAsyncCommands
Gets ownership of one or multiple messages in the Pending Entries List of a given stream consumer group.- Specified by:
xclaim
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.consumer
- consumer identified by group name and consumer key.messageIds
- message Id's to claim.- Returns:
- simple-reply the
StreamMessage
.
-
xclaim
public RedisFuture<List<StreamMessage<K,V>>> xclaim(K key, Consumer<K> consumer, XClaimArgs args, String... messageIds)
Description copied from interface:RedisStreamAsyncCommands
Gets ownership of one or multiple messages in the Pending Entries List of a given stream consumer group.Note that setting the
JUSTID
flag (calling this method withXClaimArgs.justid()
) suppresses the message bode andStreamMessage.getBody()
isnull
.- Specified by:
xclaim
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.consumer
- consumer identified by group name and consumer key.messageIds
- message Id's to claim.- Returns:
- simple-reply the
StreamMessage
.
-
xdel
public RedisFuture<Long> xdel(K key, String... messageIds)
Description copied from interface:RedisStreamAsyncCommands
Removes the specified entries from the stream. Returns the number of items deleted, that may be different from the number of IDs passed in case certain IDs do not exist.- Specified by:
xdel
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.messageIds
- stream message Id's.- Returns:
- simple-reply number of removed entries.
-
xgroupCreate
public RedisFuture<String> xgroupCreate(XReadArgs.StreamOffset<K> offset, K group)
Description copied from interface:RedisStreamAsyncCommands
Create a consumer group.- Specified by:
xgroupCreate
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
offset
- name of the stream containing the offset to set.group
- name of the consumer group.- Returns:
- simple-reply
true
if successful.
-
xgroupCreate
public RedisFuture<String> xgroupCreate(XReadArgs.StreamOffset<K> offset, K group, XGroupCreateArgs args)
Description copied from interface:RedisStreamAsyncCommands
Create a consumer group.- Specified by:
xgroupCreate
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
offset
- name of the stream containing the offset to set.group
- name of the consumer group.- Returns:
- simple-reply
true
if successful.
-
xgroupCreateconsumer
public RedisFuture<Boolean> xgroupCreateconsumer(K key, Consumer<K> consumer)
Description copied from interface:RedisStreamAsyncCommands
Create a consumer from a consumer group.- Specified by:
xgroupCreateconsumer
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.consumer
- consumer identified by group name and consumer key.- Returns:
- simple-reply
true
if successful.
-
xgroupDelconsumer
public RedisFuture<Long> xgroupDelconsumer(K key, Consumer<K> consumer)
Description copied from interface:RedisStreamAsyncCommands
Delete a consumer from a consumer group.- Specified by:
xgroupDelconsumer
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.consumer
- consumer identified by group name and consumer key.- Returns:
- Long integer-reply number of pending messages.
-
xgroupDestroy
public RedisFuture<Boolean> xgroupDestroy(K key, K group)
Description copied from interface:RedisStreamAsyncCommands
Destroy a consumer group.- Specified by:
xgroupDestroy
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.group
- name of the consumer group.- Returns:
- simple-reply
true
if successful.
-
xgroupSetid
public RedisFuture<String> xgroupSetid(XReadArgs.StreamOffset<K> offset, K group)
Description copied from interface:RedisStreamAsyncCommands
Set the currentgroup
id.- Specified by:
xgroupSetid
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
offset
- name of the stream containing the offset to set.group
- name of the consumer group.- Returns:
- simple-reply OK.
-
xinfoStream
public RedisFuture<List<Object>> xinfoStream(K key)
Description copied from interface:RedisStreamAsyncCommands
Retrieve information about the stream atkey
.- Specified by:
xinfoStream
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.- Returns:
- List<Object> array-reply.
-
xinfoGroups
public RedisFuture<List<Object>> xinfoGroups(K key)
Description copied from interface:RedisStreamAsyncCommands
Retrieve information about the stream consumer groups atkey
.- Specified by:
xinfoGroups
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.- Returns:
- List<Object> array-reply.
-
xinfoConsumers
public RedisFuture<List<Object>> xinfoConsumers(K key, K group)
Description copied from interface:RedisStreamAsyncCommands
Retrieve information about consumer groups of groupgroup
and stream atkey
.- Specified by:
xinfoConsumers
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.group
- name of the consumer group.- Returns:
- List<Object> array-reply.
-
xlen
public RedisFuture<Long> xlen(K key)
Description copied from interface:RedisStreamAsyncCommands
Get the length of a steam.- Specified by:
xlen
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.- Returns:
- simple-reply the lenght of the stream.
-
xpending
public RedisFuture<PendingMessages> xpending(K key, K group)
Description copied from interface:RedisStreamAsyncCommands
Read pending messages from a stream for agroup
.- Specified by:
xpending
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.group
- name of the consumer group.- Returns:
- List<Object> array-reply list pending entries.
-
xpending
public RedisFuture<List<PendingMessage>> xpending(K key, K group, Range<String> range, Limit limit)
Description copied from interface:RedisStreamAsyncCommands
Read pending messages from a stream within a specificRange
.- Specified by:
xpending
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.group
- name of the consumer group.range
- must not benull
.limit
- must not benull
.- Returns:
- List<Object> array-reply list with members of the resulting stream.
-
xpending
public RedisFuture<List<PendingMessage>> xpending(K key, Consumer<K> consumer, Range<String> range, Limit limit)
Description copied from interface:RedisStreamAsyncCommands
Read pending messages from a stream within a specificRange
.- Specified by:
xpending
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.consumer
- consumer identified by group name and consumer key.range
- must not benull
.limit
- must not benull
.- Returns:
- List<Object> array-reply list with members of the resulting stream.
-
xpending
public RedisFuture<List<PendingMessage>> xpending(K key, XPendingArgs<K> args)
Description copied from interface:RedisStreamAsyncCommands
Read pending messages from a stream within a specificXPendingArgs
.- Specified by:
xpending
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.- Returns:
- List<Object> array-reply list with members of the resulting stream.
-
xrange
public RedisFuture<List<StreamMessage<K,V>>> xrange(K key, Range<String> range)
Description copied from interface:RedisStreamAsyncCommands
Read messages from a stream within a specificRange
.- Specified by:
xrange
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.range
- must not benull
.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xrange
public RedisFuture<List<StreamMessage<K,V>>> xrange(K key, Range<String> range, Limit limit)
Description copied from interface:RedisStreamAsyncCommands
- Specified by:
xrange
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.range
- must not benull
.limit
- must not benull
.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xread
public RedisFuture<List<StreamMessage<K,V>>> xread(XReadArgs.StreamOffset<K>... streams)
Description copied from interface:RedisStreamAsyncCommands
Read messages from one or moreXReadArgs.StreamOffset
s.- Specified by:
xread
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
streams
- the streams to read from.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xread
public RedisFuture<List<StreamMessage<K,V>>> xread(XReadArgs args, XReadArgs.StreamOffset<K>... streams)
Description copied from interface:RedisStreamAsyncCommands
Read messages from one or moreXReadArgs.StreamOffset
s.- Specified by:
xread
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
args
- read arguments.streams
- the streams to read from.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xreadgroup
public RedisFuture<List<StreamMessage<K,V>>> xreadgroup(Consumer<K> consumer, XReadArgs.StreamOffset<K>... streams)
Description copied from interface:RedisStreamAsyncCommands
Read messages from one or moreXReadArgs.StreamOffset
s using a consumer group.- Specified by:
xreadgroup
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
consumer
- consumer/group.streams
- the streams to read from.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xreadgroup
public RedisFuture<List<StreamMessage<K,V>>> xreadgroup(Consumer<K> consumer, XReadArgs args, XReadArgs.StreamOffset<K>... streams)
Description copied from interface:RedisStreamAsyncCommands
Read messages from one or moreXReadArgs.StreamOffset
s using a consumer group.- Specified by:
xreadgroup
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
consumer
- consumer/group.args
- read arguments.streams
- the streams to read from.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xrevrange
public RedisFuture<List<StreamMessage<K,V>>> xrevrange(K key, Range<String> range)
Description copied from interface:RedisStreamAsyncCommands
Read messages from a stream within a specificRange
in reverse order.- Specified by:
xrevrange
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.range
- must not benull
.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xrevrange
public RedisFuture<List<StreamMessage<K,V>>> xrevrange(K key, Range<String> range, Limit limit)
Description copied from interface:RedisStreamAsyncCommands
- Specified by:
xrevrange
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.range
- must not benull
.limit
- must not benull
.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xtrim
public RedisFuture<Long> xtrim(K key, long count)
Description copied from interface:RedisStreamAsyncCommands
Trims the stream tocount
elements.- Specified by:
xtrim
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.count
- length of the stream.- Returns:
- simple-reply number of removed entries.
-
xtrim
public RedisFuture<Long> xtrim(K key, boolean approximateTrimming, long count)
Description copied from interface:RedisStreamAsyncCommands
Trims the stream tocount
elements.- Specified by:
xtrim
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.approximateTrimming
-true
to trim approximately using the~
flag.count
- length of the stream.- Returns:
- simple-reply number of removed entries.
-
xtrim
public RedisFuture<Long> xtrim(K key, XTrimArgs args)
Description copied from interface:RedisStreamAsyncCommands
Trims the stream within a specificXTrimArgs
.- Specified by:
xtrim
in interfaceRedisStreamAsyncCommands<K,V>
- Parameters:
key
- the stream key.- Returns:
- simple-reply number of removed entries.
-
bzmpop
public RedisFuture<KeyValue<K,ScoredValue<V>>> bzmpop(long timeout, ZPopArgs args, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of keys.- Specified by:
bzmpop
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.keys
- the keys.- Returns:
- ScoredValue<V> the removed element or
Value.empty()
.
-
bzmpop
public RedisFuture<KeyValue<K,List<ScoredValue<V>>>> bzmpop(long timeout, long count, ZPopArgs args, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of keys.- Specified by:
bzmpop
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.count
- number of elements to pop.args
- the command args.keys
- the keys.- Returns:
- ScoredValue<V> the removed elements or
Value.empty()
.
-
bzmpop
public RedisFuture<KeyValue<K,ScoredValue<V>>> bzmpop(double timeout, ZPopArgs args, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of keys.- Specified by:
bzmpop
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.keys
- the keys.- Returns:
- ScoredValue<V> the removed element or
Value.empty()
.
-
bzmpop
public RedisFuture<KeyValue<K,List<ScoredValue<V>>>> bzmpop(double timeout, int count, ZPopArgs args, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of keys.- Specified by:
bzmpop
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.count
- number of elements to pop.args
- the command args.keys
- the keys.- Returns:
- ScoredValue<V> the removed elements or
Value.empty()
.
-
bzpopmin
public RedisFuture<KeyValue<K,ScoredValue<V>>> bzpopmin(long timeout, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Removes and returns a member with the lowest scores in the sorted set stored at one of the keys.- Specified by:
bzpopmin
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.keys
- the keys.- Returns:
- KeyValue<K, ScoredValue<V>> multi-bulk containing the name of the key, the score and the popped member.
-
bzpopmin
public RedisFuture<KeyValue<K,ScoredValue<V>>> bzpopmin(double timeout, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Removes and returns a member with the lowest scores in the sorted set stored at one of the keys.- Specified by:
bzpopmin
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.keys
- the keys.- Returns:
- KeyValue<K, ScoredValue<V>> multi-bulk containing the name of the key, the score and the popped member.
-
bzpopmax
public RedisFuture<KeyValue<K,ScoredValue<V>>> bzpopmax(long timeout, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Removes and returns a member with the highest scores in the sorted set stored at one of the keys.- Specified by:
bzpopmax
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.keys
- the keys.- Returns:
- KeyValue<K, ScoredValue<V>> multi-bulk containing the name of the key, the score and the popped member.
-
bzpopmax
public RedisFuture<KeyValue<K,ScoredValue<V>>> bzpopmax(double timeout, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Removes and returns a member with the highest scores in the sorted set stored at one of the keys.- Specified by:
bzpopmax
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
timeout
- the timeout in seconds.keys
- the keys.- Returns:
- KeyValue<K, ScoredValue<V>> multi-bulk containing the name of the key, the score and the popped member.
-
zadd
public RedisFuture<Long> zadd(K key, double score, V member)
Description copied from interface:RedisSortedSetAsyncCommands
Add one or more members to a sorted set, or update its score if it already exists.- Specified by:
zadd
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.score
- the score.member
- the member.- Returns:
- Long integer-reply specifically: The number of elements added to the sorted sets, not including elements already existing for which the score was updated.
-
zadd
public RedisFuture<Long> zadd(K key, Object... scoresAndValues)
Description copied from interface:RedisSortedSetAsyncCommands
Add one or more members to a sorted set, or update its score if it already exists.- Specified by:
zadd
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.scoresAndValues
- the scoresAndValue tuples (score,value,score,value,...).- Returns:
- Long integer-reply specifically: The number of elements added to the sorted sets, not including elements already existing for which the score was updated.
-
zadd
public RedisFuture<Long> zadd(K key, ScoredValue<V>... scoredValues)
Description copied from interface:RedisSortedSetAsyncCommands
Add one or more members to a sorted set, or update its score if it already exists.- Specified by:
zadd
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.scoredValues
- the scored values.- Returns:
- Long integer-reply specifically: The number of elements added to the sorted sets, not including elements already existing for which the score was updated.
-
zadd
public RedisFuture<Long> zadd(K key, ZAddArgs zAddArgs, double score, V member)
Description copied from interface:RedisSortedSetAsyncCommands
Add one or more members to a sorted set, or update its score if it already exists.- Specified by:
zadd
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.zAddArgs
- arguments for zadd.score
- the score.member
- the member.- Returns:
- Long integer-reply specifically: The number of elements added to the sorted sets, not including elements already existing for which the score was updated.
-
zadd
public RedisFuture<Long> zadd(K key, ZAddArgs zAddArgs, Object... scoresAndValues)
Description copied from interface:RedisSortedSetAsyncCommands
Add one or more members to a sorted set, or update its score if it already exists.- Specified by:
zadd
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.zAddArgs
- arguments for zadd.scoresAndValues
- the scoresAndValue tuples (score,value,score,value,...).- Returns:
- Long integer-reply specifically: The number of elements added to the sorted sets, not including elements already existing for which the score was updated.
-
zadd
public RedisFuture<Long> zadd(K key, ZAddArgs zAddArgs, ScoredValue<V>... scoredValues)
Description copied from interface:RedisSortedSetAsyncCommands
Add one or more members to a sorted set, or update its score if it already exists.- Specified by:
zadd
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the ke.zAddArgs
- arguments for zadd.scoredValues
- the scored values.- Returns:
- Long integer-reply specifically: The number of elements added to the sorted sets, not including elements already existing for which the score was updated.
-
zaddincr
public RedisFuture<Double> zaddincr(K key, double score, V member)
Description copied from interface:RedisSortedSetAsyncCommands
Add one or more members to a sorted set, or update its score if it already exists applying theINCR
option. ZADD acts like ZINCRBY.- Specified by:
zaddincr
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.score
- the score.member
- the member.- Returns:
- Long integer-reply specifically: The total number of elements changed.
-
zaddincr
public RedisFuture<Double> zaddincr(K key, ZAddArgs zAddArgs, double score, V member)
Description copied from interface:RedisSortedSetAsyncCommands
Add one or more members to a sorted set, or update its score if it already exists applying theINCR
option. ZADD acts like ZINCRBY.- Specified by:
zaddincr
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.zAddArgs
- arguments for zadd.score
- the score.member
- the member.- Returns:
- Long integer-reply specifically: The total number of elements changed.
-
zcard
public RedisFuture<Long> zcard(K key)
Description copied from interface:RedisSortedSetAsyncCommands
Get the number of members in a sorted set.- Specified by:
zcard
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- Long integer-reply the cardinality (number of elements) of the sorted set, or
false
ifkey
does not exist.
-
zcount
public RedisFuture<Long> zcount(K key, double min, double max)
Description copied from interface:RedisSortedSetAsyncCommands
Count the members in a sorted set with scores within the given values.- Specified by:
zcount
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.- Returns:
- Long integer-reply the number of elements in the specified score range.
-
zcount
public RedisFuture<Long> zcount(K key, String min, String max)
Description copied from interface:RedisSortedSetAsyncCommands
Count the members in a sorted set with scores within the given values.- Specified by:
zcount
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.- Returns:
- Long integer-reply the number of elements in the specified score range.
-
zcount
public RedisFuture<Long> zcount(K key, Range<? extends Number> range)
Description copied from interface:RedisSortedSetAsyncCommands
Count the members in a sorted set with scores within the givenRange
.- Specified by:
zcount
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.- Returns:
- Long integer-reply the number of elements in the specified score range.
-
zdiff
public RedisFuture<List<V>> zdiff(K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Computes the difference between the first and all successive input sorted sets.- Specified by:
zdiff
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- List<V> array-reply list of elements.
-
zdiffstore
public RedisFuture<Long> zdiffstore(K destKey, K... srcKeys)
Description copied from interface:RedisSortedSetAsyncCommands
Computes the difference between the first and all successive input sorted sets and stores the result in destination.- Specified by:
zdiffstore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
destKey
- the dest key.srcKeys
- the src keys.- Returns:
- Long the number of elements in the resulting sorted set at destination.
-
zdiffWithScores
public RedisFuture<List<ScoredValue<V>>> zdiffWithScores(K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Computes the difference between the first and all successive input sorted sets.- Specified by:
zdiffWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- List<V> array-reply list of scored values.
-
zincrby
public RedisFuture<Double> zincrby(K key, double amount, V member)
Description copied from interface:RedisSortedSetAsyncCommands
Increment the score of a member in a sorted set.- Specified by:
zincrby
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.amount
- the increment type: long.member
- the member type: value.- Returns:
- Double bulk-string-reply the new score of
member
(a double precision floating point number), represented as string.
-
zinter
public RedisFuture<List<V>> zinter(K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Intersect multiple sorted sets and returns the resulting sorted.- Specified by:
zinter
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- List<V> array-reply list of elements.
-
zinter
public RedisFuture<List<V>> zinter(ZAggregateArgs aggregateArgs, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Intersect multiple sorted sets and returns the resulting sorted.- Specified by:
zinter
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
aggregateArgs
- arguments to define aggregation and weights.keys
- the keys.- Returns:
- List<V> array-reply list of elements.
-
zintercard
public RedisFuture<Long> zintercard(K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
This command is similar toRedisSortedSetAsyncCommands.zinter(java.lang.Object[])
, but instead of returning the result set, it returns just the cardinality of the result.- Specified by:
zintercard
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long Integer reply the number of elements in the resulting intersection.
-
zintercard
public RedisFuture<Long> zintercard(long limit, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
This command is similar toRedisSortedSetAsyncCommands.zinter(java.lang.Object[])
, but instead of returning the result set, it returns just the cardinality of the result.- Specified by:
zintercard
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
limit
- If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinalitykeys
- the keys.- Returns:
- Long Integer reply the number of elements in the resulting intersection.
-
zinterWithScores
public RedisFuture<List<ScoredValue<V>>> zinterWithScores(K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Intersect multiple sorted sets and returns the resulting sorted.- Specified by:
zinterWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- List<V> array-reply list of scored values.
-
zinterWithScores
public RedisFuture<List<ScoredValue<V>>> zinterWithScores(ZAggregateArgs aggregateArgs, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Intersect multiple sorted sets and returns the resulting sorted.- Specified by:
zinterWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
aggregateArgs
- arguments to define aggregation and weights.keys
- the keys.- Returns:
- List<V> array-reply list of scored values.
-
zinterstore
public RedisFuture<Long> zinterstore(K destination, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Intersect multiple sorted sets and store the resulting sorted set in a new key.- Specified by:
zinterstore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
destination
- the destination.keys
- the keys.- Returns:
- Long integer-reply the number of elements in the resulting sorted set at
destination
.
-
zinterstore
public RedisFuture<Long> zinterstore(K destination, ZStoreArgs zStoreArgs, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Intersect multiple sorted sets and store the resulting sorted set in a new key.- Specified by:
zinterstore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
destination
- the destination.zStoreArgs
- arguments to define aggregation and weights.keys
- the keys.- Returns:
- Long integer-reply the number of elements in the resulting sorted set at
destination
.
-
zlexcount
public RedisFuture<Long> zlexcount(K key, String min, String max)
Description copied from interface:RedisSortedSetAsyncCommands
Count the number of members in a sorted set between a given lexicographical range.- Specified by:
zlexcount
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.- Returns:
- Long integer-reply the number of elements in the specified score range.
-
zlexcount
public RedisFuture<Long> zlexcount(K key, Range<? extends V> range)
Description copied from interface:RedisSortedSetAsyncCommands
Count the number of members in a sorted set between a given lexicographical range.- Specified by:
zlexcount
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.- Returns:
- Long integer-reply the number of elements in the specified score range.
-
zmscore
public RedisFuture<List<Double>> zmscore(K key, V... members)
Description copied from interface:RedisSortedSetAsyncCommands
Returns the scores associated with the specified members in the sorted set stored at key.- Specified by:
zmscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.members
- the member type: value.- Returns:
- List<Double> array-reply list of scores or nil associated with the specified member values.
-
zmpop
public RedisFuture<KeyValue<K,ScoredValue<V>>> zmpop(ZPopArgs args, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of keys.- Specified by:
zmpop
in interfaceRedisSortedSetAsyncCommands<K,V>
keys
- the keys.- Returns:
- ScoredValue<V> the removed element or
Value.empty()
.
-
zmpop
public RedisFuture<KeyValue<K,List<ScoredValue<V>>>> zmpop(int count, ZPopArgs args, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of keys.- Specified by:
zmpop
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
count
- number of elements to pop.args
- the command args.keys
- the keys.- Returns:
- ScoredValue<V> the removed elements or
Value.empty()
.
-
zpopmin
public RedisFuture<ScoredValue<V>> zpopmin(K key)
Description copied from interface:RedisSortedSetAsyncCommands
Removes and returns up to count members with the lowest scores in the sorted set stored at key.- Specified by:
zpopmin
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- ScoredValue<V> the removed element.
-
zpopmin
public RedisFuture<List<ScoredValue<V>>> zpopmin(K key, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Removes and returns up to count members with the lowest scores in the sorted set stored at key.- Specified by:
zpopmin
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.count
- the number of elements to return.- Returns:
- List<ScoredValue<V>> array-reply list of popped scores and elements.
-
zpopmax
public RedisFuture<ScoredValue<V>> zpopmax(K key)
Description copied from interface:RedisSortedSetAsyncCommands
Removes and returns up to count members with the highest scores in the sorted set stored at key.- Specified by:
zpopmax
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- ScoredValue<V> the removed element.
-
zpopmax
public RedisFuture<List<ScoredValue<V>>> zpopmax(K key, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Removes and returns up to count members with the highest scores in the sorted set stored at key.- Specified by:
zpopmax
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.count
- the number of elements to return.- Returns:
- List<ScoredValue<V>> array-reply list of popped scores and elements.
-
zrandmember
public RedisFuture<V> zrandmember(K key)
Description copied from interface:RedisSortedSetAsyncCommands
Return a random member from the sorted set stored atkey
.- Specified by:
zrandmember
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- element.
-
zrandmember
public RedisFuture<List<V>> zrandmember(K key, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Returncount
random members from the sorted set stored atkey
.- Specified by:
zrandmember
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.count
- the number of members to return. If the provided count argument is positive, return an array of distinct fields.- Returns:
- List<ScoredValue<V>> array-reply list of scores and elements.
-
zrandmemberWithScores
public RedisFuture<ScoredValue<V>> zrandmemberWithScores(K key)
Description copied from interface:RedisSortedSetAsyncCommands
Return a random member along its value from the sorted set stored atkey
.- Specified by:
zrandmemberWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- the score and element.
-
zrandmemberWithScores
public RedisFuture<List<ScoredValue<V>>> zrandmemberWithScores(K key, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Returncount
random members along their value from the sorted set stored atkey
.- Specified by:
zrandmemberWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.count
- the number of members to return. If the provided count argument is positive, return an array of distinct fields.- Returns:
- List<ScoredValue<V>> array-reply list of scores and elements.
-
zrange
public RedisFuture<List<V>> zrange(K key, long start, long stop)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by index.- Specified by:
zrange
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.start
- the start.stop
- the stop.- Returns:
- List<V> array-reply list of elements in the specified range.
-
zrange
public RedisFuture<Long> zrange(ValueStreamingChannel<V> channel, K key, long start, long stop)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by index.- Specified by:
zrange
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.start
- the start.stop
- the stop.- Returns:
- Long count of elements in the specified range.
-
zrangeWithScores
public RedisFuture<List<ScoredValue<V>>> zrangeWithScores(K key, long start, long stop)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with scores in a sorted set, by index.- Specified by:
zrangeWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.start
- the start.stop
- the stop.- Returns:
- List<V> array-reply list of elements in the specified range.
-
zrangeWithScores
public RedisFuture<Long> zrangeWithScores(ScoredValueStreamingChannel<V> channel, K key, long start, long stop)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by index.- Specified by:
zrangeWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.start
- the start.stop
- the stop.- Returns:
- Long count of elements in the specified range.
-
zrangebylex
public RedisFuture<List<V>> zrangebylex(K key, String min, String max)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by lexicographical range.- Specified by:
zrangebylex
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.- Returns:
- List<V> array-reply list of elements in the specified range.
-
zrangebylex
public RedisFuture<List<V>> zrangebylex(K key, Range<? extends V> range)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by lexicographical range.- Specified by:
zrangebylex
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.- Returns:
- List<V> array-reply list of elements in the specified range.
-
zrangebylex
public RedisFuture<List<V>> zrangebylex(K key, String min, String max, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by lexicographical range.- Specified by:
zrangebylex
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.offset
- the offset.count
- the count.- Returns:
- List<V> array-reply list of elements in the specified range.
-
zrangebylex
public RedisFuture<List<V>> zrangebylex(K key, Range<? extends V> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by lexicographical range.- Specified by:
zrangebylex
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.limit
- the limit.- Returns:
- List<V> array-reply list of elements in the specified range.
-
zrangebyscore
public RedisFuture<List<V>> zrangebyscore(K key, double min, double max)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by score.- Specified by:
zrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrangebyscore
public RedisFuture<List<V>> zrangebyscore(K key, String min, String max)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by score.- Specified by:
zrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrangebyscore
public RedisFuture<List<V>> zrangebyscore(K key, Range<? extends Number> range)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by score.- Specified by:
zrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrangebyscore
public RedisFuture<List<V>> zrangebyscore(K key, double min, double max, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by score.- Specified by:
zrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.offset
- the offset.count
- the count.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrangebyscore
public RedisFuture<List<V>> zrangebyscore(K key, String min, String max, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by score.- Specified by:
zrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.offset
- the offset.count
- the count.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrangebyscore
public RedisFuture<List<V>> zrangebyscore(K key, Range<? extends Number> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by score.- Specified by:
zrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.limit
- the limit.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrangebyscore
public RedisFuture<Long> zrangebyscore(ValueStreamingChannel<V> channel, K key, double min, double max)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members in a sorted set, by score.- Specified by:
zrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.min
- min score.max
- max score.- Returns:
- Long count of elements in the specified score range.
-
zrangebyscore
public RedisFuture<Long> zrangebyscore(ValueStreamingChannel<V> channel, K key, String min, String max)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members in a sorted set, by score.- Specified by:
zrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.min
- min score.max
- max score.- Returns:
- Long count of elements in the specified score range.
-
zrangebyscore
public RedisFuture<Long> zrangebyscore(ValueStreamingChannel<V> channel, K key, Range<? extends Number> range)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members in a sorted set, by score.- Specified by:
zrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.range
- the range.- Returns:
- Long count of elements in the specified score range.
-
zrangebyscore
public RedisFuture<Long> zrangebyscore(ValueStreamingChannel<V> channel, K key, double min, double max, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over range of members in a sorted set, by score.- Specified by:
zrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.min
- min score.max
- max score.offset
- the offset.count
- the count.- Returns:
- Long count of elements in the specified score range.
-
zrangebyscore
public RedisFuture<Long> zrangebyscore(ValueStreamingChannel<V> channel, K key, String min, String max, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members in a sorted set, by score.- Specified by:
zrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.min
- min score.max
- max score.offset
- the offset.count
- the count.- Returns:
- Long count of elements in the specified score range.
-
zrangebyscore
public RedisFuture<Long> zrangebyscore(ValueStreamingChannel<V> channel, K key, Range<? extends Number> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members in a sorted set, by score.- Specified by:
zrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.range
- the range.limit
- the limit.- Returns:
- Long count of elements in the specified score range.
-
zrangebyscoreWithScores
public RedisFuture<List<ScoredValue<V>>> zrangebyscoreWithScores(K key, double min, double max)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with score in a sorted set, by score.- Specified by:
zrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.- Returns:
- List<ScoredValue<V>> array-reply list of elements in the specified score range.
-
zrangebyscoreWithScores
public RedisFuture<List<ScoredValue<V>>> zrangebyscoreWithScores(K key, String min, String max)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with score in a sorted set, by score.- Specified by:
zrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.- Returns:
- List<ScoredValue<V>> array-reply list of elements in the specified score range.
-
zrangebyscoreWithScores
public RedisFuture<List<ScoredValue<V>>> zrangebyscoreWithScores(K key, Range<? extends Number> range)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with score in a sorted set, by score.- Specified by:
zrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.- Returns:
- List<ScoredValue<V>> array-reply list of elements in the specified score range.
-
zrangebyscoreWithScores
public RedisFuture<List<ScoredValue<V>>> zrangebyscoreWithScores(K key, double min, double max, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with score in a sorted set, by score.- Specified by:
zrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.offset
- the offset.count
- the count.- Returns:
- List<ScoredValue<V>> array-reply list of elements in the specified score range.
-
zrangebyscoreWithScores
public RedisFuture<List<ScoredValue<V>>> zrangebyscoreWithScores(K key, String min, String max, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with score in a sorted set, by score.- Specified by:
zrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.offset
- the offset.count
- the count.- Returns:
- List<ScoredValue<V>> array-reply list of elements in the specified score range.
-
zrangebyscoreWithScores
public RedisFuture<List<ScoredValue<V>>> zrangebyscoreWithScores(K key, Range<? extends Number> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with score in a sorted set, by score.- Specified by:
zrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.limit
- the limit.- Returns:
- List<ScoredValue<V>> array-reply list of elements in the specified score range.
-
zrangebyscoreWithScores
public RedisFuture<Long> zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, double min, double max)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by score.- Specified by:
zrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.min
- min score.max
- max score.- Returns:
- Long count of elements in the specified score range.
-
zrangebyscoreWithScores
public RedisFuture<Long> zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, String min, String max)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by score.- Specified by:
zrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.min
- min score.max
- max score.- Returns:
- Long count of elements in the specified score range.
-
zrangebyscoreWithScores
public RedisFuture<Long> zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, Range<? extends Number> range)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by score.- Specified by:
zrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.range
- the range.- Returns:
- Long count of elements in the specified score range.
-
zrangebyscoreWithScores
public RedisFuture<Long> zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, double min, double max, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by score.- Specified by:
zrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.min
- min score.max
- max score.offset
- the offset.count
- the count.- Returns:
- Long count of elements in the specified score range.
-
zrangebyscoreWithScores
public RedisFuture<Long> zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, String min, String max, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by score.- Specified by:
zrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.min
- min score.max
- max score.offset
- the offset.count
- the count.- Returns:
- Long count of elements in the specified score range.
-
zrangebyscoreWithScores
public RedisFuture<Long> zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, Range<? extends Number> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by score.- Specified by:
zrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.range
- the range.limit
- the limit.- Returns:
- Long count of elements in the specified score range.
-
zrangestore
public RedisFuture<Long> zrangestore(K dstKey, K srcKey, Range<Long> range)
Description copied from interface:RedisSortedSetAsyncCommands
Get the specified range of elements in the sorted set stored atsrcKey
and stores the result in thedstKey
destination key.- Specified by:
zrangestore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
dstKey
- the dst key.srcKey
- the src key.range
- the rank.- Returns:
- the number of elements in the resulting sorted set.
-
zrangestorebylex
public RedisFuture<Long> zrangestorebylex(K dstKey, K srcKey, Range<? extends V> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Get the specified range of elements in the sorted set stored atsrcKey
and stores the result in thedstKey
destination key.- Specified by:
zrangestorebylex
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
dstKey
- the dst key.srcKey
- the src key.range
- the lexicographical range.limit
- the limit to apply.- Returns:
- the number of elements in the resulting sorted set.
-
zrangestorebyscore
public RedisFuture<Long> zrangestorebyscore(K dstKey, K srcKey, Range<? extends Number> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Get the specified range of elements in the sorted set stored atsrcKey
and stores the result in thedstKey
destination key.- Specified by:
zrangestorebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
dstKey
- the dst key.srcKey
- the src key.range
- the score range.limit
- the limit to apply.- Returns:
- the number of elements in the resulting sorted set.
-
zrank
public RedisFuture<Long> zrank(K key, V member)
Description copied from interface:RedisSortedSetAsyncCommands
Determine the index of a member in a sorted set.- Specified by:
zrank
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.member
- the member type: value.- Returns:
- Long integer-reply the rank of
member
. Ifmember
does not exist in the sorted set orkey
does not exist,.
-
zrankWithScore
public RedisFuture<ScoredValue<Long>> zrankWithScore(K key, V member)
Description copied from interface:RedisSortedSetAsyncCommands
Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.- Specified by:
zrankWithScore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.member
- the member type: value.- Returns:
- the rank and score
-
zrem
public RedisFuture<Long> zrem(K key, V... members)
Description copied from interface:RedisSortedSetAsyncCommands
Remove one or more members from a sorted set.- Specified by:
zrem
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.members
- the member type: value.- Returns:
- Long integer-reply specifically: The number of members removed from the sorted set, not including non existing members.
-
zremrangebylex
public RedisFuture<Long> zremrangebylex(K key, String min, String max)
Description copied from interface:RedisSortedSetAsyncCommands
Remove all members in a sorted set between the given lexicographical range.- Specified by:
zremrangebylex
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.- Returns:
- Long integer-reply the number of elements removed.
-
zremrangebylex
public RedisFuture<Long> zremrangebylex(K key, Range<? extends V> range)
Description copied from interface:RedisSortedSetAsyncCommands
Remove all members in a sorted set between the given lexicographical range.- Specified by:
zremrangebylex
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.- Returns:
- Long integer-reply the number of elements removed.
-
zremrangebyrank
public RedisFuture<Long> zremrangebyrank(K key, long start, long stop)
Description copied from interface:RedisSortedSetAsyncCommands
Remove all members in a sorted set within the given indexes.- Specified by:
zremrangebyrank
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.start
- the start type: long.stop
- the stop type: long.- Returns:
- Long integer-reply the number of elements removed.
-
zremrangebyscore
public RedisFuture<Long> zremrangebyscore(K key, double min, double max)
Description copied from interface:RedisSortedSetAsyncCommands
Remove all members in a sorted set within the given scores.- Specified by:
zremrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.- Returns:
- Long integer-reply the number of elements removed.
-
zremrangebyscore
public RedisFuture<Long> zremrangebyscore(K key, String min, String max)
Description copied from interface:RedisSortedSetAsyncCommands
Remove all members in a sorted set within the given scores.- Specified by:
zremrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.min
- min score.max
- max score.- Returns:
- Long integer-reply the number of elements removed.
-
zremrangebyscore
public RedisFuture<Long> zremrangebyscore(K key, Range<? extends Number> range)
Description copied from interface:RedisSortedSetAsyncCommands
Remove all members in a sorted set within the given scores.- Specified by:
zremrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.- Returns:
- Long integer-reply the number of elements removed.
-
zrevrange
public RedisFuture<List<V>> zrevrange(K key, long start, long stop)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by index, with scores ordered from high to low.- Specified by:
zrevrange
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.start
- the start.stop
- the stop.- Returns:
- List<V> array-reply list of elements in the specified range.
-
zrevrange
public RedisFuture<Long> zrevrange(ValueStreamingChannel<V> channel, K key, long start, long stop)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members in a sorted set, by index, with scores ordered from high to low.- Specified by:
zrevrange
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.start
- the start.stop
- the stop.- Returns:
- Long count of elements in the specified range.
-
zrevrangeWithScores
public RedisFuture<List<ScoredValue<V>>> zrevrangeWithScores(K key, long start, long stop)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with scores in a sorted set, by index, with scores ordered from high to low.- Specified by:
zrevrangeWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.start
- the start.stop
- the stop.- Returns:
- List<V> array-reply list of elements in the specified range.
-
zrevrangeWithScores
public RedisFuture<Long> zrevrangeWithScores(ScoredValueStreamingChannel<V> channel, K key, long start, long stop)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by index, with scores ordered from high to low.- Specified by:
zrevrangeWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.start
- the start.stop
- the stop.- Returns:
- Long count of elements in the specified range.
-
zrevrangestore
public RedisFuture<Long> zrevrangestore(K dstKey, K srcKey, Range<Long> range)
Description copied from interface:RedisSortedSetAsyncCommands
Get the specified range of elements ordered from high to low in the sorted set stored atsrcKey
and stores the result in thedstKey
destination key.- Specified by:
zrevrangestore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
dstKey
- the dst key.srcKey
- the src key.range
- the rank.- Returns:
- the number of elements in the resulting sorted set.
-
zrevrangestorebylex
public RedisFuture<Long> zrevrangestorebylex(K dstKey, K srcKey, Range<? extends V> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Get the lexicographical range ordered from high to low of elements in the sorted set stored atsrcKey
and stores the result in thedstKey
destination key.- Specified by:
zrevrangestorebylex
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
dstKey
- the src key.srcKey
- the dst key.range
- the lexicographical range.limit
- the limit to apply.- Returns:
- the number of elements in the resulting sorted set.
-
zrevrangestorebyscore
public RedisFuture<Long> zrevrangestorebyscore(K dstKey, K srcKey, Range<? extends Number> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Get the specified range of elements in the sorted set stored at {@code srcKey with scores ordered from high to low and stores the result in the {@code dstKey} destination key.- Specified by:
zrevrangestorebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
dstKey
- the src key.srcKey
- the dst key.range
- the score range.limit
- the limit to apply.- Returns:
- the number of elements in the resulting sorted set.
-
zrevrangebylex
public RedisFuture<List<V>> zrevrangebylex(K key, Range<? extends V> range)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by lexicographical range ordered from high to low.- Specified by:
zrevrangebylex
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrevrangebylex
public RedisFuture<List<V>> zrevrangebylex(K key, Range<? extends V> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by lexicographical range ordered from high to low.- Specified by:
zrevrangebylex
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.limit
- the limit.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrevrangebyscore
public RedisFuture<List<V>> zrevrangebyscore(K key, double max, double min)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.max
- max score.min
- min score.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrevrangebyscore
public RedisFuture<List<V>> zrevrangebyscore(K key, String max, String min)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.max
- max score.min
- min score.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrevrangebyscore
public RedisFuture<List<V>> zrevrangebyscore(K key, Range<? extends Number> range)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrevrangebyscore
public RedisFuture<List<V>> zrevrangebyscore(K key, double max, double min, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.max
- max score.min
- min score.offset
- the withscores.count
- the number of items.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrevrangebyscore
public RedisFuture<List<V>> zrevrangebyscore(K key, String max, String min, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.max
- max score.min
- min score.offset
- the offset.count
- the count.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrevrangebyscore
public RedisFuture<List<V>> zrevrangebyscore(K key, Range<? extends Number> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.limit
- the limit.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrevrangebyscore
public RedisFuture<Long> zrevrangebyscore(ValueStreamingChannel<V> channel, K key, double max, double min)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.max
- max score.min
- min score.- Returns:
- Long count of elements in the specified range.
-
zrevrangebyscore
public RedisFuture<Long> zrevrangebyscore(ValueStreamingChannel<V> channel, K key, String max, String min)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.max
- max score.min
- min score.- Returns:
- Long count of elements in the specified range.
-
zrevrangebyscore
public RedisFuture<Long> zrevrangebyscore(ValueStreamingChannel<V> channel, K key, Range<? extends Number> range)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.range
- the range.- Returns:
- Long count of elements in the specified range.
-
zrevrangebyscore
public RedisFuture<Long> zrevrangebyscore(ValueStreamingChannel<V> channel, K key, double max, double min, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.max
- max score.min
- min score.offset
- the offset.count
- the count.- Returns:
- Long count of elements in the specified range.
-
zrevrangebyscore
public RedisFuture<Long> zrevrangebyscore(ValueStreamingChannel<V> channel, K key, String max, String min, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.max
- max score.min
- min score.offset
- the offset.count
- the count.- Returns:
- Long count of elements in the specified range.
-
zrevrangebyscore
public RedisFuture<Long> zrevrangebyscore(ValueStreamingChannel<V> channel, K key, Range<? extends Number> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every value.key
- the key.range
- the range.limit
- the limit.- Returns:
- Long count of elements in the specified range.
-
zrevrangebyscoreWithScores
public RedisFuture<List<ScoredValue<V>>> zrevrangebyscoreWithScores(K key, double max, double min)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with scores in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.max
- max score.min
- min score.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrevrangebyscoreWithScores
public RedisFuture<List<ScoredValue<V>>> zrevrangebyscoreWithScores(K key, String max, String min)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with scores in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.max
- max score.min
- min score.- Returns:
- List<ScoredValue<V>> array-reply list of elements in the specified score range.
-
zrevrangebyscoreWithScores
public RedisFuture<List<ScoredValue<V>>> zrevrangebyscoreWithScores(K key, Range<? extends Number> range)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with scores in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.- Returns:
- List<ScoredValue<V>> array-reply list of elements in the specified score range.
-
zrevrangebyscoreWithScores
public RedisFuture<List<ScoredValue<V>>> zrevrangebyscoreWithScores(K key, double max, double min, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with scores in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.max
- max score.min
- min score.offset
- the offset.count
- the count.- Returns:
- List<ScoredValue<V>> array-reply list of elements in the specified score range.
-
zrevrangebyscoreWithScores
public RedisFuture<List<ScoredValue<V>>> zrevrangebyscoreWithScores(K key, String max, String min, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with scores in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.max
- max score.min
- min score.offset
- the offset.count
- the count.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrevrangebyscoreWithScores
public RedisFuture<List<ScoredValue<V>>> zrevrangebyscoreWithScores(K key, Range<? extends Number> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Return a range of members with scores in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.range
- the range.limit
- limit.- Returns:
- List<V> array-reply list of elements in the specified score range.
-
zrevrangebyscoreWithScores
public RedisFuture<Long> zrevrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, double max, double min)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.max
- max score.min
- min score.- Returns:
- Long count of elements in the specified range.
-
zrevrangebyscoreWithScores
public RedisFuture<Long> zrevrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, String max, String min)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.max
- max score.min
- min score.- Returns:
- Long count of elements in the specified range.
-
zrevrangebyscoreWithScores
public RedisFuture<Long> zrevrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, Range<? extends Number> range)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.range
- the range.- Returns:
- Long count of elements in the specified range.
-
zrevrangebyscoreWithScores
public RedisFuture<Long> zrevrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, double max, double min, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.max
- max score.min
- min score.offset
- the offset.count
- the count.- Returns:
- Long count of elements in the specified range.
-
zrevrangebyscoreWithScores
public RedisFuture<Long> zrevrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, String max, String min, long offset, long count)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.max
- max score.min
- min score.offset
- the offset.count
- the count.- Returns:
- Long count of elements in the specified range.
-
zrevrangebyscoreWithScores
public RedisFuture<Long> zrevrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel, K key, Range<? extends Number> range, Limit limit)
Description copied from interface:RedisSortedSetAsyncCommands
Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.- Specified by:
zrevrangebyscoreWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.range
- the range.limit
- the limit.- Returns:
- Long count of elements in the specified range.
-
zrevrank
public RedisFuture<Long> zrevrank(K key, V member)
Description copied from interface:RedisSortedSetAsyncCommands
Determine the index of a member in a sorted set, with scores ordered from high to low.- Specified by:
zrevrank
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.member
- the member type: value.- Returns:
- Long integer-reply the rank of
member
. Ifmember
does not exist in the sorted set orkey
does not exist returnnull
.
-
zrevrankWithScore
public RedisFuture<ScoredValue<Long>> zrevrankWithScore(K key, V member)
Description copied from interface:RedisSortedSetAsyncCommands
Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low.- Specified by:
zrevrankWithScore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.member
- the member type: value.- Returns:
- the rank and score
-
zscan
public RedisFuture<ScoredValueScanCursor<V>> zscan(K key)
Description copied from interface:RedisSortedSetAsyncCommands
Incrementally iterate sorted sets elements and associated scores.- Specified by:
zscan
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.- Returns:
- ScoredValueScanCursor<V> scan cursor.
-
zscan
public RedisFuture<ScoredValueScanCursor<V>> zscan(K key, ScanArgs scanArgs)
Description copied from interface:RedisSortedSetAsyncCommands
Incrementally iterate sorted sets elements and associated scores.- Specified by:
zscan
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.scanArgs
- scan arguments.- Returns:
- ScoredValueScanCursor<V> scan cursor.
-
zscan
public RedisFuture<ScoredValueScanCursor<V>> zscan(K key, ScanCursor scanCursor, ScanArgs scanArgs)
Description copied from interface:RedisSortedSetAsyncCommands
Incrementally iterate sorted sets elements and associated scores.- Specified by:
zscan
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.scanCursor
- cursor to resume from a previous scan, must not benull
.scanArgs
- scan arguments.- Returns:
- ScoredValueScanCursor<V> scan cursor.
-
zscan
public RedisFuture<ScoredValueScanCursor<V>> zscan(K key, ScanCursor scanCursor)
Description copied from interface:RedisSortedSetAsyncCommands
Incrementally iterate sorted sets elements and associated scores.- Specified by:
zscan
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.scanCursor
- cursor to resume from a previous scan, must not benull
.- Returns:
- ScoredValueScanCursor<V> scan cursor.
-
zscan
public RedisFuture<StreamScanCursor> zscan(ScoredValueStreamingChannel<V> channel, K key)
Description copied from interface:RedisSortedSetAsyncCommands
Incrementally iterate sorted sets elements and associated scores.- Specified by:
zscan
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.- Returns:
- StreamScanCursor scan cursor.
-
zscan
public RedisFuture<StreamScanCursor> zscan(ScoredValueStreamingChannel<V> channel, K key, ScanArgs scanArgs)
Description copied from interface:RedisSortedSetAsyncCommands
Incrementally iterate sorted sets elements and associated scores.- Specified by:
zscan
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.scanArgs
- scan arguments.- Returns:
- StreamScanCursor scan cursor.
-
zscan
public RedisFuture<StreamScanCursor> zscan(ScoredValueStreamingChannel<V> channel, K key, ScanCursor scanCursor, ScanArgs scanArgs)
Description copied from interface:RedisSortedSetAsyncCommands
Incrementally iterate sorted sets elements and associated scores.- Specified by:
zscan
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.scanCursor
- cursor to resume from a previous scan, must not benull
.scanArgs
- scan arguments.- Returns:
- StreamScanCursor scan cursor.
-
zscan
public RedisFuture<StreamScanCursor> zscan(ScoredValueStreamingChannel<V> channel, K key, ScanCursor scanCursor)
Description copied from interface:RedisSortedSetAsyncCommands
Incrementally iterate sorted sets elements and associated scores.- Specified by:
zscan
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every scored value.key
- the key.scanCursor
- cursor to resume from a previous scan, must not benull
.- Returns:
- StreamScanCursor scan cursor.
-
zscore
public RedisFuture<Double> zscore(K key, V member)
Description copied from interface:RedisSortedSetAsyncCommands
Get the score associated with the given member in a sorted set.- Specified by:
zscore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
key
- the key.member
- the member type: value.- Returns:
- Double bulk-string-reply the score of
member
(a double precision floating point number), represented as string.
-
zunion
public RedisFuture<List<V>> zunion(K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Add multiple sorted sets and returns the resulting sorted set.- Specified by:
zunion
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- List<V> array-reply list of elements.
-
zunion
public RedisFuture<List<V>> zunion(ZAggregateArgs aggregateArgs, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Add multiple sorted sets and returns the resulting sorted set.- Specified by:
zunion
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
aggregateArgs
- arguments to define aggregation and weights.keys
- the keys.- Returns:
- List<V> array-reply list of elements.
-
zunionWithScores
public RedisFuture<List<ScoredValue<V>>> zunionWithScores(K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Add multiple sorted sets and returns the resulting sorted set.- Specified by:
zunionWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- List<V> array-reply list of scored values.
-
zunionWithScores
public RedisFuture<List<ScoredValue<V>>> zunionWithScores(ZAggregateArgs aggregateArgs, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Add multiple sorted sets and returns the resulting sorted set.- Specified by:
zunionWithScores
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
aggregateArgs
- arguments to define aggregation and weights.keys
- the keys.- Returns:
- List<V> array-reply list of scored values.
-
zunionstore
public RedisFuture<Long> zunionstore(K destination, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Add multiple sorted sets and store the resulting sorted set in a new key.- Specified by:
zunionstore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
destination
- destination key.keys
- source keys.- Returns:
- Long integer-reply the number of elements in the resulting sorted set at
destination
.
-
zunionstore
public RedisFuture<Long> zunionstore(K destination, ZStoreArgs zStoreArgs, K... keys)
Description copied from interface:RedisSortedSetAsyncCommands
Add multiple sorted sets and store the resulting sorted set in a new key.- Specified by:
zunionstore
in interfaceRedisSortedSetAsyncCommands<K,V>
- Parameters:
destination
- the destination.zStoreArgs
- arguments to define aggregation and weights.keys
- the keys.- Returns:
- Long integer-reply the number of elements in the resulting sorted set at
destination
.
-
-