K - Key type.V - Value type.public interface BaseRedisAsyncCommands<K,V>
| Modifier and Type | Method and Description |
|---|---|
<T> RedisFuture<T> |
dispatch(ProtocolKeyword type,
CommandOutput<K,V,T> output)
Dispatch a command to the Redis Server.
|
<T> RedisFuture<T> |
dispatch(ProtocolKeyword type,
CommandOutput<K,V,T> output,
CommandArgs<K,V> args)
Dispatch a command to the Redis Server.
|
RedisFuture<V> |
echo(V msg)
Echo the given string.
|
void |
flushCommands()
Flush pending commands.
|
boolean |
isOpen() |
RedisFuture<String> |
ping()
Ping the server.
|
RedisFuture<Long> |
publish(K channel,
V message)
Post a message to a channel.
|
RedisFuture<List<K>> |
pubsubChannels()
Lists the currently *active channels*.
|
RedisFuture<List<K>> |
pubsubChannels(K channel)
Lists the currently *active channels*.
|
RedisFuture<Long> |
pubsubNumpat()
Returns the number of subscriptions to patterns.
|
RedisFuture<Map<K,Long>> |
pubsubNumsub(K... channels)
Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channels.
|
RedisFuture<String> |
quit()
Instructs Redis to disconnect the connection.
|
RedisFuture<String> |
readOnly()
Switch connection to Read-Only mode when connecting to a cluster.
|
RedisFuture<String> |
readWrite()
Switch connection to Read-Write mode (default) when connecting to a cluster.
|
void |
reset()
Reset the command state.
|
RedisFuture<List<Object>> |
role()
Return the role of the instance in the context of replication.
|
void |
setAutoFlushCommands(boolean autoFlush)
Disable or enable auto-flush behavior.
|
RedisFuture<Long> |
waitForReplication(int replicas,
long timeout)
Wait for replication.
|
RedisFuture<Long> publish(K channel, V message)
channel - the channel type: key.message - the message type: value.RedisFuture<List<K>> pubsubChannels()
RedisFuture<List<K>> pubsubChannels(K channel)
channel - the key.RedisFuture<Map<K,Long>> pubsubNumsub(K... channels)
channels - channel keys.RedisFuture<Long> pubsubNumpat()
RedisFuture<V> echo(V msg)
msg - the message type: value.RedisFuture<List<Object>> role()
RedisFuture<String> ping()
RedisFuture<String> readOnly()
RedisFuture<String> readWrite()
RedisFuture<String> quit()
StatefulConnection.close() to close connections and
release resources.RedisFuture<Long> waitForReplication(int replicas, long timeout)
replicas - minimum number of replicas.timeout - timeout in milliseconds.<T> RedisFuture<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output)
T - response type.type - the command, must not be null.output - the command output, must not be null.<T> RedisFuture<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output, CommandArgs<K,V> args)
T - response type.type - the command, must not be null.output - the command output, must not be null.args - the command arguments, must not be null.boolean isOpen()
true if the connection is open (connected and not closed).void reset()
void setAutoFlushCommands(boolean autoFlush)
true. If autoFlushCommands is disabled, multiple commands can
be issued without writing them actually to the transport. Commands are buffered until a flushCommands() is
issued. After calling flushCommands() commands are sent to the transport and executed by Redis.autoFlush - state of autoFlush.void flushCommands()
Copyright © 2021 lettuce.io. All rights reserved.