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 |
---|---|
Observable<K> |
clientGetname()
Get the current connection name.
|
Observable<Long> |
clientKill(KillArgs killArgs)
Kill connections of clients which are filtered by
killArgs |
Observable<String> |
clientKill(String addr)
Kill the connection of a client identified by ip:port.
|
Observable<String> |
clientList()
Get the list of client connections.
|
Observable<String> |
clientPause(long timeout)
Stop processing commands from clients for some time.
|
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> Observable<T> |
createObservable(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() |
Observable<String> |
info()
Get information and statistics about the server.
|
Observable<String> |
info(String section)
Get information and statistics about the server.
|
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)
RedisSentinelReactiveCommands
getMasterAddrByName
in interface RedisSentinelReactiveCommands<K,V>
key
- the keypublic Observable<Map<K,V>> masters()
RedisSentinelReactiveCommands
masters
in interface RedisSentinelReactiveCommands<K,V>
public Observable<Map<K,V>> master(K key)
RedisSentinelReactiveCommands
master
in interface RedisSentinelReactiveCommands<K,V>
key
- the keypublic Observable<Map<K,V>> slaves(K key)
RedisSentinelReactiveCommands
slaves
in interface RedisSentinelReactiveCommands<K,V>
key
- the keypublic Observable<Long> reset(K key)
RedisSentinelReactiveCommands
reset
in interface RedisSentinelReactiveCommands<K,V>
key
- the keypublic Observable<String> failover(K key)
RedisSentinelReactiveCommands
failover
in interface RedisSentinelReactiveCommands<K,V>
key
- the master idpublic Observable<String> monitor(K key, String ip, int port, int quorum)
RedisSentinelReactiveCommands
monitor
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)
RedisSentinelReactiveCommands
set
in interface RedisSentinelReactiveCommands<K,V>
key
- the keyoption
- the optionvalue
- the valueOK
if SET
was executed correctly.public Observable<String> remove(K key)
RedisSentinelReactiveCommands
remove
in interface RedisSentinelReactiveCommands<K,V>
key
- the keypublic Observable<String> ping()
RedisSentinelReactiveCommands
ping
in interface RedisSentinelReactiveCommands<K,V>
public Observable<K> clientGetname()
RedisSentinelReactiveCommands
clientGetname
in interface RedisSentinelReactiveCommands<K,V>
public Observable<String> clientSetname(K name)
RedisSentinelReactiveCommands
clientSetname
in interface RedisSentinelReactiveCommands<K,V>
name
- the client nameOK
if the connection name was successfully set.public Observable<String> clientKill(String addr)
RedisSentinelReactiveCommands
clientKill
in interface RedisSentinelReactiveCommands<K,V>
addr
- ip:portOK
if the connection exists and has been closedpublic Observable<Long> clientKill(KillArgs killArgs)
RedisSentinelReactiveCommands
killArgs
clientKill
in interface RedisSentinelReactiveCommands<K,V>
killArgs
- args for the kill operationpublic Observable<String> clientPause(long timeout)
RedisSentinelReactiveCommands
clientPause
in interface RedisSentinelReactiveCommands<K,V>
timeout
- the timeout value in millisecondspublic Observable<String> clientList()
RedisSentinelReactiveCommands
clientList
in interface RedisSentinelReactiveCommands<K,V>
public Observable<String> info()
RedisSentinelReactiveCommands
info
in interface RedisSentinelReactiveCommands<K,V>
public Observable<String> info(String section)
RedisSentinelReactiveCommands
info
in interface RedisSentinelReactiveCommands<K,V>
section
- the section type: stringpublic void close()
RedisSentinelReactiveCommands
close
in interface RedisSentinelReactiveCommands<K,V>
close
in interface Closeable
close
in interface AutoCloseable
public boolean isOpen()
isOpen
in interface RedisSentinelReactiveCommands<K,V>
public StatefulRedisSentinelConnection<K,V> getStatefulConnection()
getStatefulConnection
in interface RedisSentinelReactiveCommands<K,V>
public <T> Observable<T> createObservable(Supplier<RedisCommand<K,V,T>> commandSupplier)
public <T,R> R createDissolvingObservable(Supplier<RedisCommand<K,V,T>> commandSupplier)
Copyright © 2018 lettuce.io. All rights reserved.