K
- Key type.V
- Value type.public interface RedisSentinelCommands<K,V>
Modifier and Type | Method and Description |
---|---|
K |
clientGetname()
Get the current connection name.
|
String |
clientInfo()
Get the list of the current client connection.
|
Long |
clientKill(KillArgs killArgs)
Kill connections of clients which are filtered by
killArgs . |
String |
clientKill(String addr)
Kill the connection of a client identified by ip:port.
|
String |
clientList()
Get the list of client connections.
|
String |
clientList(ClientListArgs clientListArgs)
Get the list of client connections which are filtered by
clientListArgs . |
String |
clientPause(long timeout)
Stop processing commands from clients for some time.
|
String |
clientSetinfo(String key,
String value)
Assign various info attributes to the current connection.
|
String |
clientSetname(K name)
Set the current connection name.
|
<T> T |
dispatch(ProtocolKeyword type,
CommandOutput<K,V,T> output)
Dispatch a command to the Redis Server.
|
<T> T |
dispatch(ProtocolKeyword type,
CommandOutput<K,V,T> output,
CommandArgs<K,V> args)
Dispatch a command to the Redis Server.
|
String |
failover(K key)
Perform a failover.
|
SocketAddress |
getMasterAddrByName(K key)
Return the ip and port number of the master with that name.
|
StatefulRedisSentinelConnection<K,V> |
getStatefulConnection() |
String |
info()
Get information and statistics about the server.
|
String |
info(String section)
Get information and statistics about the server.
|
boolean |
isOpen() |
Map<K,V> |
master(K key)
Show the state and info of the specified master.
|
List<Map<K,V>> |
masters()
Enumerates all the monitored masters and their states.
|
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.
|
String |
ping()
Ping the server.
|
String |
remove(K key)
remove the specified master.
|
List<Map<K,V>> |
replicas(K key)
Provides a list of replicas for the master with the specified name.
|
Long |
reset(K key)
This command will reset all the masters with matching name.
|
String |
set(K key,
String option,
V value)
Multiple option / value pairs can be specified (or none at all).
|
List<Map<K,V>> |
slaves(K key)
Deprecated.
since 6.2, use #replicas(Object) instead.
|
SocketAddress getMasterAddrByName(K key)
key
- the key.List<Map<K,V>> masters()
Map<K,V> master(K key)
key
- the key.@Deprecated List<Map<K,V>> slaves(K key)
key
- the key.Long reset(K key)
key
- the key.List<Map<K,V>> replicas(K key)
key
- the key.String failover(K key)
key
- the master id.String monitor(K key, String ip, int port, int quorum)
key
- the key.ip
- the IP address.port
- the port.quorum
- the quorum count.String set(K key, String option, V value)
key
- the key.option
- the option.value
- the value.OK
if SET
was executed correctly.String remove(K key)
key
- the key.K clientGetname()
String clientSetname(K name)
name
- the client name.OK
if the connection name was successfully set.String clientSetinfo(String key, String value)
key
- the key.value
- the value.OK
if the connection name was successfully set.String clientKill(String addr)
addr
- ip:port.OK
if the connection exists and has been closed.Long clientKill(KillArgs killArgs)
killArgs
.killArgs
- args for the kill operation.String clientPause(long timeout)
timeout
- the timeout value in milliseconds.String clientList()
String clientList(ClientListArgs clientListArgs)
clientListArgs
.String clientInfo()
String info()
String info(String section)
section
- the section type: string.String ping()
<T> T dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output)
T
- response type.type
- the command, must not be null
.output
- the command output, must not be null
.<T> T dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output, CommandArgs<K,V> args)
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
.boolean isOpen()
true
if the connection is open (connected and not closed).StatefulRedisSentinelConnection<K,V> getStatefulConnection()
Copyright © 2024 lettuce.io. All rights reserved.