K
- Key type.V
- Value type.public interface RedisClusterReactiveCommands<K,V> extends 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>
Modifier and Type | Method and Description |
---|---|
Mono<String> |
asking()
The asking command is required after a
-ASK redirection. |
Mono<String> |
auth(CharSequence password)
Authenticate to the server.
|
Mono<String> |
auth(String username,
CharSequence password)
Authenticate to the server with username and password.
|
Mono<String> |
clusterAddSlots(int... slots)
Adds slots to the cluster node.
|
Mono<String> |
clusterAddSlotsRange(Range<Integer>... ranges)
Takes a list of slot ranges (specified by start and end slots) to assign to the node.
|
Mono<String> |
clusterBumpepoch()
Generate a new config epoch, incrementing the current epoch, assign the new epoch to this node, WITHOUT any consensus and
persist the configuration on disk before sending packets with the new configuration.
|
Mono<Long> |
clusterCountFailureReports(String nodeId)
Returns the number of failure reports for the specified node.
|
Mono<Long> |
clusterCountKeysInSlot(int slot)
Returns the number of keys in the specified Redis Cluster hash
slot . |
Mono<String> |
clusterDelSlots(int... slots)
Removes slots from the cluster node.
|
Mono<String> |
clusterDelSlotsRange(Range<Integer>... ranges)
Takes a list of slot ranges (specified by start and end slots) to remove to the node.
|
Mono<String> |
clusterFailover(boolean force)
Failover a cluster node.
|
Mono<String> |
clusterFailover(boolean force,
boolean takeOver)
Failover a cluster node.
|
Mono<String> |
clusterFlushslots()
Delete all the slots associated with the specified node.
|
Mono<String> |
clusterForget(String nodeId)
Disallow connections and remove the cluster node from the cluster.
|
Flux<K> |
clusterGetKeysInSlot(int slot,
int count)
Retrieve the list of keys within the
slot . |
Mono<String> |
clusterInfo()
Get information and statistics about the cluster viewed by the current node.
|
Mono<Long> |
clusterKeyslot(K key)
Returns an integer identifying the hash slot the specified key hashes to.
|
Mono<String> |
clusterMeet(String ip,
int port)
Meet another cluster node to include the node into the cluster.
|
Mono<String> |
clusterMyId()
Obtain the nodeId for the currently connected node.
|
Mono<String> |
clusterNodes()
Obtain details about all cluster nodes.
|
Flux<String> |
clusterReplicas(String nodeId)
List replicas for a certain node identified by its
nodeId . |
Mono<String> |
clusterReplicate(String nodeId)
Turn this node into a replica of the node with the id
nodeId . |
Mono<String> |
clusterReset(boolean hard)
Reset a node performing a soft or hard reset:
All other nodes are forgotten
All the assigned / open slots are released
If the node is a replica, it turns into a master
Only for hard reset: a new Node ID is generated
Only for hard reset: currentEpoch and configEpoch are set to 0
The new configuration is saved and the cluster state updated
If the node was a replica, the whole data set is flushed away
|
Mono<String> |
clusterSaveconfig()
Forces a node to save the nodes.conf configuration on disk.
|
Mono<String> |
clusterSetConfigEpoch(long configEpoch)
This command sets a specific config epoch in a fresh node.
|
Mono<String> |
clusterSetSlotImporting(int slot,
String nodeId)
Flag a slot as IMPORTING (incoming) from the node specified in
nodeId . |
Mono<String> |
clusterSetSlotMigrating(int slot,
String nodeId)
Flag a slot as MIGRATING (outgoing) towards the node specified in
nodeId . |
Mono<String> |
clusterSetSlotNode(int slot,
String nodeId)
Assign a slot to a node.
|
Mono<String> |
clusterSetSlotStable(int slot)
Clears migrating / importing state from the slot.
|
Mono<List<Object>> |
clusterShards()
Get array of cluster shards
|
Flux<String> |
clusterSlaves(String nodeId)
Deprecated.
since 6.1.7, use
clusterReplicas(String) instead. |
Flux<Object> |
clusterSlots()
Get array of cluster slots to node mappings.
|
Mono<String> |
readOnly()
Tells a Redis cluster replica node that the client is ok reading possibly stale data and is not interested in running
write queries.
|
Mono<String> |
readWrite()
Resets readOnly flag.
|
void |
setTimeout(Duration timeout)
Deprecated.
since 6.2. Use the corresponding
StatefulConnection.setTimeout(Duration) method
on the connection interface. To be removed with Lettuce 7.0. |
dispatch, dispatch, echo, flushCommands, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, setAutoFlushCommands, waitForReplication
aclCat, aclCat, aclDeluser, aclDryRun, aclDryRun, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoami
geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius, georadius, georadius, georadiusbymember, georadiusbymember, georadiusbymember, geosearch, geosearch, geosearchstore
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
pfadd, pfcount, pfmerge
copy, copy, del, dump, exists, expire, expire, expire, expire, expireat, expireat, expireat, expireat, expireat, expireat, expiretime, keys, keys, migrate, migrate, move, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpiretime, pttl, randomkey, rename, renamenx, restore, restore, scan, scan, scan, scan, scan, scan, scan, scan, sort, sort, sort, sort, sortReadOnly, sortReadOnly, sortReadOnly, sortReadOnly, sortStore, touch, ttl, type, unlink
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
digest, digest, eval, eval, eval, eval, evalReadOnly, evalsha, evalsha, evalshaReadOnly, scriptExists, scriptFlush, scriptFlush, scriptKill, scriptLoad, scriptLoad
bgrewriteaof, bgsave, clientCaching, clientGetname, clientGetredir, clientId, clientKill, clientKill, clientList, clientNoEvict, clientPause, clientSetname, clientTracking, clientUnblock, command, commandCount, commandInfo, commandInfo, configGet, configGet, configResetstat, configRewrite, configSet, configSet, dbsize, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, flushall, flushall, flushallAsync, flushdb, flushdb, flushdbAsync, info, info, lastsave, memoryUsage, replicaof, replicaofNoOne, save, shutdown, shutdown, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, time
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
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, 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, 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, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunion, zunion, zunionstore, zunionstore, zunionWithScores, zunionWithScores
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
append, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, decr, decrby, get, getbit, getdel, getex, getrange, getset, incr, incrby, incrbyfloat, mget, mget, mset, msetnx, psetex, set, set, setbit, setex, setGet, setGet, setnx, setrange, stralgoLcs, strlen
@Deprecated void setTimeout(Duration timeout)
StatefulConnection.setTimeout(Duration)
method
on the connection interface. To be removed with Lettuce 7.0.timeout
- the timeout valueMono<String> asking()
-ASK
redirection. The client should issue ASKING
before to
actually send the command to the target instance. See the Redis Cluster specification for more information.Mono<String> auth(CharSequence password)
password
- the passwordMono<String> auth(String username, CharSequence password)
username
- the usernamepassword
- the passwordMono<String> clusterAddSlots(int... slots)
slots
- one or more slots from 0 to 16384Mono<String> clusterBumpepoch()
Mono<Long> clusterCountFailureReports(String nodeId)
nodeId
- the node idMono<Long> clusterCountKeysInSlot(int slot)
slot
.slot
- the slotMono<String> clusterAddSlotsRange(Range<Integer>... ranges)
ranges
- a list of slot ranges (specified by start and end slots)Mono<String> clusterDelSlots(int... slots)
slots
- one or more slots from 0 to 16384Mono<String> clusterDelSlotsRange(Range<Integer>... ranges)
ranges
- a list of slot ranges (specified by start and end slots)Mono<String> clusterFailover(boolean force)
force
- do not coordinate with master if true
Mono<String> clusterFailover(boolean force, boolean takeOver)
force
- do not coordinate with master if true
takeOver
- do not coordinate with the rest of the cluster if true
Mono<String> clusterFlushslots()
Mono<String> clusterForget(String nodeId)
nodeId
- the node IdFlux<K> clusterGetKeysInSlot(int slot, int count)
slot
.slot
- the slotcount
- maximal number of keysMono<String> clusterInfo()
Mono<Long> clusterKeyslot(K key)
SlotHash.getSlot(byte[])
. If not, call Houston and report that we've got a problem.key
- the key.Mono<String> clusterMeet(String ip, int port)
ip
- IP address of the hostport
- port number.Mono<String> clusterMyId()
Mono<String> clusterNodes()
ClusterPartitionParser.parse(java.util.List<java.lang.Object>)
Mono<String> clusterReplicate(String nodeId)
nodeId
.nodeId
- master node idFlux<String> clusterReplicas(String nodeId)
nodeId
. Can be parsed using
ClusterPartitionParser.parse(java.util.List<java.lang.Object>)
nodeId
- node id of the master nodeclusterNodes()
but one line per replica.Mono<String> clusterReset(boolean hard)
hard
- true
for hard reset. Generates a new nodeId and currentEpoch/configEpoch are set to 0Mono<String> clusterSaveconfig()
OK
or an error if the operation fails.Mono<String> clusterSetConfigEpoch(long configEpoch)
configEpoch
- the config epochOK
or an error if the operation fails.Mono<String> clusterSetSlotImporting(int slot, String nodeId)
nodeId
.slot
- the slotnodeId
- the id of the node is the master of the slotMono<String> clusterSetSlotMigrating(int slot, String nodeId)
nodeId
. The slot must be handled by
the current node in order to be migrated.slot
- the slotnodeId
- the id of the node is targeted to become the master for the slotMono<String> clusterSetSlotNode(int slot, String nodeId)
nodeId
slot
- the slotnodeId
- the id of the node that will become the master for the slotMono<String> clusterSetSlotStable(int slot)
slot
- the slotMono<List<Object>> clusterShards()
@Deprecated Flux<String> clusterSlaves(String nodeId)
clusterReplicas(String)
instead.nodeId
. Can be parsed using
ClusterPartitionParser.parse(java.util.List<java.lang.Object>)
nodeId
- node id of the master nodeclusterNodes()
but one line per replica.Flux<Object> clusterSlots()
Mono<String> readOnly()
readOnly
in interface BaseRedisReactiveCommands<K,V>
Copyright © 2023 lettuce.io. All rights reserved.