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.ByteToMessageDecoder
Copy-paste of
ReplayingDecoder which 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.-
Nested Class Summary
Nested classes/interfaces inherited from class io.netty.handler.codec.ByteToMessageDecoder
io.netty.handler.codec.ByteToMessageDecoder.CumulatorNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsFields inherited from class io.netty.handler.codec.ByteToMessageDecoder
COMPOSITE_CUMULATOR, MERGE_CUMULATOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new instance with no initial state (i.e:null).protectedHintedReplayingDecoder(S initialState) Creates a new instance with the specified initial state. -
Method Summary
Modifier and TypeMethodDescriptionvoidcallDecode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> xxx) voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx) protected voidStores 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 abstract booleanprotected Sstate()Returns the current state of this decoder.protected SSets 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, userEventTriggeredMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded
-
Field Details
-
REPLAY
public static final io.netty.util.Signal REPLAY
-
-
Constructor Details
-
HintedReplayingDecoder
protected HintedReplayingDecoder()Creates a new instance with no initial state (i.e:null). -
HintedReplayingDecoder
Creates a new instance with the specified initial state.
-
-
Method Details
-
checkpoint
protected void checkpoint()Stores the internal cumulative buffer's reader position. -
checkpoint
Stores the internal cumulative buffer's reader position and updates the current decoder state. -
state
Returns the current state of this decoder.- Returns:
- the current state of this decoder
-
isHandlingMessage
protected abstract boolean isHandlingMessage() -
state
Sets the current state of this decoder.- Returns:
- the old state of this decoder
-
channelInactive
- Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.handler.codec.ByteToMessageDecoder- Throws:
Exception
-
callDecode
public void callDecode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> xxx) - Overrides:
callDecodein classio.netty.handler.codec.ByteToMessageDecoder
-