K - Key type.V - Value type.public class RedisSentinelAsyncCommandsImpl<K,V> extends Object implements RedisSentinelAsyncCommands<K,V>
| Constructor and Description |
|---|
RedisSentinelAsyncCommandsImpl(StatefulConnection<K,V> connection,
RedisCodec<K,V> codec) |
| Modifier and Type | Method and Description |
|---|---|
RedisFuture<K> |
clientGetname()
Get the current connection name.
|
RedisFuture<Long> |
clientKill(KillArgs killArgs)
Kill connections of clients which are filtered by
killArgs. |
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> |
clientPause(long timeout)
Stop processing commands from clients for some time.
|
RedisFuture<String> |
clientSetname(K name)
Set the current connection name.
|
void |
close() |
<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.
|
<T> AsyncCommand<K,V,T> |
dispatch(RedisCommand<K,V,T> cmd) |
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<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)
Provides a list of replicas for the master with the specified name.
|
public RedisSentinelAsyncCommandsImpl(StatefulConnection<K,V> connection, RedisCodec<K,V> codec)
public RedisFuture<SocketAddress> getMasterAddrByName(K key)
RedisSentinelAsyncCommandsgetMasterAddrByName in interface RedisSentinelAsyncCommands<K,V>key - the key.public RedisFuture<List<Map<K,V>>> masters()
RedisSentinelAsyncCommandsmasters in interface RedisSentinelAsyncCommands<K,V>public RedisFuture<Map<K,V>> master(K key)
RedisSentinelAsyncCommandsmaster in interface RedisSentinelAsyncCommands<K,V>key - the key.public RedisFuture<List<Map<K,V>>> slaves(K key)
RedisSentinelAsyncCommandsslaves in interface RedisSentinelAsyncCommands<K,V>key - the key.public RedisFuture<Long> reset(K key)
RedisSentinelAsyncCommandsreset in interface RedisSentinelAsyncCommands<K,V>key - the key.public RedisFuture<String> failover(K key)
RedisSentinelAsyncCommandsfailover in interface RedisSentinelAsyncCommands<K,V>key - the master id.public RedisFuture<String> monitor(K key, String ip, int port, int quorum)
RedisSentinelAsyncCommandsmonitor in interface RedisSentinelAsyncCommands<K,V>key - the key.ip - the IP address.port - the port.quorum - the quorum count.public RedisFuture<String> set(K key, String option, V value)
RedisSentinelAsyncCommandsset in interface RedisSentinelAsyncCommands<K,V>key - the key.option - the option.value - the value.OK if SET was executed correctly.public RedisFuture<String> remove(K key)
RedisSentinelAsyncCommandsremove in interface RedisSentinelAsyncCommands<K,V>key - the key.public RedisFuture<String> ping()
RedisSentinelAsyncCommandsping in interface RedisSentinelAsyncCommands<K,V>public RedisFuture<K> clientGetname()
RedisSentinelAsyncCommandsclientGetname in interface RedisSentinelAsyncCommands<K,V>public RedisFuture<String> clientSetname(K name)
RedisSentinelAsyncCommandsclientSetname in interface RedisSentinelAsyncCommands<K,V>name - the client name.OK if the connection name was successfully set.public RedisFuture<String> clientKill(String addr)
RedisSentinelAsyncCommandsclientKill in interface RedisSentinelAsyncCommands<K,V>addr - ip:port.OK if the connection exists and has been closed.public RedisFuture<Long> clientKill(KillArgs killArgs)
RedisSentinelAsyncCommandskillArgs.clientKill in interface RedisSentinelAsyncCommands<K,V>killArgs - args for the kill operation.public RedisFuture<String> clientPause(long timeout)
RedisSentinelAsyncCommandsclientPause in interface RedisSentinelAsyncCommands<K,V>timeout - the timeout value in milliseconds.public RedisFuture<String> clientList()
RedisSentinelAsyncCommandsclientList in interface RedisSentinelAsyncCommands<K,V>public RedisFuture<String> info()
RedisSentinelAsyncCommandsinfo in interface RedisSentinelAsyncCommands<K,V>public RedisFuture<String> info(String section)
RedisSentinelAsyncCommandsinfo in interface RedisSentinelAsyncCommands<K,V>section - the section type: string.public <T> RedisFuture<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output)
RedisSentinelAsyncCommandsdispatch in interface RedisSentinelAsyncCommands<K,V>T - response type.type - the command, must not be null.output - the command output, must not be null.public <T> RedisFuture<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output, CommandArgs<K,V> args)
RedisSentinelAsyncCommandsdispatch in interface RedisSentinelAsyncCommands<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 <T> AsyncCommand<K,V,T> dispatch(RedisCommand<K,V,T> cmd)
public void close()
public boolean isOpen()
isOpen in interface RedisSentinelAsyncCommands<K,V>true if the connection is open (connected and not closed).public StatefulRedisSentinelConnection<K,V> getStatefulConnection()
getStatefulConnection in interface RedisSentinelAsyncCommands<K,V>Copyright © 2020 lettuce.io. All rights reserved.