K
- Key type.V
- Value type.public interface RedisSentinelCommands<K,V>
Modifier and Type | Method and Description |
---|---|
K |
clientGetname()
Get the current connection name.
|
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 |
clientPause(long timeout)
Stop processing commands from clients for some time.
|
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.
|
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)
Provides a list of replicas for the master with the specified name.
|
SocketAddress getMasterAddrByName(K key)
key
- the key.List<Map<K,V>> masters()
Map<K,V> master(K key)
key
- the keyList<Map<K,V>> slaves(K key)
key
- the keyLong reset(K key)
key
- the keyString monitor(K key, String ip, int port, int quorum)
key
- the keyip
- the IP addressport
- the portquorum
- the quorum countString set(K key, String option, V value)
key
- the keyoption
- the optionvalue
- the valueOK
if SET
was executed correctly.K clientGetname()
String clientSetname(K name)
name
- the client nameOK
if the connection name was successfully set.String clientKill(String addr)
addr
- ip:portOK
if the connection exists and has been closedLong clientKill(KillArgs killArgs)
killArgs
killArgs
- args for the kill operationString clientPause(long timeout)
timeout
- the timeout value in millisecondsString clientList()
String info()
String info(String section)
section
- the section type: stringString ping()
<T> T dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output)
T
- response typetype
- 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 typetype
- 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 © 2021 lettuce.io. All rights reserved.