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.Cumulator

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Field Summary

    Fields inherited from class io.netty.handler.codec.ByteToMessageDecoder

    COMPOSITE_CUMULATOR, MERGE_CUMULATOR
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates a new instance with no initial state (i.e: null).
    protected
    HintedReplayingDecoder(S initialState)
    Creates a new instance with the specified initial state.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    callDecode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> xxx)
     
    void
    channelInactive(io.netty.channel.ChannelHandlerContext ctx)
     
    protected void
    Stores the internal cumulative buffer's reader position.
    protected void
    checkpoint(S state)
    Stores the internal cumulative buffer's reader position and updates the current decoder state.
    protected S
    Returns the current state of this decoder.
    protected S
    state(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerAdded
  • Constructor Details

    • 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 Details

    • 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:
      channelInactive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelInactive in class io.netty.handler.codec.ByteToMessageDecoder
      Throws:
      Exception
    • callDecode

      protected void callDecode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> xxx)
      Overrides:
      callDecode in class io.netty.handler.codec.ByteToMessageDecoder