K
- Key type.V
- Value type.public interface RedisChannelWriter<K,V> extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flushCommands()
Flush pending commands.
|
void |
reset()
Reset the writer state.
|
void |
setAutoFlushCommands(boolean autoFlush)
Disable or enable auto-flush behavior.
|
void |
setRedisChannelHandler(RedisChannelHandler<K,V> redisChannelHandler)
Set the corresponding connection instance in order to notify it about channel active/inactive state.
|
<T> RedisCommand<K,V,T> |
write(RedisCommand<K,V,T> command)
Write a command on the channel.
|
<T> RedisCommand<K,V,T> write(RedisCommand<K,V,T> command)
T
- result typecommand
- the redis commandvoid close()
close
in interface AutoCloseable
close
in interface Closeable
void reset()
void setRedisChannelHandler(RedisChannelHandler<K,V> redisChannelHandler)
redisChannelHandler
- the channel handler (external connection object)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.