Package io.netty.channel
Class WriteBufferWaterMark
- java.lang.Object
-
- io.netty.channel.WriteBufferWaterMark
-
public final class WriteBufferWaterMark extends java.lang.ObjectWriteBufferWaterMark 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 returnfalse.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 returntrueagain.Note that messages needs to be handled by the
MessageSizeEstimatorused by the channel forChannel.isWritable()to provide accurate back-pressure.
-
-
Field Summary
Fields Modifier and Type Field Description static WriteBufferWaterMarkDEFAULT
-
Constructor Summary
Constructors Constructor Description WriteBufferWaterMark(int low, int high)Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description inthigh()Returns the high water mark for the write buffer.intlow()Returns the low water mark for the write buffer.java.lang.StringtoString()
-
-
-
Field Detail
-
DEFAULT
public static final WriteBufferWaterMark DEFAULT
-
-