public interface RedisChannelWriter extends Closeable, AsyncCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
CompletableFuture<Void> |
closeAsync()
Asynchronously close the
RedisChannelWriter. |
void |
flushCommands()
Flush pending commands.
|
ClientResources |
getClientResources() |
void |
reset()
Deprecated.
since 5.2. This method is unsafe and can cause protocol offsets (i.e. Redis commands are completed with
previous command values).
|
void |
setAutoFlushCommands(boolean autoFlush)
Disable or enable auto-flush behavior.
|
void |
setConnectionFacade(ConnectionFacade connection)
Set the corresponding connection facade in order to notify it about channel active/inactive state.
|
<K,V> Collection<RedisCommand<K,V,?>> |
write(Collection<? extends RedisCommand<K,V,?>> commands)
Write multiple commands on the channel.
|
<K,V,T> RedisCommand<K,V,T> |
write(RedisCommand<K,V,T> command)
Write a command on the channel.
|
<K,V,T> RedisCommand<K,V,T> write(RedisCommand<K,V,T> command)
T - result typecommand - the Redis command.<K,V> Collection<RedisCommand<K,V,?>> write(Collection<? extends RedisCommand<K,V,?>> commands)
K - key typeV - value typecommands - the Redis commands.void close()
close in interface AutoCloseableclose in interface CloseableCompletableFuture<Void> closeAsync()
RedisChannelWriter.closeAsync in interface AsyncCloseable@Deprecated void reset()
void setConnectionFacade(ConnectionFacade connection)
connection - the connection facade (external connection object)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()
ClientResources getClientResources()
ClientResources.Copyright © 2021 lettuce.io. All rights reserved.