K
- Key type.V
- Value type.public interface BaseRedisAsyncConnection<K,V> extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection.
|
String |
digest(V script)
Create a SHA1 digest from a Lua script.
|
RedisFuture<String> |
discard()
Discard all commands issued after MULTI.
|
<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.
|
RedisFuture<List<Object>> |
exec()
Execute all commands issued after MULTI.
|
void |
flushCommands()
Flush pending commands.
|
boolean |
isOpen() |
RedisFuture<String> |
multi()
Mark the start of a transaction block.
|
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()
Close the connection.
|
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<String> |
unwatch()
Forget about all watched keys.
|
RedisFuture<Long> |
waitForReplication(int replicas,
long timeout)
Wait for replication.
|
RedisFuture<String> |
watch(K... keys)
Watch the given keys to determine execution of the MULTI/EXEC block.
|
RedisFuture<Long> publish(K channel, V message)
channel
- the channel type: keymessage
- the message type: valueRedisFuture<List<K>> pubsubChannels()
RedisFuture<List<K>> pubsubChannels(K channel)
channel
- the keyRedisFuture<Map<K,Long>> pubsubNumsub(K... channels)
channels
- channel keysRedisFuture<Long> pubsubNumpat()
RedisFuture<V> echo(V msg)
msg
- the message type: valueRedisFuture<List<Object>> role()
RedisFuture<String> ping()
RedisFuture<String> quit()
String digest(V script)
script
- script contentRedisFuture<String> discard()
OK
.RedisFuture<List<Object>> exec()
WATCH
, EXEC
can return aRedisFuture<String> multi()
OK
.RedisFuture<String> watch(K... keys)
keys
- the keyOK
.RedisFuture<String> unwatch()
OK
.RedisFuture<Long> waitForReplication(int replicas, long timeout)
replicas
- minimum number of replicastimeout
- timeout in milliseconds<T> RedisFuture<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output)
T
- response typetype
- 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 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 AutoCloseable
close
in interface Closeable
boolean isOpen()
void setAutoFlushCommands(boolean autoFlush)
flushCommands()
is
issued. After calling flushCommands()
commands are sent to the transport and executed by Redis.autoFlush
- state of autoFlush.void flushCommands()
Copyright © 2016. All rights reserved.