Package io.lettuce.core.cluster
Class RedisAdvancedClusterAsyncCommandsImpl<K,V>
- java.lang.Object
-
- io.lettuce.core.AbstractRedisAsyncCommands<K,V>
-
- io.lettuce.core.cluster.RedisAdvancedClusterAsyncCommandsImpl<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>
,RedisAdvancedClusterAsyncCommands<K,V>
,RedisClusterAsyncCommands<K,V>
public class RedisAdvancedClusterAsyncCommandsImpl<K,V> extends AbstractRedisAsyncCommands<K,V> implements RedisAdvancedClusterAsyncCommands<K,V>
An advanced asynchronous and thread-safe API for a Redis Cluster connection.- Since:
- 3.3
- Author:
- Mark Paluch, Jon Chambers
-
-
Constructor Summary
Constructors Constructor Description RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnection<K,V> connection, RedisCodec<K,V> codec)
Initialize a new connection.RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection, RedisCodec<K,V> codec)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RedisFuture<String>
clientSetname(K name)
Set the current connection name.RedisFuture<Long>
clusterCountKeysInSlot(int slot)
Returns the number of keys in the specified Redis Cluster hashslot
.RedisFuture<List<K>>
clusterGetKeysInSlot(int slot, int count)
Retrieve the list of keys within theslot
.RedisFuture<Long>
dbsize()
Return the number of keys in the selected database.RedisFuture<Long>
del(Iterable<K> keys)
RedisFuture<Long>
del(K... keys)
Delete one or more keys.protected <T> Map<String,CompletableFuture<T>>
executeOnNodes(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function, Function<RedisClusterNode,Boolean> filter)
Run a command on all available nodes that matchfilter
.protected <T> Map<String,CompletableFuture<T>>
executeOnUpstream(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function)
Run a command on all available masters,RedisFuture<Long>
exists(Iterable<K> keys)
RedisFuture<Long>
exists(K... keys)
Determine how many keys exist.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.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<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<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
.RedisClusterAsyncCommands<K,V>
getConnection(String nodeId)
Retrieve a connection to the specified cluster node using the nodeId.RedisClusterAsyncCommands<K,V>
getConnection(String host, int port)
Retrieve a connection to the specified cluster node using host and port.StatefulRedisClusterConnection<K,V>
getStatefulConnection()
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<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>
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.AsyncNodeSelection<K,V>
nodes(Predicate<RedisClusterNode> predicate)
Select nodes by a predicate and keeps a static selection.AsyncNodeSelection<K,V>
nodes(Predicate<RedisClusterNode> predicate, boolean dynamic)
Select nodes by a predicateprotected AsyncNodeSelection<K,V>
nodes(Predicate<RedisClusterNode> predicate, ConnectionIntent connectionIntent, boolean dynamic)
RedisFuture<K>
randomkey()
Return a random key from the keyspace.AsyncNodeSelection<K,V>
readonly(Predicate<RedisClusterNode> predicate)
Select replica nodes by a predicate and keeps a static selection.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<String>
scriptFlush()
Remove all the scripts from the script cache.RedisFuture<String>
scriptKill()
Kill the script currently in execution.RedisFuture<String>
scriptLoad(byte[] script)
Load the specified Lua script into the script cache.void
shutdown(boolean save)
Synchronously save the dataset to disk and then shut down the server.RedisFuture<Long>
touch(Iterable<K> keys)
RedisFuture<Long>
touch(K... keys)
Touch one or more keys.RedisFuture<Long>
unlink(Iterable<K> keys)
RedisFuture<Long>
unlink(K... keys)
Unlink one or more keys (non blocking DEL).-
Methods inherited from class io.lettuce.core.AbstractRedisAsyncCommands
aclCat, aclCat, aclDeluser, aclDryRun, aclDryRun, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoami, append, asking, auth, auth, auth, auth, bgrewriteaof, bgsave, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, blmove, blmove, blmpop, blmpop, blpop, blpop, brpop, brpop, brpoplpush, brpoplpush, bzmpop, bzmpop, bzmpop, bzmpop, bzpopmax, bzpopmax, bzpopmin, bzpopmin, clientCaching, clientGetname, clientGetredir, clientId, clientInfo, clientKill, clientKill, clientList, clientList, clientNoEvict, clientPause, clientSetinfo, clientTracking, clientUnblock, clusterAddSlots, clusterAddSlotsRange, clusterBumpepoch, clusterCountFailureReports, clusterDelSlots, clusterDelSlotsRange, clusterFailover, clusterFailover, clusterFlushslots, clusterForget, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicas, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterShards, clusterSlaves, clusterSlots, command, commandCount, commandInfo, commandInfo, configGet, configGet, configResetstat, configRewrite, configSet, configSet, copy, copy, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, decr, decrby, digest, digest, discard, dispatch, dispatch, dispatch, dispatch, dispatch, dump, echo, eval, eval, eval, eval, evalReadOnly, evalsha, evalsha, evalshaReadOnly, exec, expire, expire, expire, expire, expireat, expireat, expireat, expireat, expireat, expireat, expiretime, fcall, fcall, fcallReadOnly, fcallReadOnly, flushCommands, flushdbAsync, functionDump, functionFlush, functionKill, functionList, functionList, functionLoad, functionLoad, functionRestore, functionRestore, geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius, georadius_ro, georadius_ro, georadiusbymember, georadiusbymember_ro, georadiusbymember_ro, geosearch, geosearch, geosearchstore, get, getbit, getConnection, getdel, getex, getrange, getset, hdel, hexists, hget, hgetall, hgetall, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hrandfield, hrandfield, hrandfieldWithvalues, hrandfieldWithvalues, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hset, hset, hsetnx, hstrlen, hvals, hvals, incr, incrby, incrbyfloat, info, info, isOpen, lastsave, lindex, linsert, llen, lmove, lmpop, lpop, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, memoryUsage, migrate, migrate, move, multi, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpiretime, pfadd, pfcount, pfmerge, ping, psetex, pttl, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, readOnly, readWrite, rename, renamenx, replicaof, replicaofNoOne, reset, restore, restore, role, rpop, rpop, rpoplpush, rpush, rpushx, sadd, save, scard, scriptExists, scriptFlush, scriptLoad, sdiff, sdiff, sdiffstore, select, set, set, setAutoFlushCommands, setbit, setex, setGet, setGet, setnx, setrange, setTimeout, shutdown, sinter, sinter, sintercard, sintercard, sinterstore, sismember, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, smembers, smembers, smismember, smove, sort, sort, sort, sort, sortReadOnly, sortReadOnly, sortReadOnly, sortReadOnly, sortStore, spop, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, stralgoLcs, strlen, sunion, sunion, sunionstore, swapdb, time, ttl, type, unwatch, waitForReplication, watch, xack, xadd, xadd, xadd, xadd, xautoclaim, xclaim, xclaim, xdel, xgroupCreate, xgroupCreate, xgroupCreateconsumer, xgroupDelconsumer, xgroupDestroy, xgroupSetid, xinfoConsumers, xinfoGroups, xinfoStream, xlen, xpending, xpending, xpending, xpending, xrange, xrange, xread, xread, xreadgroup, xreadgroup, xrevrange, xrevrange, xtrim, xtrim, xtrim, zadd, zadd, zadd, zadd, zadd, zadd, zaddincr, zaddincr, zcard, zcount, zcount, zcount, zdiff, zdiffstore, zdiffWithScores, zincrby, zinter, zinter, zintercard, zintercard, zinterstore, zinterstore, zinterWithScores, zinterWithScores, zlexcount, zlexcount, zmpop, zmpop, zmscore, zpopmax, zpopmax, zpopmin, zpopmin, zrandmember, zrandmember, zrandmemberWithScores, zrandmemberWithScores, zrange, zrange, zrangebylex, zrangebylex, zrangebylex, zrangebylex, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangestore, zrangestorebylex, zrangestorebyscore, zrangeWithScores, zrangeWithScores, zrank, zrankWithScore, zrem, zremrangebylex, zremrangebylex, zremrangebyrank, zremrangebyscore, zremrangebyscore, zremrangebyscore, zrevrange, zrevrange, zrevrangebylex, zrevrangebylex, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangestore, zrevrangestorebylex, zrevrangestorebyscore, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zrevrankWithScore, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunion, zunion, zunionstore, zunionstore, zunionWithScores, zunionWithScores
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.lettuce.core.api.async.BaseRedisAsyncCommands
dispatch, dispatch, echo, flushCommands, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, setAutoFlushCommands, waitForReplication
-
Methods inherited from interface io.lettuce.core.api.async.RedisAclAsyncCommands
aclCat, aclCat, aclDeluser, aclDryRun, aclDryRun, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoami
-
Methods inherited from interface io.lettuce.core.cluster.api.async.RedisAdvancedClusterAsyncCommands
all, masters, replicas, replicas, scriptLoad, slaves, slaves, upstream
-
Methods inherited from interface io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands
asking, auth, auth, clusterAddSlots, clusterAddSlotsRange, clusterBumpepoch, clusterCountFailureReports, clusterDelSlots, clusterDelSlotsRange, clusterFailover, clusterFailover, clusterFlushslots, clusterForget, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicas, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterShards, clusterSlaves, clusterSlots, readOnly, readWrite, setTimeout
-
Methods inherited from interface io.lettuce.core.api.async.RedisFunctionAsyncCommands
fcall, fcall, fcallReadOnly, fcallReadOnly, functionDump, functionFlush, functionKill, functionList, functionList, functionLoad, functionLoad, functionRestore, functionRestore
-
Methods inherited from interface io.lettuce.core.api.async.RedisGeoAsyncCommands
geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius, georadiusbymember, geosearch, geosearch, geosearchstore
-
Methods inherited from interface io.lettuce.core.api.async.RedisHashAsyncCommands
hdel, hexists, hget, hgetall, hgetall, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hrandfield, hrandfield, hrandfieldWithvalues, hrandfieldWithvalues, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hset, hset, hsetnx, hstrlen, hvals, hvals
-
Methods inherited from interface io.lettuce.core.api.async.RedisHLLAsyncCommands
pfadd, pfcount, pfmerge
-
Methods inherited from interface io.lettuce.core.api.async.RedisKeyAsyncCommands
copy, copy, dump, expire, expire, expire, expire, expireat, expireat, expireat, expireat, expireat, expireat, expiretime, migrate, migrate, move, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpiretime, pttl, rename, renamenx, restore, restore, sort, sort, sort, sort, sortReadOnly, sortReadOnly, sortReadOnly, sortReadOnly, sortStore, ttl, type
-
Methods inherited from interface io.lettuce.core.api.async.RedisListAsyncCommands
blmove, blmove, blmpop, blmpop, blpop, blpop, brpop, brpop, brpoplpush, brpoplpush, lindex, linsert, llen, lmove, lmpop, lpop, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpop, rpoplpush, rpush, rpushx
-
Methods inherited from interface io.lettuce.core.api.async.RedisScriptingAsyncCommands
digest, digest, eval, eval, eval, eval, evalReadOnly, evalsha, evalsha, evalshaReadOnly, scriptExists, scriptFlush
-
Methods inherited from interface io.lettuce.core.api.async.RedisServerAsyncCommands
bgrewriteaof, bgsave, clientCaching, clientGetname, clientGetredir, clientId, clientInfo, clientKill, clientKill, clientList, clientList, clientNoEvict, clientPause, clientSetinfo, clientTracking, clientUnblock, command, commandCount, commandInfo, commandInfo, configGet, configGet, configResetstat, configRewrite, configSet, configSet, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, flushdbAsync, info, info, lastsave, memoryUsage, replicaof, replicaofNoOne, save, shutdown, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, time
-
Methods inherited from interface io.lettuce.core.api.async.RedisSetAsyncCommands
sadd, scard, sdiff, sdiff, sdiffstore, sinter, sinter, sintercard, sintercard, sinterstore, sismember, smembers, smembers, smismember, smove, spop, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sunion, sunion, sunionstore
-
Methods inherited from interface io.lettuce.core.api.async.RedisSortedSetAsyncCommands
bzmpop, bzmpop, bzmpop, bzmpop, bzpopmax, bzpopmax, bzpopmin, bzpopmin, zadd, zadd, zadd, zadd, zadd, zadd, zaddincr, zaddincr, zcard, zcount, zcount, zcount, zdiff, zdiffstore, zdiffWithScores, zincrby, zinter, zinter, zintercard, zintercard, zinterstore, zinterstore, zinterWithScores, zinterWithScores, zlexcount, zlexcount, zmpop, zmpop, zmscore, zpopmax, zpopmax, zpopmin, zpopmin, zrandmember, zrandmember, zrandmemberWithScores, zrandmemberWithScores, zrange, zrange, zrangebylex, zrangebylex, zrangebylex, zrangebylex, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangestore, zrangestorebylex, zrangestorebyscore, zrangeWithScores, zrangeWithScores, zrank, zrankWithScore, zrem, zremrangebylex, zremrangebylex, zremrangebyrank, zremrangebyscore, zremrangebyscore, zremrangebyscore, zrevrange, zrevrange, zrevrangebylex, zrevrangebylex, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangestore, zrevrangestorebylex, zrevrangestorebyscore, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zrevrankWithScore, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunion, zunion, zunionstore, zunionstore, zunionWithScores, zunionWithScores
-
Methods inherited from interface io.lettuce.core.api.async.RedisStreamAsyncCommands
xack, xadd, xadd, xadd, xadd, xautoclaim, xclaim, xclaim, xdel, xgroupCreate, xgroupCreate, xgroupCreateconsumer, xgroupDelconsumer, xgroupDestroy, xgroupSetid, xinfoConsumers, xinfoGroups, xinfoStream, xlen, xpending, xpending, xpending, xpending, xrange, xrange, xread, xread, xreadgroup, xreadgroup, xrevrange, xrevrange, xtrim, xtrim, xtrim
-
Methods inherited from interface io.lettuce.core.api.async.RedisStringAsyncCommands
append, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, decr, decrby, get, getbit, getdel, getex, getrange, getset, incr, incrby, incrbyfloat, psetex, set, set, setbit, setex, setGet, setGet, setnx, setrange, stralgoLcs, strlen
-
-
-
-
Constructor Detail
-
RedisAdvancedClusterAsyncCommandsImpl
@Deprecated public RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection, RedisCodec<K,V> codec)
Deprecated.Initialize a new connection.- Parameters:
connection
- the stateful connectioncodec
- Codec used to encode/decode keys and values.
-
RedisAdvancedClusterAsyncCommandsImpl
public RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnection<K,V> connection, RedisCodec<K,V> codec)
Initialize a new connection.- Parameters:
connection
- the stateful connectioncodec
- Codec used to encode/decode keys and values.
-
-
Method Detail
-
clientSetname
public RedisFuture<String> clientSetname(K name)
Description copied from interface:RedisServerAsyncCommands
Set the current connection name.- Specified by:
clientSetname
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
clientSetname
in interfaceRedisServerAsyncCommands<K,V>
- Overrides:
clientSetname
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
name
- the client name.- Returns:
- simple-string-reply
OK
if the connection name was successfully set. - See Also:
RedisServerAsyncCommands.clientSetname(Object)
-
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>
- Overrides:
clusterCountKeysInSlot
in classAbstractRedisAsyncCommands<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.
-
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>
- Overrides:
clusterGetKeysInSlot
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
slot
- the slotcount
- maximal number of keys- Returns:
- List<K> array-reply list of keys
-
dbsize
public RedisFuture<Long> dbsize()
Description copied from interface:RedisServerAsyncCommands
Return the number of keys in the selected database.- Specified by:
dbsize
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
dbsize
in interfaceRedisServerAsyncCommands<K,V>
- Overrides:
dbsize
in classAbstractRedisAsyncCommands<K,V>
- Returns:
- Long integer-reply.
- See Also:
RedisServerAsyncCommands.dbsize()
-
del
public RedisFuture<Long> del(K... keys)
Description copied from interface:RedisKeyAsyncCommands
Delete one or more keys.- Specified by:
del
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
del
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
del
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply The number of keys that were removed.
- See Also:
RedisKeyAsyncCommands.del(Object[])
-
del
public RedisFuture<Long> del(Iterable<K> keys)
- Overrides:
del
in classAbstractRedisAsyncCommands<K,V>
-
exists
public RedisFuture<Long> exists(K... keys)
Description copied from interface:RedisKeyAsyncCommands
Determine how many keys exist.- Specified by:
exists
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
exists
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
exists
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply specifically: Number of existing keys.
-
exists
public RedisFuture<Long> exists(Iterable<K> keys)
- Overrides:
exists
in classAbstractRedisAsyncCommands<K,V>
-
flushall
public RedisFuture<String> flushall()
Description copied from interface:RedisServerAsyncCommands
Remove all keys from all databases.- Specified by:
flushall
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
flushall
in interfaceRedisServerAsyncCommands<K,V>
- Overrides:
flushall
in classAbstractRedisAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
- See Also:
RedisServerAsyncCommands.flushall()
-
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>
- Overrides:
flushall
in classAbstractRedisAsyncCommands<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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
flushallAsync
in interfaceRedisServerAsyncCommands<K,V>
- Overrides:
flushallAsync
in classAbstractRedisAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
- See Also:
RedisServerAsyncCommands.flushallAsync()
-
flushdb
public RedisFuture<String> flushdb()
Description copied from interface:RedisServerAsyncCommands
Remove all keys from the current database.- Specified by:
flushdb
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
flushdb
in interfaceRedisServerAsyncCommands<K,V>
- Overrides:
flushdb
in classAbstractRedisAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
- See Also:
RedisServerAsyncCommands.flushdb()
-
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>
- Overrides:
flushdb
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
flushMode
- the flush mode (sync/async).- Returns:
- String simple-string-reply.
-
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>
- Overrides:
georadius
in classAbstractRedisAsyncCommands<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>
- Overrides:
georadius
in classAbstractRedisAsyncCommands<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
.
-
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>
- Overrides:
georadiusbymember
in classAbstractRedisAsyncCommands<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>
- Overrides:
georadiusbymember
in classAbstractRedisAsyncCommands<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
.
-
keys
public RedisFuture<List<K>> keys(K pattern)
Description copied from interface:RedisKeyAsyncCommands
Find all keys matching the given pattern.- Specified by:
keys
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
keys
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
keys
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
pattern
- the pattern type: patternkey (pattern).- Returns:
- List<K> array-reply list of keys matching
pattern
. - See Also:
RedisKeyAsyncCommands.keys(Object)
-
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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
keys
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
keys
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
channel
- the channel.pattern
- the pattern.- Returns:
- Long array-reply list of keys matching
pattern
. - See Also:
RedisKeyAsyncCommands.keys(KeyStreamingChannel, Object)
-
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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
mget
in interfaceRedisStringAsyncCommands<K,V>
- Overrides:
mget
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
keys
- the key.- Returns:
- List<V> array-reply list of values at the specified keys.
- See Also:
RedisStringAsyncCommands.mget(Object[])
-
mget
public RedisFuture<List<KeyValue<K,V>>> mget(Iterable<K> keys)
- Overrides:
mget
in classAbstractRedisAsyncCommands<K,V>
-
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>
- Overrides:
mget
in classAbstractRedisAsyncCommands<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)
- Overrides:
mget
in classAbstractRedisAsyncCommands<K,V>
-
mset
public RedisFuture<String> mset(Map<K,V> map)
Description copied from interface:RedisStringAsyncCommands
Set multiple keys to multiple values.- Specified by:
mset
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
mset
in interfaceRedisStringAsyncCommands<K,V>
- Overrides:
mset
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
map
- the map.- Returns:
- String simple-string-reply always
OK
sinceMSET
can't fail. - See Also:
RedisStringAsyncCommands.mset(Map)
-
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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
msetnx
in interfaceRedisClusterAsyncCommands<K,V>
- Specified by:
msetnx
in interfaceRedisStringAsyncCommands<K,V>
- Overrides:
msetnx
in classAbstractRedisAsyncCommands<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). - See Also:
RedisStringAsyncCommands.msetnx(Map)
-
randomkey
public RedisFuture<K> randomkey()
Description copied from interface:RedisKeyAsyncCommands
Return a random key from the keyspace.- Specified by:
randomkey
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
randomkey
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
randomkey
in classAbstractRedisAsyncCommands<K,V>
- Returns:
- K bulk-string-reply the random key, or
null
when the database is empty. - See Also:
RedisKeyAsyncCommands.randomkey()
-
scriptFlush
public RedisFuture<String> scriptFlush()
Description copied from interface:RedisScriptingAsyncCommands
Remove all the scripts from the script cache.- Specified by:
scriptFlush
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
scriptFlush
in interfaceRedisScriptingAsyncCommands<K,V>
- Overrides:
scriptFlush
in classAbstractRedisAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
- See Also:
RedisScriptingAsyncCommands.scriptFlush()
-
scriptKill
public RedisFuture<String> scriptKill()
Description copied from interface:RedisScriptingAsyncCommands
Kill the script currently in execution.- Specified by:
scriptKill
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
scriptKill
in interfaceRedisScriptingAsyncCommands<K,V>
- Overrides:
scriptKill
in classAbstractRedisAsyncCommands<K,V>
- Returns:
- String simple-string-reply.
- See Also:
RedisScriptingAsyncCommands.scriptKill()
-
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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
scriptLoad
in interfaceRedisScriptingAsyncCommands<K,V>
- Overrides:
scriptLoad
in classAbstractRedisAsyncCommands<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.
-
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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
shutdown
in interfaceRedisServerAsyncCommands<K,V>
- Overrides:
shutdown
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
save
-true
force save operation.- See Also:
RedisServerAsyncCommands.shutdown(boolean)
-
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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
touch
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
touch
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply the number of found keys.
-
touch
public RedisFuture<Long> touch(Iterable<K> keys)
- Overrides:
touch
in classAbstractRedisAsyncCommands<K,V>
-
unlink
public RedisFuture<Long> unlink(K... keys)
Description copied from interface:RedisKeyAsyncCommands
Unlink one or more keys (non blocking DEL).- Specified by:
unlink
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
unlink
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
unlink
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply The number of keys that were removed.
- See Also:
RedisKeyAsyncCommands.unlink(Object[])
-
unlink
public RedisFuture<Long> unlink(Iterable<K> keys)
- Overrides:
unlink
in classAbstractRedisAsyncCommands<K,V>
-
getConnection
public RedisClusterAsyncCommands<K,V> getConnection(String nodeId)
Description copied from interface:RedisAdvancedClusterAsyncCommands
Retrieve a connection to the specified cluster node using the nodeId. Host and port are looked up in the node list. In contrast to theRedisAdvancedClusterAsyncCommands
, node-connections do not route commands to other cluster nodes- Specified by:
getConnection
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Parameters:
nodeId
- the node Id- Returns:
- a connection to the requested cluster node
-
getConnection
public RedisClusterAsyncCommands<K,V> getConnection(String host, int port)
Description copied from interface:RedisAdvancedClusterAsyncCommands
Retrieve a connection to the specified cluster node using host and port. In contrast to theRedisAdvancedClusterAsyncCommands
, node-connections do not route commands to other cluster nodes. Host and port connections are verified by default for cluster membership, seeClusterClientOptions.isValidateClusterNodeMembership()
.- Specified by:
getConnection
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Parameters:
host
- the hostport
- the port- Returns:
- a connection to the requested cluster node
-
getStatefulConnection
public StatefulRedisClusterConnection<K,V> getStatefulConnection()
- Specified by:
getStatefulConnection
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Returns:
- the underlying connection.
-
nodes
public AsyncNodeSelection<K,V> nodes(Predicate<RedisClusterNode> predicate)
Description copied from interface:RedisAdvancedClusterAsyncCommands
Select nodes by a predicate and keeps a static selection. The set of nodes within theNodeSelectionSupport
does not change when the cluster view changes.- Specified by:
nodes
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Parameters:
predicate
- Predicate to filter nodes- Returns:
- API with asynchronous executed commands on a selection of cluster nodes matching
predicate
-
readonly
public AsyncNodeSelection<K,V> readonly(Predicate<RedisClusterNode> predicate)
Description copied from interface:RedisAdvancedClusterAsyncCommands
Select replica nodes by a predicate and keeps a static selection. Replica connections operate in READONLY mode. The set of nodes within theNodeSelectionSupport
does not change when the cluster view changes.- Specified by:
readonly
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Parameters:
predicate
- Predicate to filter nodes- Returns:
- API with asynchronous executed commands on a selection of cluster nodes matching
predicate
-
nodes
public AsyncNodeSelection<K,V> nodes(Predicate<RedisClusterNode> predicate, boolean dynamic)
Description copied from interface:RedisAdvancedClusterAsyncCommands
Select nodes by a predicate- Specified by:
nodes
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Parameters:
predicate
- Predicate to filter nodesdynamic
- Defines, whether the set of nodes within theNodeSelectionSupport
can change when the cluster view changes.- Returns:
- API with asynchronous executed commands on a selection of cluster nodes matching
predicate
-
nodes
protected AsyncNodeSelection<K,V> nodes(Predicate<RedisClusterNode> predicate, ConnectionIntent connectionIntent, boolean dynamic)
-
scan
public RedisFuture<KeyScanCursor<K>> scan()
Description copied from interface:RedisKeyAsyncCommands
Incrementally iterate the keys space.- Specified by:
scan
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
scan
in classAbstractRedisAsyncCommands<K,V>
- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
RedisKeyAsyncCommands.scan()
-
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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
scan
in classAbstractRedisAsyncCommands<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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
scan
in classAbstractRedisAsyncCommands<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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
scan
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
scanCursor
- cursor to resume from a previous scan, must not benull
.- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
RedisKeyAsyncCommands.scan(ScanCursor)
-
scan
public RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel)
Description copied from interface:RedisKeyAsyncCommands
Incrementally iterate the keys space.- Specified by:
scan
in interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
scan
in classAbstractRedisAsyncCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every key.- Returns:
- StreamScanCursor scan cursor.
- See Also:
RedisKeyAsyncCommands.scan(KeyStreamingChannel)
-
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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
scan
in classAbstractRedisAsyncCommands<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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
scan
in classAbstractRedisAsyncCommands<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 interfaceRedisAdvancedClusterAsyncCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyAsyncCommands<K,V>
- Overrides:
scan
in classAbstractRedisAsyncCommands<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.
- See Also:
RedisKeyAsyncCommands.scan(ScanCursor, ScanArgs)
-
executeOnUpstream
protected <T> Map<String,CompletableFuture<T>> executeOnUpstream(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function)
Run a command on all available masters,- Type Parameters:
T
- result type- Parameters:
function
- function producing the command- Returns:
- map of a key (counter) and commands.
-
executeOnNodes
protected <T> Map<String,CompletableFuture<T>> executeOnNodes(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function, Function<RedisClusterNode,Boolean> filter)
Run a command on all available nodes that matchfilter
.- Type Parameters:
T
- result type- Parameters:
function
- function producing the commandfilter
- filter function for the node selection- Returns:
- map of a key (counter) and commands.
-
-