Module lettuce.core

Interface DecodeBufferPolicy


public interface DecodeBufferPolicy
Strategy defining the approach to discard bytes from the response aggregation buffer in CommandHandler.decode(ChannelHandlerContext ctx, ByteBuf buffer) to reclaim memory after various response decoding phases.
Since:
6.0
Author:
Shaphan, Mark Paluch
  • Method Summary

    Modifier and Type Method Description
    default void afterCommandDecoded​(ByteBuf buffer)
    Callback that is invoked after a command has been fully decoded.
    default void afterDecoding​(ByteBuf buffer)
    Callback that is invoked after leaving the decode loop.
    default void afterPartialDecode​(ByteBuf buffer)
    Callback that is invoked after partially decoding a command.
  • Method Details

    • afterPartialDecode

      default void afterPartialDecode​(ByteBuf buffer)
      Callback that is invoked after partially decoding a command.
      Parameters:
      buffer - aggregation buffer
    • afterCommandDecoded

      default void afterCommandDecoded​(ByteBuf buffer)
      Callback that is invoked after a command has been fully decoded.
      Parameters:
      buffer - aggregation buffer
    • afterDecoding

      default void afterDecoding​(ByteBuf buffer)
      Callback that is invoked after leaving the decode loop.
      Parameters:
      buffer - aggregation buffer