K
- Key type.V
- Value type.public class RedisSentinelReactiveCommandsImpl<K,V> extends AbstractRedisReactiveCommands<K,V> implements RedisSentinelReactiveCommands<K,V>
Constructor and Description |
---|
RedisSentinelReactiveCommandsImpl(StatefulConnection<K,V> connection,
RedisCodec<K,V> codec) |
Modifier and Type | Method and Description |
---|---|
Mono<K> |
clientGetname()
Get the current connection name.
|
Mono<String> |
clientInfo()
Get the list of the current client connection.
|
Mono<Long> |
clientKill(KillArgs killArgs)
Kill connections of clients which are filtered by
killArgs . |
Mono<String> |
clientKill(String addr)
Kill the connection of a client identified by ip:port.
|
Mono<String> |
clientList()
Get the list of client connections.
|
Mono<String> |
clientList(ClientListArgs clientListArgs)
Get the list of client connections which are filtered by
clientListArgs . |
Mono<String> |
clientPause(long timeout)
Stop processing commands from clients for some time.
|
Mono<String> |
clientSetinfo(String key,
String value)
Assign various info attributes to the current connection.
|
Mono<String> |
clientSetname(K name)
Set the current connection name.
|
void |
close() |
<T> Flux<T> |
dispatch(ProtocolKeyword type,
CommandOutput<K,V,?> output)
Dispatch a command to the Redis Server.
|
<T> Flux<T> |
dispatch(ProtocolKeyword type,
CommandOutput<K,V,?> output,
CommandArgs<K,V> args)
Dispatch a command to the Redis Server.
|
Mono<String> |
failover(K key)
Perform a failover.
|
Mono<SocketAddress> |
getMasterAddrByName(K key)
Return the ip and port number of the master with that name.
|
StatefulRedisSentinelConnection<K,V> |
getStatefulConnection() |
Mono<String> |
info()
Get information and statistics about the server.
|
Mono<String> |
info(String section)
Get information and statistics about the server.
|
boolean |
isOpen() |
Mono<Map<K,V>> |
master(K key)
Show the state and info of the specified master.
|
Flux<Map<K,V>> |
masters()
Enumerates all the monitored masters and their states.
|
Mono<String> |
monitor(K key,
String ip,
int port,
int quorum)
This command tells the Sentinel to start monitoring a new master with the specified name, ip, port, and quorum.
|
Mono<String> |
ping()
Ping the server.
|
Mono<String> |
remove(K key)
remove the specified master.
|
Flux<Map<K,V>> |
replicas(K key)
Provides a list of replicas for the master with the specified name.
|
Mono<Long> |
reset(K key)
This command will reset all the masters with matching name.
|
Mono<String> |
set(K key,
String option,
V value)
Multiple option / value pairs can be specified (or none at all).
|
Flux<Map<K,V>> |
slaves(K key)
Provides a list of replicas for the master with the specified name.
|
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, clientGetredir, clientId, clientNoEvict, clientTracking, clientUnblock, clusterAddSlots, clusterAddSlotsRange, clusterBumpepoch, clusterCountFailureReports, clusterCountKeysInSlot, clusterDelSlots, clusterDelSlotsRange, clusterFailover, clusterFailover, clusterFlushslots, clusterForget, clusterGetKeysInSlot, 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, dbsize, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, decr, decrby, del, del, digest, digest, discard, dump, echo, eval, eval, eval, eval, evalReadOnly, evalsha, evalsha, evalshaReadOnly, exec, exists, exists, exists, expire, expire, expire, expire, expireat, expireat, expireat, expireat, expireat, expireat, expiretime, fcall, fcall, fcallReadOnly, fcallReadOnly, flushall, flushall, flushallAsync, flushCommands, flushdb, flushdb, flushdbAsync, functionDump, functionFlush, functionKill, functionList, functionList, functionLoad, functionLoad, functionRestore, functionRestore, geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius_ro, georadius_ro, georadius, georadius, georadius, georadiusbymember_ro, georadiusbymember_ro, georadiusbymember, georadiusbymember, georadiusbymember, 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, keys, keys, lastsave, lindex, linsert, llen, lmove, lmpop, lpop, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, memoryUsage, mget, mget, mget, mget, mget, migrate, migrate, move, mset, msetnx, multi, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpiretime, pfadd, pfadd, pfcount, pfcount, pfmerge, pfmerge, psetex, pttl, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, randomkey, readOnly, readWrite, rename, renamenx, replicaof, replicaofNoOne, reset, restore, restore, role, rpop, rpop, rpoplpush, rpush, rpushx, sadd, save, scan, scan, scan, scan, scan, scan, scan, scan, scard, scriptExists, scriptFlush, scriptFlush, scriptKill, scriptLoad, scriptLoad, sdiff, sdiff, sdiffstore, select, set, set, setAutoFlushCommands, setbit, setex, setGet, setGet, setnx, setrange, setTimeout, shutdown, 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, touch, touch, ttl, type, unlink, unlink, 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
public RedisSentinelReactiveCommandsImpl(StatefulConnection<K,V> connection, RedisCodec<K,V> codec)
public Mono<SocketAddress> getMasterAddrByName(K key)
RedisSentinelReactiveCommands
getMasterAddrByName
in interface RedisSentinelReactiveCommands<K,V>
key
- the key.public Flux<Map<K,V>> masters()
RedisSentinelReactiveCommands
masters
in interface RedisSentinelReactiveCommands<K,V>
public Mono<Map<K,V>> master(K key)
RedisSentinelReactiveCommands
master
in interface RedisSentinelReactiveCommands<K,V>
key
- the key.public Flux<Map<K,V>> slaves(K key)
RedisSentinelReactiveCommands
slaves
in interface RedisSentinelReactiveCommands<K,V>
key
- the key.public Flux<Map<K,V>> replicas(K key)
RedisSentinelReactiveCommands
replicas
in interface RedisSentinelReactiveCommands<K,V>
key
- the key.public Mono<Long> reset(K key)
RedisSentinelReactiveCommands
reset
in interface RedisSentinelReactiveCommands<K,V>
key
- the key.public Mono<String> failover(K key)
RedisSentinelReactiveCommands
failover
in interface RedisSentinelReactiveCommands<K,V>
key
- the master id.public Mono<String> monitor(K key, String ip, int port, int quorum)
RedisSentinelReactiveCommands
monitor
in interface RedisSentinelReactiveCommands<K,V>
key
- the key.ip
- the IP address.port
- the port.quorum
- the quorum count.public Mono<String> set(K key, String option, V value)
RedisSentinelReactiveCommands
set
in interface RedisSentinelReactiveCommands<K,V>
key
- the key.option
- the option.value
- the value.OK
if SET
was executed correctly.public Mono<String> remove(K key)
RedisSentinelReactiveCommands
remove
in interface RedisSentinelReactiveCommands<K,V>
key
- the key.public Mono<String> ping()
BaseRedisReactiveCommands
ping
in interface BaseRedisReactiveCommands<K,V>
ping
in interface RedisSentinelReactiveCommands<K,V>
ping
in class AbstractRedisReactiveCommands<K,V>
public Mono<K> clientGetname()
RedisServerReactiveCommands
clientGetname
in interface RedisServerReactiveCommands<K,V>
clientGetname
in interface RedisSentinelReactiveCommands<K,V>
clientGetname
in class AbstractRedisReactiveCommands<K,V>
public Mono<String> clientSetname(K name)
RedisServerReactiveCommands
clientSetname
in interface RedisServerReactiveCommands<K,V>
clientSetname
in interface RedisSentinelReactiveCommands<K,V>
clientSetname
in class AbstractRedisReactiveCommands<K,V>
name
- the client name.OK
if the connection name was successfully set.public Mono<String> clientSetinfo(String key, String value)
RedisServerReactiveCommands
clientSetinfo
in interface RedisServerReactiveCommands<K,V>
clientSetinfo
in interface RedisSentinelReactiveCommands<K,V>
clientSetinfo
in class AbstractRedisReactiveCommands<K,V>
key
- the key.value
- the value.OK
if the connection name was successfully set.public Mono<String> clientKill(String addr)
RedisServerReactiveCommands
clientKill
in interface RedisServerReactiveCommands<K,V>
clientKill
in interface RedisSentinelReactiveCommands<K,V>
clientKill
in class AbstractRedisReactiveCommands<K,V>
addr
- ip:port.OK
if the connection exists and has been closed.public Mono<Long> clientKill(KillArgs killArgs)
RedisServerReactiveCommands
killArgs
.clientKill
in interface RedisServerReactiveCommands<K,V>
clientKill
in interface RedisSentinelReactiveCommands<K,V>
clientKill
in class AbstractRedisReactiveCommands<K,V>
killArgs
- args for the kill operation.public Mono<String> clientPause(long timeout)
RedisServerReactiveCommands
clientPause
in interface RedisServerReactiveCommands<K,V>
clientPause
in interface RedisSentinelReactiveCommands<K,V>
clientPause
in class AbstractRedisReactiveCommands<K,V>
timeout
- the timeout value in milliseconds.public Mono<String> clientList()
RedisServerReactiveCommands
clientList
in interface RedisServerReactiveCommands<K,V>
clientList
in interface RedisSentinelReactiveCommands<K,V>
clientList
in class AbstractRedisReactiveCommands<K,V>
public Mono<String> clientList(ClientListArgs clientListArgs)
RedisServerReactiveCommands
clientListArgs
.clientList
in interface RedisServerReactiveCommands<K,V>
clientList
in interface RedisSentinelReactiveCommands<K,V>
clientList
in class AbstractRedisReactiveCommands<K,V>
public Mono<String> clientInfo()
RedisServerReactiveCommands
clientInfo
in interface RedisServerReactiveCommands<K,V>
clientInfo
in interface RedisSentinelReactiveCommands<K,V>
clientInfo
in class AbstractRedisReactiveCommands<K,V>
public Mono<String> info()
RedisServerReactiveCommands
info
in interface RedisServerReactiveCommands<K,V>
info
in interface RedisSentinelReactiveCommands<K,V>
info
in class AbstractRedisReactiveCommands<K,V>
public Mono<String> info(String section)
RedisServerReactiveCommands
info
in interface RedisServerReactiveCommands<K,V>
info
in interface RedisSentinelReactiveCommands<K,V>
info
in class AbstractRedisReactiveCommands<K,V>
section
- the section type: string.public <T> Flux<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,?> output)
BaseRedisReactiveCommands
dispatch
in interface BaseRedisReactiveCommands<K,V>
dispatch
in interface RedisSentinelReactiveCommands<K,V>
dispatch
in class AbstractRedisReactiveCommands<K,V>
T
- response type.type
- the command, must not be null
.output
- the command output, must not be null
.public <T> Flux<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,?> output, CommandArgs<K,V> args)
BaseRedisReactiveCommands
dispatch
in interface BaseRedisReactiveCommands<K,V>
dispatch
in interface RedisSentinelReactiveCommands<K,V>
dispatch
in class AbstractRedisReactiveCommands<K,V>
T
- response type.type
- the command, must not be null
.output
- the command output, must not be null
.args
- the command arguments, must not be null
.public void close()
close
in class AbstractRedisReactiveCommands<K,V>
public boolean isOpen()
isOpen
in interface BaseRedisReactiveCommands<K,V>
isOpen
in interface RedisSentinelReactiveCommands<K,V>
isOpen
in class AbstractRedisReactiveCommands<K,V>
true
if the connection is open (connected and not closed).public StatefulRedisSentinelConnection<K,V> getStatefulConnection()
getStatefulConnection
in interface RedisSentinelReactiveCommands<K,V>
Copyright © 2023 lettuce.io. All rights reserved.