K - Key type.V - Value type.public interface BaseRedisReactiveCommands<K,V> extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection.
|
<T> Observable<T> |
dispatch(ProtocolKeyword type,
CommandOutput<K,V,?> output)
Dispatch a command to the Redis Server.
|
<T> Observable<T> |
dispatch(ProtocolKeyword type,
CommandOutput<K,V,?> output,
CommandArgs<K,V> args)
Dispatch a command to the Redis Server.
|
Observable<V> |
echo(V msg)
Echo the given string.
|
boolean |
isOpen() |
Observable<String> |
ping()
Ping the server.
|
Observable<Long> |
publish(K channel,
V message)
Post a message to a channel.
|
Observable<K> |
pubsubChannels()
Lists the currently *active channels*.
|
Observable<K> |
pubsubChannels(K channel)
Lists the currently *active channels*.
|
Observable<Long> |
pubsubNumpat()
Returns the number of subscriptions to patterns.
|
Observable<Map<K,Long>> |
pubsubNumsub(K... channels)
Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channels.
|
Observable<String> |
quit()
Instructs Redis to disconnect the connection.
|
Observable<String> |
readOnly()
Switch connection to Read-Only mode when connecting to a cluster.
|
Observable<String> |
readWrite()
Switch connection to Read-Write mode (default) when connecting to a cluster.
|
void |
reset()
Reset the command state.
|
Observable<Object> |
role()
Return the role of the instance in the context of replication.
|
Observable<Long> |
waitForReplication(int replicas,
long timeout)
Wait for replication.
|
Observable<Long> publish(K channel, V message)
channel - the channel type: keymessage - the message type: valueObservable<K> pubsubChannels()
Observable<K> pubsubChannels(K channel)
channel - the keyObservable<Map<K,Long>> pubsubNumsub(K... channels)
channels - channel keysObservable<Long> pubsubNumpat()
Observable<V> echo(V msg)
msg - the message type: valueObservable<Object> role()
Observable<String> ping()
Observable<String> readOnly()
Observable<String> readWrite()
Observable<String> quit()
StatefulConnection.close() to close connections and
release resources.Observable<Long> waitForReplication(int replicas, long timeout)
replicas - minimum number of replicastimeout - timeout in milliseconds<T> Observable<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,?> output)
T - response typetype - the command, must not be null.output - the command output, must not be null.<T> Observable<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,?> output, CommandArgs<K,V> args)
T - response typetype - the command, must not be null.output - the command output, must not be null.args - the command arguments, must not be null.void close()
close in interface AutoCloseableboolean isOpen()
void reset()
Copyright © 2018 lettuce.io. All rights reserved.