K - Key type.V - Value type.public class PubSubCommandHandler<K,V> extends CommandHandler
ChannelHandler responsible for writing redis pub/sub commands and reading the response stream from the
server.CommandHandler.LifecycleStateChannelHandler.Sharable| Constructor and Description |
|---|
PubSubCommandHandler(ClientOptions clientOptions,
ClientResources clientResources,
RedisCodec<K,V> codec,
PubSubEndpoint<K,V> endpoint)
Initialize a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterComplete(ChannelHandlerContext ctx,
RedisCommand<?,?,?> command)
Hook method called after command completion.
|
protected boolean |
canDecode(ByteBuf buffer) |
protected void |
decode(ChannelHandlerContext ctx,
ByteBuf buffer) |
channelActive, channelInactive, channelRead, channelRegistered, channelUnregistered, decode, decode, drainQueue, exceptionCaught, getStack, getState, isClosed, setState, userEventTriggered, writebind, close, connect, deregister, disconnect, flush, readchannelReadComplete, channelWritabilityChangedensureNotSharable, handlerAdded, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAdded, handlerRemovedpublic PubSubCommandHandler(ClientOptions clientOptions, ClientResources clientResources, RedisCodec<K,V> codec, PubSubEndpoint<K,V> endpoint)
clientOptions - client options for this connection, must not be nullclientResources - client resources for this connectioncodec - Codec.endpoint - the Pub/Sub endpoint for Pub/Sub callback.protected void decode(ChannelHandlerContext ctx, ByteBuf buffer) throws InterruptedException
decode in class CommandHandlerInterruptedExceptionprotected boolean canDecode(ByteBuf buffer)
canDecode in class CommandHandlerprotected void afterComplete(ChannelHandlerContext ctx, RedisCommand<?,?,?> command)
CommandHandlerafterComplete in class CommandHandlerCopyright © 2018 lettuce.io. All rights reserved.