Module lettuce.core
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>,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
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>flushallAsync()Remove all keys asynchronously from all databases.Mono<String>flushdb()Remove all keys from the current database.Flux<V>georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)Retrieve members selected by distance with the center oflongitudeandlatitude.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 oflongitudeandlatitude.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, 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, blpop, blpop, brpop, brpop, brpoplpush, brpoplpush, bzpopmax, bzpopmax, bzpopmin, bzpopmin, clientCaching, clientGetname, clientGetredir, clientId, clientKill, clientKill, clientList, clientPause, clientTracking, clientUnblock, close, clusterAddSlots, clusterBumpepoch, clusterCountFailureReports, clusterDelSlots, clusterFailover, clusterFlushslots, clusterForget, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterSlaves, clusterSlots, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, 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, evalsha, evalsha, exec, exists, expire, expire, expireat, expireat, expireat, flushall, flushCommands, flushdb, flushdbAsync, 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, 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, pexpireat, pexpireat, pexpireat, pfadd, pfadd, pfcount, pfcount, pfmerge, pfmerge, ping, psetex, pttl, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, readOnly, readWrite, rename, renamenx, 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, sinter, sinter, sinterstore, sismember, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, smembers, smembers, smismember, smove, sort, sort, sort, sort, 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, zinterstore, zinterstore, zinterWithScores, zinterWithScores, zlexcount, zlexcount, 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, zrangestorebylex, zrangestorebyscore, zrangeWithScores, zrangeWithScores, zrank, 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, zrevrangestorebylex, zrevrangestorebyscore, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunion, zunion, zunionstore, zunionstore, zunionWithScores, zunionWithScoresMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.lettuce.core.api.reactive.BaseRedisReactiveCommands
dispatch, dispatch, echo, flushCommands, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, setAutoFlushCommands, waitForReplicationMethods inherited from interface io.lettuce.core.api.reactive.RedisAclReactiveCommands
aclCat, aclCat, aclDeluser, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoamiMethods inherited from interface io.lettuce.core.cluster.api.reactive.RedisAdvancedClusterReactiveCommands
scriptLoadMethods inherited from interface io.lettuce.core.cluster.api.reactive.RedisClusterReactiveCommands
asking, auth, auth, clusterAddSlots, clusterBumpepoch, clusterCountFailureReports, clusterDelSlots, clusterFailover, clusterFlushslots, clusterForget, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterSlaves, clusterSlots, readOnly, readWrite, setTimeoutMethods inherited from interface io.lettuce.core.api.reactive.RedisGeoReactiveCommands
geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius, georadiusbymember, geosearch, geosearch, geosearchstoreMethods 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, hvalsMethods inherited from interface io.lettuce.core.api.reactive.RedisHLLReactiveCommands
pfadd, pfcount, pfmergeMethods inherited from interface io.lettuce.core.api.reactive.RedisKeyReactiveCommands
copy, copy, dump, expire, expire, expireat, expireat, expireat, migrate, migrate, move, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pttl, rename, renamenx, restore, restore, sort, sort, sort, sort, sortStore, ttl, typeMethods inherited from interface io.lettuce.core.api.reactive.RedisListReactiveCommands
blmove, blmove, blpop, blpop, brpop, brpop, brpoplpush, brpoplpush, lindex, linsert, llen, lmove, lpop, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpop, rpoplpush, rpush, rpushxMethods inherited from interface io.lettuce.core.api.reactive.RedisScriptingReactiveCommands
digest, digest, eval, eval, eval, eval, evalsha, evalsha, scriptExists, scriptFlushMethods inherited from interface io.lettuce.core.api.reactive.RedisServerReactiveCommands
bgrewriteaof, bgsave, clientCaching, clientGetname, clientGetredir, clientId, clientKill, clientKill, clientList, clientPause, clientTracking, clientUnblock, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, configSet, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, flushall, flushdb, flushdbAsync, info, info, lastsave, memoryUsage, save, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, timeMethods inherited from interface io.lettuce.core.api.reactive.RedisSetReactiveCommands
sadd, scard, sdiff, sdiff, sdiffstore, sinter, sinter, sinterstore, sismember, smembers, smembers, smismember, smove, spop, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sunion, sunion, sunionstoreMethods inherited from interface io.lettuce.core.api.reactive.RedisSortedSetReactiveCommands
bzpopmax, bzpopmax, bzpopmin, bzpopmin, zadd, zadd, zadd, zadd, zadd, zadd, zaddincr, zaddincr, zcard, zcount, zcount, zcount, zdiff, zdiffstore, zdiffWithScores, zincrby, zinter, zinter, zinterstore, zinterstore, zinterWithScores, zinterWithScores, zlexcount, zlexcount, 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, zrangestorebylex, zrangestorebyscore, zrangeWithScores, zrangeWithScores, zrank, 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, zrevrangestorebylex, zrevrangestorebyscore, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunion, zunion, zunionstore, zunionstore, zunionWithScores, zunionWithScoresMethods 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, xtrimMethods 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 Details
-
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 Details
-
clientSetname
Description copied from interface:RedisServerReactiveCommandsSet the current connection name.- Specified by:
clientSetnamein interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
clientSetnamein interfaceRedisServerReactiveCommands<K,V>- Overrides:
clientSetnamein classAbstractRedisReactiveCommands<K,V>- Parameters:
name- the client name.- Returns:
- simple-string-reply
OKif the connection name was successfully set. - See Also:
RedisServerReactiveCommands.clientSetname(Object)
-
clusterCountKeysInSlot
Description copied from interface:RedisClusterReactiveCommandsReturns the number of keys in the specified Redis Cluster hashslot.- Specified by:
clusterCountKeysInSlotin interfaceRedisClusterReactiveCommands<K,V>- Overrides:
clusterCountKeysInSlotin 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
Description copied from interface:RedisClusterReactiveCommandsRetrieve the list of keys within theslot.- Specified by:
clusterGetKeysInSlotin interfaceRedisClusterReactiveCommands<K,V>- Overrides:
clusterGetKeysInSlotin classAbstractRedisReactiveCommands<K,V>- Parameters:
slot- the slotcount- maximal number of keys- Returns:
- List<K> array-reply list of keys
-
dbsize
Description copied from interface:RedisServerReactiveCommandsReturn the number of keys in the selected database.- Specified by:
dbsizein interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
dbsizein interfaceRedisServerReactiveCommands<K,V>- Overrides:
dbsizein classAbstractRedisReactiveCommands<K,V>- Returns:
- Long integer-reply.
- See Also:
RedisServerReactiveCommands.dbsize()
-
del
Description copied from interface:RedisKeyReactiveCommandsDelete one or more keys.- Specified by:
delin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
delin interfaceRedisClusterReactiveCommands<K,V>- Specified by:
delin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
delin classAbstractRedisReactiveCommands<K,V>- Parameters:
keys- the keys.- Returns:
- Long integer-reply The number of keys that were removed.
- See Also:
RedisKeyReactiveCommands.del(Object[])
-
del
- Overrides:
delin classAbstractRedisReactiveCommands<K,V>
-
exists
Description copied from interface:RedisKeyReactiveCommandsDetermine how many keys exist.- Specified by:
existsin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
existsin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
existsin classAbstractRedisReactiveCommands<K,V>- Parameters:
keys- the keys.- Returns:
- Long integer-reply specifically: Number of existing keys.
-
exists
- Overrides:
existsin classAbstractRedisReactiveCommands<K,V>
-
flushall
Description copied from interface:RedisServerReactiveCommandsRemove all keys from all databases.- Specified by:
flushallin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
flushallin interfaceRedisServerReactiveCommands<K,V>- Overrides:
flushallin classAbstractRedisReactiveCommands<K,V>- Returns:
- String simple-string-reply.
- See Also:
RedisServerReactiveCommands.flushall()
-
flushallAsync
Description copied from interface:RedisServerReactiveCommandsRemove all keys asynchronously from all databases.- Specified by:
flushallAsyncin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
flushallAsyncin interfaceRedisServerReactiveCommands<K,V>- Overrides:
flushallAsyncin classAbstractRedisReactiveCommands<K,V>- Returns:
- String simple-string-reply.
- See Also:
RedisServerReactiveCommands.flushallAsync()
-
flushdb
Description copied from interface:RedisServerReactiveCommandsRemove all keys from the current database.- Specified by:
flushdbin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
flushdbin interfaceRedisServerReactiveCommands<K,V>- Overrides:
flushdbin classAbstractRedisReactiveCommands<K,V>- Returns:
- String simple-string-reply.
- See Also:
RedisServerReactiveCommands.flushdb()
-
georadius
public Flux<V> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)Description copied from interface:RedisGeoReactiveCommandsRetrieve members selected by distance with the center oflongitudeandlatitude.- Specified by:
georadiusin interfaceRedisGeoReactiveCommands<K,V>- Overrides:
georadiusin 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:RedisGeoReactiveCommandsRetrieve members selected by distance with the center oflongitudeandlatitude.- Specified by:
georadiusin interfaceRedisGeoReactiveCommands<K,V>- Overrides:
georadiusin 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
GeoWithincontains only fields which were requested byGeoArgs.
-
georadiusbymember
Description copied from interface:RedisGeoReactiveCommandsRetrieve members selected by distance with the center ofmember. The member itself is always contained in the results.- Specified by:
georadiusbymemberin interfaceRedisGeoReactiveCommands<K,V>- Overrides:
georadiusbymemberin 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:RedisGeoReactiveCommandsRetrieve members selected by distance with the center ofmember. The member itself is always contained in the results.- Specified by:
georadiusbymemberin interfaceRedisGeoReactiveCommands<K,V>- Overrides:
georadiusbymemberin 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
GeoWithincontains only fields which were requested byGeoArgs.
-
keys
Description copied from interface:RedisKeyReactiveCommandsFind all keys matching the given pattern.- Specified by:
keysin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
keysin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
keysin 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
Description copied from interface:RedisKeyReactiveCommandsFind all keys matching the given pattern.- Specified by:
keysin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
keysin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
keysin 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
Description copied from interface:RedisStringReactiveCommandsGet the values of all the given keys.- Specified by:
mgetin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
mgetin interfaceRedisClusterReactiveCommands<K,V>- Specified by:
mgetin interfaceRedisStringReactiveCommands<K,V>- Overrides:
mgetin classAbstractRedisReactiveCommands<K,V>- Parameters:
keys- the key.- Returns:
- V array-reply list of values at the specified keys.
- See Also:
RedisStringReactiveCommands.mget(Object[])
-
mget
- Overrides:
mgetin classAbstractRedisReactiveCommands<K,V>
-
mget
Description copied from interface:RedisStringReactiveCommandsStream over the values of all the given keys.- Specified by:
mgetin interfaceRedisStringReactiveCommands<K,V>- Overrides:
mgetin classAbstractRedisReactiveCommands<K,V>- Parameters:
channel- the channel.keys- the keys.- Returns:
- Long array-reply list of values at the specified keys.
-
mget
- Overrides:
mgetin classAbstractRedisReactiveCommands<K,V>
-
msetnx
Description copied from interface:RedisStringReactiveCommandsSet multiple keys to multiple values, only if none of the keys exist.- Specified by:
msetnxin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
msetnxin interfaceRedisClusterReactiveCommands<K,V>- Specified by:
msetnxin interfaceRedisStringReactiveCommands<K,V>- Overrides:
msetnxin classAbstractRedisReactiveCommands<K,V>- Parameters:
map- the null.- Returns:
- Boolean integer-reply specifically:
1if the all the keys were set.0if no key was set (at least one key already existed). - See Also:
RedisStringReactiveCommands.msetnx(Map)
-
mset
Description copied from interface:RedisStringReactiveCommandsSet multiple keys to multiple values.- Specified by:
msetin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
msetin interfaceRedisClusterReactiveCommands<K,V>- Specified by:
msetin interfaceRedisStringReactiveCommands<K,V>- Overrides:
msetin classAbstractRedisReactiveCommands<K,V>- Parameters:
map- the null.- Returns:
- String simple-string-reply always
OKsinceMSETcan't fail. - See Also:
RedisStringReactiveCommands.mset(Map)
-
randomkey
Description copied from interface:RedisKeyReactiveCommandsReturn a random key from the keyspace.- Specified by:
randomkeyin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
randomkeyin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
randomkeyin classAbstractRedisReactiveCommands<K,V>- Returns:
- K bulk-string-reply the random key, or
nullwhen the database is empty. - See Also:
RedisKeyReactiveCommands.randomkey()
-
scriptFlush
Description copied from interface:RedisScriptingReactiveCommandsRemove all the scripts from the script cache.- Specified by:
scriptFlushin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
scriptFlushin interfaceRedisScriptingReactiveCommands<K,V>- Overrides:
scriptFlushin classAbstractRedisReactiveCommands<K,V>- Returns:
- String simple-string-reply.
- See Also:
RedisScriptingReactiveCommands.scriptFlush()
-
scriptKill
Description copied from interface:RedisScriptingReactiveCommandsKill the script currently in execution.- Specified by:
scriptKillin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
scriptKillin interfaceRedisScriptingReactiveCommands<K,V>- Overrides:
scriptKillin classAbstractRedisReactiveCommands<K,V>- Returns:
- String simple-string-reply.
- See Also:
RedisScriptingReactiveCommands.scriptKill()
-
scriptLoad
Description copied from interface:RedisScriptingReactiveCommandsLoad the specified Lua script into the script cache.- Specified by:
scriptLoadin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
scriptLoadin interfaceRedisScriptingReactiveCommands<K,V>- Overrides:
scriptLoadin 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
Description copied from interface:RedisServerReactiveCommandsSynchronously save the dataset to disk and then shut down the server.- Specified by:
shutdownin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
shutdownin interfaceRedisServerReactiveCommands<K,V>- Overrides:
shutdownin classAbstractRedisReactiveCommands<K,V>- Parameters:
save-trueforce save operation.- See Also:
RedisServerReactiveCommands.shutdown(boolean)
-
touch
Description copied from interface:RedisKeyReactiveCommandsTouch one or more keys. Touch sets the last accessed time for a key. Non-exsitent keys wont get created.- Specified by:
touchin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
touchin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
touchin classAbstractRedisReactiveCommands<K,V>- Parameters:
keys- the keys.- Returns:
- Long integer-reply the number of found keys.
-
touch
- Overrides:
touchin classAbstractRedisReactiveCommands<K,V>
-
unlink
Description copied from interface:RedisKeyReactiveCommandsUnlink one or more keys (non blocking DEL).- Specified by:
unlinkin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
unlinkin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
unlinkin classAbstractRedisReactiveCommands<K,V>- Parameters:
keys- the keys.- Returns:
- Long integer-reply The number of keys that were removed.
- See Also:
RedisKeyReactiveCommands.unlink(Object[])
-
unlink
- Overrides:
unlinkin classAbstractRedisReactiveCommands<K,V>
-
getConnection
Description copied from interface:RedisAdvancedClusterReactiveCommandsRetrieve 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:
getConnectionin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Parameters:
nodeId- the node Id- Returns:
- a connection to the requested cluster node
-
getConnection
Description copied from interface:RedisAdvancedClusterReactiveCommandsRetrieve 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:
getConnectionin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Parameters:
host- the hostport- the port- Returns:
- a connection to the requested cluster node
-
getStatefulConnection
- Specified by:
getStatefulConnectionin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Returns:
- the underlying connection.
-
scan
Description copied from interface:RedisKeyReactiveCommandsIncrementally iterate the keys space.- Specified by:
scanin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
scanin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
scanin classAbstractRedisReactiveCommands<K,V>- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
RedisKeyReactiveCommands.scan(ScanArgs)
-
scan
Description copied from interface:RedisKeyReactiveCommandsIncrementally iterate the keys space. UseKeyScanArgsto specifySCAN-specific arguments.- Specified by:
scanin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
scanin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
scanin classAbstractRedisReactiveCommands<K,V>- Parameters:
scanArgs- scan arguments.- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
KeyScanArgs
-
scan
Description copied from interface:RedisKeyReactiveCommandsIncrementally iterate the keys space. UseKeyScanArgsto specifySCAN-specific arguments.- Specified by:
scanin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
scanin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
scanin 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
Description copied from interface:RedisKeyReactiveCommandsIncrementally iterate the keys space.- Specified by:
scanin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
scanin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
scanin 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
Description copied from interface:RedisKeyReactiveCommandsIncrementally iterate the keys space.- Specified by:
scanin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
scanin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
scanin classAbstractRedisReactiveCommands<K,V>- Parameters:
channel- streaming channel that receives a call for every key.- Returns:
- StreamScanCursor scan cursor.
- See Also:
RedisKeyReactiveCommands.scan(KeyStreamingChannel)
-
scan
Description copied from interface:RedisKeyReactiveCommandsIncrementally iterate the keys space. UseKeyScanArgsto specifySCAN-specific arguments.- Specified by:
scanin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
scanin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
scanin 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:RedisKeyReactiveCommandsIncrementally iterate the keys space. UseKeyScanArgsto specifySCAN-specific arguments.- Specified by:
scanin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
scanin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
scanin 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
Description copied from interface:RedisKeyReactiveCommandsIncrementally iterate the keys space.- Specified by:
scanin interfaceRedisAdvancedClusterReactiveCommands<K,V>- Specified by:
scanin interfaceRedisKeyReactiveCommands<K,V>- Overrides:
scanin 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.
-
RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnection, RedisCodec).