K
- Key type.V
- Value type.public class PubSubCommandHandler<K,V> extends CommandHandler<K,V>
ChannelHandler
responsible for writing redis pub/sub commands and reading the response stream from the
server.CommandHandler.LifecycleState
ChannelHandler.Sharable
buffer, channel, clientOptions, clientResources, commandBuffer, commandHandlerId, disconnectedBuffer, rsm, stack, stateLock, writers
Constructor and Description |
---|
PubSubCommandHandler(ClientOptions clientOptions,
ClientResources clientResources,
RedisCodec<K,V> codec)
Initialize a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
afterComplete(ChannelHandlerContext ctx,
RedisCommand<K,V,?> command)
Hook method called after command completion.
|
protected boolean |
canDecode(ByteBuf buffer) |
protected void |
decode(ChannelHandlerContext ctx,
ByteBuf buffer) |
channelActive, channelInactive, channelRead, channelRegistered, channelUnregistered, close, decrementWriters, drainCommands, drainCommands, exceptionCaught, flushCommands, getState, incrementWriters, initialState, isClosed, lockWritersExclusive, logPrefix, prepareReset, reset, setAutoFlushCommands, setRedisChannelHandler, setState, unlockWritersExclusive, userEventTriggered, write, write, writeToDisconnectedBuffer
bind, close, connect, deregister, disconnect, flush, read
channelReadComplete, channelWritabilityChanged
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlerAdded, handlerRemoved
public PubSubCommandHandler(ClientOptions clientOptions, ClientResources clientResources, RedisCodec<K,V> codec)
clientOptions
- client options for the connectionclientResources
- client resources for this connectioncodec
- Codec.protected void decode(ChannelHandlerContext ctx, ByteBuf buffer)
decode
in class CommandHandler<K,V>
protected boolean canDecode(ByteBuf buffer)
canDecode
in class CommandHandler<K,V>
protected void afterComplete(ChannelHandlerContext ctx, RedisCommand<K,V,?> command)
CommandHandler
afterComplete
in class CommandHandler<K,V>
Copyright © 2017 lettuce.io. All rights reserved.