K - Key type.V - Value type.public class RedisSentinelReactiveCommandsImpl<K,V> extends Object implements RedisSentinelReactiveCommands<K,V>
| Constructor and Description |
|---|
RedisSentinelReactiveCommandsImpl(StatefulConnection<K,V> connection,
RedisCodec<K,V> codec) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close the underlying connection.
|
<T,R> R |
createDissolvingObservable(java.util.function.Supplier<RedisCommand<K,V,T>> commandSupplier) |
<T> Observable<T> |
createObservable(java.util.function.Supplier<RedisCommand<K,V,T>> commandSupplier) |
Observable<String> |
failover(K key)
Perform a failover.
|
Observable<SocketAddress> |
getMasterAddrByName(K key)
Return the ip and port number of the master with that name.
|
StatefulRedisSentinelConnection<K,V> |
getStatefulConnection() |
boolean |
isOpen() |
Observable<Map<K,V>> |
master(K key)
Show the state and info of the specified master.
|
Observable<Map<K,V>> |
masters()
Enumerates all the monitored masters and their states.
|
Observable<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.
|
Observable<String> |
ping()
Ping the server.
|
Observable<String> |
remove(K key)
remove the specified master.
|
Observable<Long> |
reset(K key)
This command will reset all the masters with matching name.
|
Observable<String> |
set(K key,
String option,
V value)
Multiple option / value pairs can be specified (or none at all).
|
Observable<Map<K,V>> |
slaves(K key)
Provides a list of slaves for the master with the specified name.
|
public RedisSentinelReactiveCommandsImpl(StatefulConnection<K,V> connection, RedisCodec<K,V> codec)
public Observable<SocketAddress> getMasterAddrByName(K key)
RedisSentinelReactiveCommandsgetMasterAddrByName in interface RedisSentinelReactiveCommands<K,V>key - the keypublic Observable<Map<K,V>> masters()
RedisSentinelReactiveCommandsmasters in interface RedisSentinelReactiveCommands<K,V>public Observable<Map<K,V>> master(K key)
RedisSentinelReactiveCommandsmaster in interface RedisSentinelReactiveCommands<K,V>key - the keypublic Observable<Map<K,V>> slaves(K key)
RedisSentinelReactiveCommandsslaves in interface RedisSentinelReactiveCommands<K,V>key - the keypublic Observable<Long> reset(K key)
RedisSentinelReactiveCommandsreset in interface RedisSentinelReactiveCommands<K,V>key - the keypublic Observable<String> failover(K key)
RedisSentinelReactiveCommandsfailover in interface RedisSentinelReactiveCommands<K,V>key - the master idpublic Observable<String> monitor(K key, String ip, int port, int quorum)
RedisSentinelReactiveCommandsmonitor in interface RedisSentinelReactiveCommands<K,V>key - the keyip - the IP addressport - the portquorum - the quorum countpublic Observable<String> set(K key, String option, V value)
RedisSentinelReactiveCommandsset in interface RedisSentinelReactiveCommands<K,V>key - the keyoption - the optionvalue - the valueOK if SET was executed correctly.public Observable<String> remove(K key)
RedisSentinelReactiveCommandsremove in interface RedisSentinelReactiveCommands<K,V>key - the keypublic Observable<String> ping()
RedisSentinelReactiveCommandsping in interface RedisSentinelReactiveCommands<K,V>public void close()
RedisSentinelReactiveCommandsclose in interface RedisSentinelReactiveCommands<K,V>close in interface Closeableclose in interface AutoCloseablepublic boolean isOpen()
isOpen in interface RedisSentinelReactiveCommands<K,V>public StatefulRedisSentinelConnection<K,V> getStatefulConnection()
getStatefulConnection in interface RedisSentinelReactiveCommands<K,V>public <T> Observable<T> createObservable(java.util.function.Supplier<RedisCommand<K,V,T>> commandSupplier)
public <T,R> R createDissolvingObservable(java.util.function.Supplier<RedisCommand<K,V,T>> commandSupplier)
Copyright © 2016. All rights reserved.