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 |
|---|---|
rx.Observable<K> |
clientGetname()
Get the current connection name.
|
rx.Observable<Long> |
clientKill(KillArgs killArgs)
Kill connections of clients which are filtered by
killArgs |
rx.Observable<String> |
clientKill(String addr)
Kill the connection of a client identified by ip:port.
|
rx.Observable<String> |
clientList()
Get the list of client connections.
|
rx.Observable<String> |
clientPause(long timeout)
Stop processing commands from clients for some time.
|
rx.Observable<String> |
clientSetname(K name)
Set the current connection name.
|
void |
close()
close the underlying connection.
|
<T,R> R |
createDissolvingObservable(Supplier<RedisCommand<K,V,T>> commandSupplier) |
<T> rx.Observable<T> |
createObservable(Supplier<RedisCommand<K,V,T>> commandSupplier) |
rx.Observable<String> |
failover(K key)
Perform a failover.
|
rx.Observable<SocketAddress> |
getMasterAddrByName(K key)
Return the ip and port number of the master with that name.
|
StatefulRedisSentinelConnection<K,V> |
getStatefulConnection() |
rx.Observable<String> |
info()
Get information and statistics about the server.
|
rx.Observable<String> |
info(String section)
Get information and statistics about the server.
|
boolean |
isOpen() |
rx.Observable<Map<K,V>> |
master(K key)
Show the state and info of the specified master.
|
rx.Observable<Map<K,V>> |
masters()
Enumerates all the monitored masters and their states.
|
rx.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.
|
rx.Observable<String> |
ping()
Ping the server.
|
rx.Observable<String> |
remove(K key)
remove the specified master.
|
rx.Observable<Long> |
reset(K key)
This command will reset all the masters with matching name.
|
rx.Observable<String> |
set(K key,
String option,
V value)
Multiple option / value pairs can be specified (or none at all).
|
rx.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 rx.Observable<SocketAddress> getMasterAddrByName(K key)
RedisSentinelReactiveCommandsgetMasterAddrByName in interface RedisSentinelReactiveCommands<K,V>key - the keypublic rx.Observable<Map<K,V>> masters()
RedisSentinelReactiveCommandsmasters in interface RedisSentinelReactiveCommands<K,V>public rx.Observable<Map<K,V>> master(K key)
RedisSentinelReactiveCommandsmaster in interface RedisSentinelReactiveCommands<K,V>key - the keypublic rx.Observable<Map<K,V>> slaves(K key)
RedisSentinelReactiveCommandsslaves in interface RedisSentinelReactiveCommands<K,V>key - the keypublic rx.Observable<Long> reset(K key)
RedisSentinelReactiveCommandsreset in interface RedisSentinelReactiveCommands<K,V>key - the keypublic rx.Observable<String> failover(K key)
RedisSentinelReactiveCommandsfailover in interface RedisSentinelReactiveCommands<K,V>key - the master idpublic rx.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 rx.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 rx.Observable<String> remove(K key)
RedisSentinelReactiveCommandsremove in interface RedisSentinelReactiveCommands<K,V>key - the keypublic rx.Observable<String> ping()
RedisSentinelReactiveCommandsping in interface RedisSentinelReactiveCommands<K,V>public rx.Observable<K> clientGetname()
RedisSentinelReactiveCommandsclientGetname in interface RedisSentinelReactiveCommands<K,V>public rx.Observable<String> clientSetname(K name)
RedisSentinelReactiveCommandsclientSetname in interface RedisSentinelReactiveCommands<K,V>name - the client nameOK if the connection name was successfully set.public rx.Observable<String> clientKill(String addr)
RedisSentinelReactiveCommandsclientKill in interface RedisSentinelReactiveCommands<K,V>addr - ip:portOK if the connection exists and has been closedpublic rx.Observable<Long> clientKill(KillArgs killArgs)
RedisSentinelReactiveCommandskillArgsclientKill in interface RedisSentinelReactiveCommands<K,V>killArgs - args for the kill operationpublic rx.Observable<String> clientPause(long timeout)
RedisSentinelReactiveCommandsclientPause in interface RedisSentinelReactiveCommands<K,V>timeout - the timeout value in millisecondspublic rx.Observable<String> clientList()
RedisSentinelReactiveCommandsclientList in interface RedisSentinelReactiveCommands<K,V>public rx.Observable<String> info()
RedisSentinelReactiveCommandsinfo in interface RedisSentinelReactiveCommands<K,V>public rx.Observable<String> info(String section)
RedisSentinelReactiveCommandsinfo in interface RedisSentinelReactiveCommands<K,V>section - the section type: stringpublic 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> rx.Observable<T> createObservable(Supplier<RedisCommand<K,V,T>> commandSupplier)
public <T,R> R createDissolvingObservable(Supplier<RedisCommand<K,V,T>> commandSupplier)
Copyright © 2017 lettuce.io. All rights reserved.