Class FixedReceiveBufferSizePredictor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int bufferSize  
    • Constructor Summary

      Constructors 
      Constructor Description
      FixedReceiveBufferSizePredictor​(int bufferSize)
      Creates a new predictor that always returns the same prediction of the specified buffer size.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int nextReceiveBufferSize()
      Predicts the capacity of the ChannelBuffer for the next read operation depending on the actual number of read bytes in the previous read operation.
      void previousReceiveBufferSize​(int previousReceiveBufferSize)
      Updates this predictor by specifying the actual number of read bytes in the previous read operation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • bufferSize

        private final int bufferSize
    • Constructor Detail

      • FixedReceiveBufferSizePredictor

        public FixedReceiveBufferSizePredictor​(int bufferSize)
        Creates a new predictor that always returns the same prediction of the specified buffer size.
    • Method Detail

      • previousReceiveBufferSize

        public void previousReceiveBufferSize​(int previousReceiveBufferSize)
        Description copied from interface: ReceiveBufferSizePredictor
        Updates this predictor by specifying the actual number of read bytes in the previous read operation.
        Specified by:
        previousReceiveBufferSize in interface ReceiveBufferSizePredictor
        Parameters:
        previousReceiveBufferSize - the actual number of read bytes in the previous read operation