K - Key type.V - Value type.public interface RedisSentinelAsyncCommands<K,V> extends Closeable, RedisSentinelAsyncConnection<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close the underlying connection.
|
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() |
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 slaves for the master with the specified name.
|
RedisFuture<SocketAddress> getMasterAddrByName(K key)
getMasterAddrByName in interface RedisSentinelAsyncConnection<K,V>key - the keyRedisFuture<List<Map<K,V>>> masters()
masters in interface RedisSentinelAsyncConnection<K,V>RedisFuture<Map<K,V>> master(K key)
master in interface RedisSentinelAsyncConnection<K,V>key - the keyRedisFuture<List<Map<K,V>>> slaves(K key)
slaves in interface RedisSentinelAsyncConnection<K,V>key - the keyRedisFuture<Long> reset(K key)
reset in interface RedisSentinelAsyncConnection<K,V>key - the keyRedisFuture<String> failover(K key)
failover in interface RedisSentinelAsyncConnection<K,V>key - the master idRedisFuture<String> monitor(K key, String ip, int port, int quorum)
monitor in interface RedisSentinelAsyncConnection<K,V>key - the keyip - the IP addressport - the portquorum - the quorum countRedisFuture<String> set(K key, String option, V value)
set in interface RedisSentinelAsyncConnection<K,V>key - the keyoption - the optionvalue - the valueOK if SET was executed correctly.RedisFuture<String> remove(K key)
remove in interface RedisSentinelAsyncConnection<K,V>key - the keyRedisFuture<String> ping()
ping in interface RedisSentinelAsyncConnection<K,V>void close()
close in interface AutoCloseableclose in interface Closeableclose in interface RedisSentinelAsyncConnection<K,V>boolean isOpen()
isOpen in interface RedisSentinelAsyncConnection<K,V>StatefulRedisSentinelConnection<K,V> getStatefulConnection()
Copyright © 2016. All rights reserved.