Class PendingBytesTracker

java.lang.Object
io.netty.channel.PendingBytesTracker
All Implemented Interfaces:
MessageSizeEstimator.Handle
Direct Known Subclasses:
PendingBytesTracker.ChannelOutboundBufferPendingBytesTracker, PendingBytesTracker.DefaultChannelPipelinePendingBytesTracker, PendingBytesTracker.NoopPendingBytesTracker

abstract class PendingBytesTracker extends Object implements MessageSizeEstimator.Handle
  • Field Details

  • Constructor Details

  • Method Details

    • size

      public final int size(Object msg)
      Description copied from interface: MessageSizeEstimator.Handle
      Calculate the size of the given message.
      Specified by:
      size in interface MessageSizeEstimator.Handle
      Parameters:
      msg - The message for which the size should be calculated
      Returns:
      size The size in bytes. The returned size must be >= 0
    • incrementPendingOutboundBytes

      public abstract void incrementPendingOutboundBytes(long bytes)
    • decrementPendingOutboundBytes

      public abstract void decrementPendingOutboundBytes(long bytes)
    • newTracker

      static PendingBytesTracker newTracker(Channel channel)