Interface RedisSentinelAsyncCommands<K,V>
-
- Type Parameters:
K
- Key type.V
- Value type.
- All Known Implementing Classes:
RedisSentinelAsyncCommandsImpl
public interface RedisSentinelAsyncCommands<K,V>
Asynchronous executed commands for Redis Sentinel.- Since:
- 4.0
- Author:
- Mark Paluch
- Generated class:
- by io.lettuce.apigenerator.CreateAsyncApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description RedisFuture<K>
clientGetname()
Get the current connection name.RedisFuture<String>
clientInfo()
Get the list of the current client connection.RedisFuture<Long>
clientKill(KillArgs killArgs)
Kill connections of clients which are filtered bykillArgs
.RedisFuture<String>
clientKill(String addr)
Kill the connection of a client identified by ip:port.RedisFuture<String>
clientList()
Get the list of client connections.RedisFuture<String>
clientList(ClientListArgs clientListArgs)
Get the list of client connections which are filtered byclientListArgs
.RedisFuture<String>
clientPause(long timeout)
Stop processing commands from clients for some time.RedisFuture<String>
clientSetinfo(String key, String value)
Assign various info attributes to the current connection.RedisFuture<String>
clientSetname(K name)
Set the current connection name.<T> RedisFuture<T>
dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output)
Dispatch a command to the Redis Server.<T> RedisFuture<T>
dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output, CommandArgs<K,V> args)
Dispatch a command to the Redis Server.RedisFuture<String>
failover(K key)
Perform a failover.RedisFuture<SocketAddress>
getMasterAddrByName(K key)
Return the ip and port number of the master with that name.StatefulRedisSentinelConnection<K,V>
getStatefulConnection()
RedisFuture<String>
info()
Get information and statistics about the server.RedisFuture<String>
info(String section)
Get information and statistics about the server.boolean
isOpen()
RedisFuture<Map<K,V>>
master(K key)
Show the state and info of the specified master.RedisFuture<List<Map<K,V>>>
masters()
Enumerates all the monitored masters and their states.RedisFuture<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.RedisFuture<String>
ping()
Ping the server.RedisFuture<String>
remove(K key)
remove the specified master.RedisFuture<List<Map<K,V>>>
replicas(K key)
Provides a list of replicas for the master with the specified name.RedisFuture<Long>
reset(K key)
This command will reset all the masters with matching name.RedisFuture<String>
set(K key, String option, V value)
Multiple option / value pairs can be specified (or none at all).RedisFuture<List<Map<K,V>>>
slaves(K key)
Deprecated.since 6.2, use #replicas(Object) instead.
-
-
-
Method Detail
-
getMasterAddrByName
RedisFuture<SocketAddress> getMasterAddrByName(K key)
Return the ip and port number of the master with that name.- Parameters:
key
- the key.- Returns:
- SocketAddress.
-
masters
RedisFuture<List<Map<K,V>>> masters()
Enumerates all the monitored masters and their states.- Returns:
- Map<K, V>>.
-
master
RedisFuture<Map<K,V>> master(K key)
Show the state and info of the specified master.- Parameters:
key
- the key.- Returns:
- Map<K, V>.
-
slaves
@Deprecated RedisFuture<List<Map<K,V>>> slaves(K key)
Deprecated.since 6.2, use #replicas(Object) instead.Provides a list of replicas for the master with the specified name.- Parameters:
key
- the key.- Returns:
- List<Map<K, V>>.
-
reset
RedisFuture<Long> reset(K key)
This command will reset all the masters with matching name.- Parameters:
key
- the key.- Returns:
- Long.
-
replicas
RedisFuture<List<Map<K,V>>> replicas(K key)
Provides a list of replicas for the master with the specified name.- Parameters:
key
- the key.- Returns:
- List<Map<K, V>>.
- Since:
- 6.2
-
failover
RedisFuture<String> failover(K key)
Perform a failover.- Parameters:
key
- the master id.- Returns:
- String.
-
monitor
RedisFuture<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.- Parameters:
key
- the key.ip
- the IP address.port
- the port.quorum
- the quorum count.- Returns:
- String.
-
set
RedisFuture<String> set(K key, String option, V value)
Multiple option / value pairs can be specified (or none at all).- Parameters:
key
- the key.option
- the option.value
- the value.- Returns:
- String simple-string-reply
OK
ifSET
was executed correctly.
-
remove
RedisFuture<String> remove(K key)
remove the specified master.- Parameters:
key
- the key.- Returns:
- String.
-
clientGetname
RedisFuture<K> clientGetname()
Get the current connection name.- Returns:
- K bulk-string-reply The connection name, or a null bulk reply if no name is set.
-
clientSetname
RedisFuture<String> clientSetname(K name)
Set the current connection name.- Parameters:
name
- the client name.- Returns:
- simple-string-reply
OK
if the connection name was successfully set.
-
clientSetinfo
RedisFuture<String> clientSetinfo(String key, String value)
Assign various info attributes to the current connection.- Parameters:
key
- the key.value
- the value.- Returns:
- simple-string-reply
OK
if the connection name was successfully set. - Since:
- 6.3
-
clientKill
RedisFuture<String> clientKill(String addr)
Kill the connection of a client identified by ip:port.- Parameters:
addr
- ip:port.- Returns:
- String simple-string-reply
OK
if the connection exists and has been closed.
-
clientKill
RedisFuture<Long> clientKill(KillArgs killArgs)
Kill connections of clients which are filtered bykillArgs
.- Parameters:
killArgs
- args for the kill operation.- Returns:
- Long integer-reply number of killed connections.
-
clientPause
RedisFuture<String> clientPause(long timeout)
Stop processing commands from clients for some time.- Parameters:
timeout
- the timeout value in milliseconds.- Returns:
- String simple-string-reply The command returns OK or an error if the timeout is invalid.
-
clientList
RedisFuture<String> clientList()
Get the list of client connections.- Returns:
- String bulk-string-reply a unique string, formatted as follows: One client connection per line (separated by LF), each line is composed of a succession of property=value fields separated by a space character.
-
clientList
RedisFuture<String> clientList(ClientListArgs clientListArgs)
Get the list of client connections which are filtered byclientListArgs
.- Returns:
- String bulk-string-reply a unique string, formatted as follows: One client connection per line (separated by LF), each line is composed of a succession of property=value fields separated by a space character.
- Since:
- 6.3
-
clientInfo
RedisFuture<String> clientInfo()
Get the list of the current client connection.- Returns:
- String bulk-string-reply a unique string, formatted as a succession of property=value fields separated by a space character.
- Since:
- 6.3
-
info
RedisFuture<String> info()
Get information and statistics about the server.- Returns:
- String bulk-string-reply as a collection of text lines.
-
info
RedisFuture<String> info(String section)
Get information and statistics about the server.- Parameters:
section
- the section type: string.- Returns:
- String bulk-string-reply as a collection of text lines.
-
ping
RedisFuture<String> ping()
Ping the server.- Returns:
- String simple-string-reply.
-
dispatch
<T> RedisFuture<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output)
Dispatch a command to the Redis Server. Please note the command output type must fit to the command response.- Type Parameters:
T
- response type.- Parameters:
type
- the command, must not benull
.output
- the command output, must not benull
.- Returns:
- the command response.
- Since:
- 6.0.2
-
dispatch
<T> RedisFuture<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output, CommandArgs<K,V> args)
Dispatch a command to the Redis Server. Please note the command output type must fit to the command response.- Type Parameters:
T
- response type.- Parameters:
type
- the command, must not benull
.output
- the command output, must not benull
.args
- the command arguments, must not benull
.- Returns:
- the command response.
- Since:
- 6.0.2
-
isOpen
boolean isOpen()
- Returns:
true
if the connection is open (connected and not closed).
-
getStatefulConnection
StatefulRedisSentinelConnection<K,V> getStatefulConnection()
- Returns:
- the underlying connection.
-
-