Class HintedReplayingDecoder<S>
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.handler.codec.ByteToMessageDecoder
-
- org.infinispan.hotrod.impl.transport.netty.HintedReplayingDecoder<S>
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
HeaderDecoder
public abstract class HintedReplayingDecoder<S> extends io.netty.handler.codec.ByteToMessageDecoderCopy-paste ofReplayingDecoderwhich is hinted to not attempt decoding unless enough bytes are read. The decoder does not expect pass different message up the pipeline, this is a terminal read operation.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHintedReplayingDecoder()Creates a new instance with no initial state (i.e:null).protectedHintedReplayingDecoder(S initialState)Creates a new instance with the specified initial state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcallDecode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> xxx)voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx)protected voidcheckpoint()Stores the internal cumulative buffer's reader position.protected voidcheckpoint(S state)Stores the internal cumulative buffer's reader position and updates the current decoder state.protected Sstate()Returns the current state of this decoder.protected Sstate(S newState)Sets the current state of this decoder.-
Methods inherited from class io.netty.handler.codec.ByteToMessageDecoder
actualReadableBytes, channelRead, channelReadComplete, decode, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharable
-
-
-
-
Constructor Detail
-
HintedReplayingDecoder
protected HintedReplayingDecoder()
Creates a new instance with no initial state (i.e:null).
-
HintedReplayingDecoder
protected HintedReplayingDecoder(S initialState)
Creates a new instance with the specified initial state.
-
-
Method Detail
-
checkpoint
protected void checkpoint()
Stores the internal cumulative buffer's reader position.
-
checkpoint
protected void checkpoint(S state)
Stores the internal cumulative buffer's reader position and updates the current decoder state.
-
state
protected S state()
Returns the current state of this decoder.- Returns:
- the current state of this decoder
-
state
protected S state(S newState)
Sets the current state of this decoder.- Returns:
- the old state of this decoder
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception- Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.handler.codec.ByteToMessageDecoder- Throws:
Exception
-
-