Package io.lettuce.core.cluster
Class RedisAdvancedClusterReactiveCommandsImpl<K,V>
- java.lang.Object
-
- io.lettuce.core.AbstractRedisReactiveCommands<K,V>
-
- io.lettuce.core.cluster.RedisAdvancedClusterReactiveCommandsImpl<K,V>
-
- Type Parameters:
K
- Key type.V
- Value type.
- All Implemented Interfaces:
BaseRedisReactiveCommands<K,V>
,RedisAclReactiveCommands<K,V>
,RedisFunctionReactiveCommands<K,V>
,RedisGeoReactiveCommands<K,V>
,RedisHashReactiveCommands<K,V>
,RedisHLLReactiveCommands<K,V>
,RedisKeyReactiveCommands<K,V>
,RedisListReactiveCommands<K,V>
,RedisScriptingReactiveCommands<K,V>
,RedisServerReactiveCommands<K,V>
,RedisSetReactiveCommands<K,V>
,RedisSortedSetReactiveCommands<K,V>
,RedisStreamReactiveCommands<K,V>
,RedisStringReactiveCommands<K,V>
,RedisTransactionalReactiveCommands<K,V>
,RedisAdvancedClusterReactiveCommands<K,V>
,RedisClusterReactiveCommands<K,V>
public class RedisAdvancedClusterReactiveCommandsImpl<K,V> extends AbstractRedisReactiveCommands<K,V> implements RedisAdvancedClusterReactiveCommands<K,V>
An advanced reactive and thread-safe API to a Redis Cluster connection.- Since:
- 4.0
- Author:
- Mark Paluch, Jon Chambers
-
-
Constructor Summary
Constructors Constructor Description RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnection<K,V> connection, RedisCodec<K,V> codec)
Initialize a new connection.RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection, RedisCodec<K,V> codec)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<String>
clientSetname(K name)
Set the current connection name.Mono<Long>
clusterCountKeysInSlot(int slot)
Returns the number of keys in the specified Redis Cluster hashslot
.Flux<K>
clusterGetKeysInSlot(int slot, int count)
Retrieve the list of keys within theslot
.Mono<Long>
dbsize()
Return the number of keys in the selected database.Mono<Long>
del(Iterable<K> keys)
Mono<Long>
del(K... keys)
Delete one or more keys.protected <T> Map<String,org.reactivestreams.Publisher<T>>
executeOnNodes(Function<RedisClusterReactiveCommands<K,V>,? extends org.reactivestreams.Publisher<T>> function, Predicate<RedisClusterNode> filter)
Run a command on all available nodes that matchfilter
.protected <T> Map<String,org.reactivestreams.Publisher<T>>
executeOnUpstream(Function<RedisClusterReactiveCommands<K,V>,? extends org.reactivestreams.Publisher<T>> function)
Run a command on all available masters,Mono<Long>
exists(Iterable<K> keys)
Mono<Long>
exists(K... keys)
Determine how many keys exist.Mono<String>
flushall()
Remove all keys from all databases.Mono<String>
flushall(FlushMode flushMode)
Remove all keys from all databases using the specifiedFlushMode
.Mono<String>
flushallAsync()
Remove all keys asynchronously from all databases.Mono<String>
flushdb()
Remove all keys from the current database.Mono<String>
flushdb(FlushMode flushMode)
Remove all keys from the current database using the specifiedFlushMode
.Flux<V>
georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)
Retrieve members selected by distance with the center oflongitude
andlatitude
.Flux<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
.Flux<V>
georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit)
Retrieve members selected by distance with the center ofmember
.Flux<GeoWithin<V>>
georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
Retrieve members selected by distance with the center ofmember
.RedisClusterReactiveCommands<K,V>
getConnection(String nodeId)
Retrieve a connection to the specified cluster node using the nodeId.RedisClusterReactiveCommands<K,V>
getConnection(String host, int port)
Retrieve a connection to the specified cluster node using host and port.StatefulRedisClusterConnection<K,V>
getStatefulConnection()
Mono<Long>
keys(KeyStreamingChannel<K> channel, K pattern)
Find all keys matching the given pattern.Flux<K>
keys(K pattern)
Find all keys matching the given pattern.Mono<Long>
mget(KeyValueStreamingChannel<K,V> channel, Iterable<K> keys)
Mono<Long>
mget(KeyValueStreamingChannel<K,V> channel, K... keys)
Stream over the values of all the given keys.Flux<KeyValue<K,V>>
mget(Iterable<K> keys)
Flux<KeyValue<K,V>>
mget(K... keys)
Get the values of all the given keys.Mono<String>
mset(Map<K,V> map)
Set multiple keys to multiple values.Mono<Boolean>
msetnx(Map<K,V> map)
Set multiple keys to multiple values, only if none of the keys exist.Mono<K>
randomkey()
Return a random key from the keyspace.Mono<KeyScanCursor<K>>
scan()
Incrementally iterate the keys space.Mono<StreamScanCursor>
scan(KeyStreamingChannel<K> channel)
Incrementally iterate the keys space.Mono<StreamScanCursor>
scan(KeyStreamingChannel<K> channel, ScanArgs scanArgs)
Incrementally iterate the keys space.Mono<StreamScanCursor>
scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor)
Incrementally iterate the keys space.Mono<StreamScanCursor>
scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor, ScanArgs scanArgs)
Incrementally iterate the keys space.Mono<KeyScanCursor<K>>
scan(ScanArgs scanArgs)
Incrementally iterate the keys space.Mono<KeyScanCursor<K>>
scan(ScanCursor scanCursor)
Incrementally iterate the keys space.Mono<KeyScanCursor<K>>
scan(ScanCursor scanCursor, ScanArgs scanArgs)
Incrementally iterate the keys space.Mono<String>
scriptFlush()
Remove all the scripts from the script cache.Mono<String>
scriptKill()
Kill the script currently in execution.Mono<String>
scriptLoad(byte[] script)
Load the specified Lua script into the script cache.Mono<Void>
shutdown(boolean save)
Synchronously save the dataset to disk and then shut down the server.Mono<Long>
touch(Iterable<K> keys)
Mono<Long>
touch(K... keys)
Touch one or more keys.Mono<Long>
unlink(Iterable<K> keys)
Mono<Long>
unlink(K... keys)
Unlink one or more keys (non blocking DEL).-
Methods inherited from class io.lettuce.core.AbstractRedisReactiveCommands
aclCat, aclCat, aclDeluser, aclDryRun, aclDryRun, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoami, append, asking, 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, close, 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, createDissolvingFlux, createFlux, createMono, createMono, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, decr, decrby, digest, digest, discard, dispatch, dispatch, dump, echo, eval, eval, eval, eval, evalReadOnly, evalsha, evalsha, evalshaReadOnly, exec, exists, 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, mget, migrate, migrate, move, multi, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpiretime, pfadd, pfadd, pfcount, pfcount, pfmerge, 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.reactive.BaseRedisReactiveCommands
dispatch, dispatch, echo, flushCommands, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, setAutoFlushCommands, waitForReplication
-
Methods inherited from interface io.lettuce.core.api.reactive.RedisAclReactiveCommands
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.reactive.RedisAdvancedClusterReactiveCommands
scriptLoad
-
Methods inherited from interface io.lettuce.core.cluster.api.reactive.RedisClusterReactiveCommands
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.reactive.RedisFunctionReactiveCommands
fcall, fcall, fcallReadOnly, fcallReadOnly, functionDump, functionFlush, functionKill, functionList, functionList, functionLoad, functionLoad, functionRestore, functionRestore
-
Methods inherited from interface io.lettuce.core.api.reactive.RedisGeoReactiveCommands
geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius, georadiusbymember, geosearch, geosearch, geosearchstore
-
Methods inherited from interface io.lettuce.core.api.reactive.RedisHashReactiveCommands
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.reactive.RedisHLLReactiveCommands
pfadd, pfcount, pfmerge
-
Methods inherited from interface io.lettuce.core.api.reactive.RedisKeyReactiveCommands
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.reactive.RedisListReactiveCommands
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.reactive.RedisScriptingReactiveCommands
digest, digest, eval, eval, eval, eval, evalReadOnly, evalsha, evalsha, evalshaReadOnly, scriptExists, scriptFlush
-
Methods inherited from interface io.lettuce.core.api.reactive.RedisServerReactiveCommands
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.reactive.RedisSetReactiveCommands
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.reactive.RedisSortedSetReactiveCommands
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.reactive.RedisStreamReactiveCommands
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.reactive.RedisStringReactiveCommands
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
-
RedisAdvancedClusterReactiveCommandsImpl
@Deprecated public RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection, RedisCodec<K,V> codec)
Deprecated.Initialize a new connection.- Parameters:
connection
- the stateful connection.codec
- Codec used to encode/decode keys and values.
-
RedisAdvancedClusterReactiveCommandsImpl
public RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnection<K,V> connection, RedisCodec<K,V> codec)
Initialize a new connection.- Parameters:
connection
- the stateful connection.codec
- Codec used to encode/decode keys and values.
-
-
Method Detail
-
clientSetname
public Mono<String> clientSetname(K name)
Description copied from interface:RedisServerReactiveCommands
Set the current connection name.- Specified by:
clientSetname
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
clientSetname
in interfaceRedisServerReactiveCommands<K,V>
- Overrides:
clientSetname
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
name
- the client name.- Returns:
- simple-string-reply
OK
if the connection name was successfully set. - See Also:
RedisServerReactiveCommands.clientSetname(Object)
-
clusterCountKeysInSlot
public Mono<Long> clusterCountKeysInSlot(int slot)
Description copied from interface:RedisClusterReactiveCommands
Returns the number of keys in the specified Redis Cluster hashslot
.- Specified by:
clusterCountKeysInSlot
in interfaceRedisClusterReactiveCommands<K,V>
- Overrides:
clusterCountKeysInSlot
in classAbstractRedisReactiveCommands<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 Flux<K> clusterGetKeysInSlot(int slot, int count)
Description copied from interface:RedisClusterReactiveCommands
Retrieve the list of keys within theslot
.- Specified by:
clusterGetKeysInSlot
in interfaceRedisClusterReactiveCommands<K,V>
- Overrides:
clusterGetKeysInSlot
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
slot
- the slotcount
- maximal number of keys- Returns:
- List<K> array-reply list of keys
-
dbsize
public Mono<Long> dbsize()
Description copied from interface:RedisServerReactiveCommands
Return the number of keys in the selected database.- Specified by:
dbsize
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
dbsize
in interfaceRedisServerReactiveCommands<K,V>
- Overrides:
dbsize
in classAbstractRedisReactiveCommands<K,V>
- Returns:
- Long integer-reply.
- See Also:
RedisServerReactiveCommands.dbsize()
-
del
public Mono<Long> del(K... keys)
Description copied from interface:RedisKeyReactiveCommands
Delete one or more keys.- Specified by:
del
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
del
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
del
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply The number of keys that were removed.
- See Also:
RedisKeyReactiveCommands.del(Object[])
-
del
public Mono<Long> del(Iterable<K> keys)
- Overrides:
del
in classAbstractRedisReactiveCommands<K,V>
-
exists
public Mono<Long> exists(K... keys)
Description copied from interface:RedisKeyReactiveCommands
Determine how many keys exist.- Specified by:
exists
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
exists
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
exists
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply specifically: Number of existing keys.
-
exists
public Mono<Long> exists(Iterable<K> keys)
- Overrides:
exists
in classAbstractRedisReactiveCommands<K,V>
-
flushall
public Mono<String> flushall()
Description copied from interface:RedisServerReactiveCommands
Remove all keys from all databases.- Specified by:
flushall
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
flushall
in interfaceRedisServerReactiveCommands<K,V>
- Overrides:
flushall
in classAbstractRedisReactiveCommands<K,V>
- Returns:
- String simple-string-reply.
- See Also:
RedisServerReactiveCommands.flushall()
-
flushall
public Mono<String> flushall(FlushMode flushMode)
Description copied from interface:RedisServerReactiveCommands
Remove all keys from all databases using the specifiedFlushMode
.- Specified by:
flushall
in interfaceRedisServerReactiveCommands<K,V>
- Overrides:
flushall
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
flushMode
- the flush mode (sync/async).- Returns:
- String simple-string-reply.
-
flushallAsync
public Mono<String> flushallAsync()
Description copied from interface:RedisServerReactiveCommands
Remove all keys asynchronously from all databases.- Specified by:
flushallAsync
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
flushallAsync
in interfaceRedisServerReactiveCommands<K,V>
- Overrides:
flushallAsync
in classAbstractRedisReactiveCommands<K,V>
- Returns:
- String simple-string-reply.
- See Also:
RedisServerReactiveCommands.flushallAsync()
-
flushdb
public Mono<String> flushdb()
Description copied from interface:RedisServerReactiveCommands
Remove all keys from the current database.- Specified by:
flushdb
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
flushdb
in interfaceRedisServerReactiveCommands<K,V>
- Overrides:
flushdb
in classAbstractRedisReactiveCommands<K,V>
- Returns:
- String simple-string-reply.
- See Also:
RedisServerReactiveCommands.flushdb()
-
flushdb
public Mono<String> flushdb(FlushMode flushMode)
Description copied from interface:RedisServerReactiveCommands
Remove all keys from the current database using the specifiedFlushMode
.- Specified by:
flushdb
in interfaceRedisServerReactiveCommands<K,V>
- Overrides:
flushdb
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
flushMode
- the flush mode (sync/async).- Returns:
- String simple-string-reply.
-
georadius
public Flux<V> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)
Description copied from interface:RedisGeoReactiveCommands
Retrieve members selected by distance with the center oflongitude
andlatitude
.- Specified by:
georadius
in interfaceRedisGeoReactiveCommands<K,V>
- Overrides:
georadius
in classAbstractRedisReactiveCommands<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 Flux<GeoWithin<V>> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
Description copied from interface:RedisGeoReactiveCommands
Retrieve members selected by distance with the center oflongitude
andlatitude
.- Specified by:
georadius
in interfaceRedisGeoReactiveCommands<K,V>
- Overrides:
georadius
in classAbstractRedisReactiveCommands<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 Flux<V> georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit)
Description copied from interface:RedisGeoReactiveCommands
Retrieve members selected by distance with the center ofmember
. The member itself is always contained in the results.- Specified by:
georadiusbymember
in interfaceRedisGeoReactiveCommands<K,V>
- Overrides:
georadiusbymember
in classAbstractRedisReactiveCommands<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 Flux<GeoWithin<V>> georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
Description copied from interface:RedisGeoReactiveCommands
Retrieve members selected by distance with the center ofmember
. The member itself is always contained in the results.- Specified by:
georadiusbymember
in interfaceRedisGeoReactiveCommands<K,V>
- Overrides:
georadiusbymember
in classAbstractRedisReactiveCommands<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 Flux<K> keys(K pattern)
Description copied from interface:RedisKeyReactiveCommands
Find all keys matching the given pattern.- Specified by:
keys
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
keys
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
keys
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
pattern
- the pattern type: patternkey (pattern).- Returns:
- K array-reply list of keys matching
pattern
. - See Also:
RedisKeyReactiveCommands.keys(Object)
-
keys
public Mono<Long> keys(KeyStreamingChannel<K> channel, K pattern)
Description copied from interface:RedisKeyReactiveCommands
Find all keys matching the given pattern.- Specified by:
keys
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
keys
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
keys
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
channel
- the channel.pattern
- the pattern.- Returns:
- Long array-reply list of keys matching
pattern
. - See Also:
RedisKeyReactiveCommands.keys(KeyStreamingChannel, Object)
-
mget
public Flux<KeyValue<K,V>> mget(K... keys)
Description copied from interface:RedisStringReactiveCommands
Get the values of all the given keys.- Specified by:
mget
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
mget
in interfaceRedisStringReactiveCommands<K,V>
- Overrides:
mget
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
keys
- the key.- Returns:
- V array-reply list of values at the specified keys.
- See Also:
RedisStringReactiveCommands.mget(Object[])
-
mget
public Flux<KeyValue<K,V>> mget(Iterable<K> keys)
- Overrides:
mget
in classAbstractRedisReactiveCommands<K,V>
-
mget
public Mono<Long> mget(KeyValueStreamingChannel<K,V> channel, K... keys)
Description copied from interface:RedisStringReactiveCommands
Stream over the values of all the given keys.- Specified by:
mget
in interfaceRedisStringReactiveCommands<K,V>
- Overrides:
mget
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
channel
- the channel.keys
- the keys.- Returns:
- Long array-reply list of values at the specified keys.
-
mget
public Mono<Long> mget(KeyValueStreamingChannel<K,V> channel, Iterable<K> keys)
- Overrides:
mget
in classAbstractRedisReactiveCommands<K,V>
-
msetnx
public Mono<Boolean> msetnx(Map<K,V> map)
Description copied from interface:RedisStringReactiveCommands
Set multiple keys to multiple values, only if none of the keys exist.- Specified by:
msetnx
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
msetnx
in interfaceRedisStringReactiveCommands<K,V>
- Overrides:
msetnx
in classAbstractRedisReactiveCommands<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:
RedisStringReactiveCommands.msetnx(Map)
-
mset
public Mono<String> mset(Map<K,V> map)
Description copied from interface:RedisStringReactiveCommands
Set multiple keys to multiple values.- Specified by:
mset
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
mset
in interfaceRedisStringReactiveCommands<K,V>
- Overrides:
mset
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
map
- the map.- Returns:
- String simple-string-reply always
OK
sinceMSET
can't fail. - See Also:
RedisStringReactiveCommands.mset(Map)
-
randomkey
public Mono<K> randomkey()
Description copied from interface:RedisKeyReactiveCommands
Return a random key from the keyspace.- Specified by:
randomkey
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
randomkey
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
randomkey
in classAbstractRedisReactiveCommands<K,V>
- Returns:
- K bulk-string-reply the random key, or
null
when the database is empty. - See Also:
RedisKeyReactiveCommands.randomkey()
-
scriptFlush
public Mono<String> scriptFlush()
Description copied from interface:RedisScriptingReactiveCommands
Remove all the scripts from the script cache.- Specified by:
scriptFlush
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
scriptFlush
in interfaceRedisScriptingReactiveCommands<K,V>
- Overrides:
scriptFlush
in classAbstractRedisReactiveCommands<K,V>
- Returns:
- String simple-string-reply.
- See Also:
RedisScriptingReactiveCommands.scriptFlush()
-
scriptKill
public Mono<String> scriptKill()
Description copied from interface:RedisScriptingReactiveCommands
Kill the script currently in execution.- Specified by:
scriptKill
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
scriptKill
in interfaceRedisScriptingReactiveCommands<K,V>
- Overrides:
scriptKill
in classAbstractRedisReactiveCommands<K,V>
- Returns:
- String simple-string-reply.
- See Also:
RedisScriptingReactiveCommands.scriptKill()
-
scriptLoad
public Mono<String> scriptLoad(byte[] script)
Description copied from interface:RedisScriptingReactiveCommands
Load the specified Lua script into the script cache.- Specified by:
scriptLoad
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
scriptLoad
in interfaceRedisScriptingReactiveCommands<K,V>
- Overrides:
scriptLoad
in classAbstractRedisReactiveCommands<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 Mono<Void> shutdown(boolean save)
Description copied from interface:RedisServerReactiveCommands
Synchronously save the dataset to disk and then shut down the server.- Specified by:
shutdown
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
shutdown
in interfaceRedisServerReactiveCommands<K,V>
- Overrides:
shutdown
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
save
-true
force save operation.- See Also:
RedisServerReactiveCommands.shutdown(boolean)
-
touch
public Mono<Long> touch(K... keys)
Description copied from interface:RedisKeyReactiveCommands
Touch one or more keys. Touch sets the last accessed time for a key. Non-exsitent keys wont get created.- Specified by:
touch
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
touch
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
touch
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply the number of found keys.
-
touch
public Mono<Long> touch(Iterable<K> keys)
- Overrides:
touch
in classAbstractRedisReactiveCommands<K,V>
-
unlink
public Mono<Long> unlink(K... keys)
Description copied from interface:RedisKeyReactiveCommands
Unlink one or more keys (non blocking DEL).- Specified by:
unlink
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
unlink
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
unlink
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
keys
- the keys.- Returns:
- Long integer-reply The number of keys that were removed.
- See Also:
RedisKeyReactiveCommands.unlink(Object[])
-
unlink
public Mono<Long> unlink(Iterable<K> keys)
- Overrides:
unlink
in classAbstractRedisReactiveCommands<K,V>
-
getConnection
public RedisClusterReactiveCommands<K,V> getConnection(String nodeId)
Description copied from interface:RedisAdvancedClusterReactiveCommands
Retrieve a connection to the specified cluster node using the nodeId. Host and port are looked up in the node list. In contrast to theRedisAdvancedClusterReactiveCommands
, node-connections do not route commands to other cluster nodes- Specified by:
getConnection
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Parameters:
nodeId
- the node Id- Returns:
- a connection to the requested cluster node
-
getConnection
public RedisClusterReactiveCommands<K,V> getConnection(String host, int port)
Description copied from interface:RedisAdvancedClusterReactiveCommands
Retrieve a connection to the specified cluster node using host and port. In contrast to theRedisAdvancedClusterReactiveCommands
, 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 interfaceRedisAdvancedClusterReactiveCommands<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 interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Returns:
- the underlying connection.
-
scan
public Mono<KeyScanCursor<K>> scan()
Description copied from interface:RedisKeyReactiveCommands
Incrementally iterate the keys space.- Specified by:
scan
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
scan
in classAbstractRedisReactiveCommands<K,V>
- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
RedisKeyReactiveCommands.scan(ScanArgs)
-
scan
public Mono<KeyScanCursor<K>> scan(ScanArgs scanArgs)
Description copied from interface:RedisKeyReactiveCommands
Incrementally iterate the keys space. UseKeyScanArgs
to specifySCAN
-specific arguments.- Specified by:
scan
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
scan
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
scanArgs
- scan arguments.- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
KeyScanArgs
-
scan
public Mono<KeyScanCursor<K>> scan(ScanCursor scanCursor, ScanArgs scanArgs)
Description copied from interface:RedisKeyReactiveCommands
Incrementally iterate the keys space. UseKeyScanArgs
to specifySCAN
-specific arguments.- Specified by:
scan
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
scan
in classAbstractRedisReactiveCommands<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 Mono<KeyScanCursor<K>> scan(ScanCursor scanCursor)
Description copied from interface:RedisKeyReactiveCommands
Incrementally iterate the keys space.- Specified by:
scan
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
scan
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
scanCursor
- cursor to resume from a previous scan, must not benull
.- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
RedisKeyReactiveCommands.scan(ScanCursor)
-
scan
public Mono<StreamScanCursor> scan(KeyStreamingChannel<K> channel)
Description copied from interface:RedisKeyReactiveCommands
Incrementally iterate the keys space.- Specified by:
scan
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
scan
in classAbstractRedisReactiveCommands<K,V>
- Parameters:
channel
- streaming channel that receives a call for every key.- Returns:
- StreamScanCursor scan cursor.
- See Also:
RedisKeyReactiveCommands.scan(KeyStreamingChannel)
-
scan
public Mono<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanArgs scanArgs)
Description copied from interface:RedisKeyReactiveCommands
Incrementally iterate the keys space. UseKeyScanArgs
to specifySCAN
-specific arguments.- Specified by:
scan
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
scan
in classAbstractRedisReactiveCommands<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 Mono<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor, ScanArgs scanArgs)
Description copied from interface:RedisKeyReactiveCommands
Incrementally iterate the keys space. UseKeyScanArgs
to specifySCAN
-specific arguments.- Specified by:
scan
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
scan
in classAbstractRedisReactiveCommands<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 Mono<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor)
Description copied from interface:RedisKeyReactiveCommands
Incrementally iterate the keys space.- Specified by:
scan
in interfaceRedisAdvancedClusterReactiveCommands<K,V>
- Specified by:
scan
in interfaceRedisKeyReactiveCommands<K,V>
- Overrides:
scan
in classAbstractRedisReactiveCommands<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:
RedisKeyReactiveCommands.scan(ScanCursor, ScanArgs)
-
executeOnUpstream
protected <T> Map<String,org.reactivestreams.Publisher<T>> executeOnUpstream(Function<RedisClusterReactiveCommands<K,V>,? extends org.reactivestreams.Publisher<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,org.reactivestreams.Publisher<T>> executeOnNodes(Function<RedisClusterReactiveCommands<K,V>,? extends org.reactivestreams.Publisher<T>> function, Predicate<RedisClusterNode> 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.
-
-