Module lettuce.core

Class PubSubCommandHandler<K,​V>

Type Parameters:
K - Key type.
V - Value type.
All Implemented Interfaces:
ChannelHandler, ChannelInboundHandler, ChannelOutboundHandler

public class PubSubCommandHandler<K,​V>
extends CommandHandler
A netty ChannelHandler responsible for writing Redis Pub/Sub commands and reading the response stream from the server. PubSubCommandHandler accounts for Pub/Sub message notification calling back PubSubEndpoint.notifyMessage(PubSubMessage). Redis responses can be interleaved in the sense that a response contains a Pub/Sub message first, then a command response. Possible interleave is introspected via PubSubCommandHandler.ResponseHeaderReplayOutput and decoding hooks.
Author:
Will Glozer, Mark Paluch