Class WriteBufferWaterMark


  • public final class WriteBufferWaterMark
    extends java.lang.Object
    WriteBufferWaterMark is used to set low water mark and high water mark for the write buffer.

    If the number of bytes queued in the write buffer exceeds the high water mark, Channel.isWritable() will start to return false.

    If the number of bytes queued in the write buffer exceeds the high water mark and then dropped down below the low water mark, Channel.isWritable() will start to return true again.

    • Constructor Summary

      Constructors 
      Constructor Description
      WriteBufferWaterMark​(int low, int high)
      Create a new instance.
      WriteBufferWaterMark​(int low, int high, boolean validate)
      This constructor is needed to keep backward-compatibility.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int high()
      Returns the high water mark for the write buffer.
      int low()
      Returns the low water mark for the write buffer.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WriteBufferWaterMark

        public WriteBufferWaterMark​(int low,
                                    int high)
        Create a new instance.
        Parameters:
        low - low water mark for write buffer.
        high - high water mark for write buffer
      • WriteBufferWaterMark

        WriteBufferWaterMark​(int low,
                             int high,
                             boolean validate)
        This constructor is needed to keep backward-compatibility.
    • Method Detail

      • low

        public int low()
        Returns the low water mark for the write buffer.
      • high

        public int high()
        Returns the high water mark for the write buffer.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object