K
- Key type.V
- Value type.public interface RedisSentinelCommands<K,V> extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
close()
close the underlying connection.
|
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() |
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 slaves for the master with the specified name.
|
SocketAddress getMasterAddrByName(K key)
key
- the keyList<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.String ping()
void close()
close
in interface AutoCloseable
close
in interface Closeable
boolean isOpen()
StatefulRedisSentinelConnection<K,V> getStatefulConnection()
Copyright © 2016. All rights reserved.