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.
-
-
Field Summary
Fields Modifier and Type Field Description static WriteBufferWaterMarkDEFAULTprivate static intDEFAULT_HIGH_WATER_MARKprivate static intDEFAULT_LOW_WATER_MARKprivate inthighprivate intlow
-
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 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_LOW_WATER_MARK
private static final int DEFAULT_LOW_WATER_MARK
- See Also:
- Constant Field Values
-
DEFAULT_HIGH_WATER_MARK
private static final int DEFAULT_HIGH_WATER_MARK
- See Also:
- Constant Field Values
-
DEFAULT
public static final WriteBufferWaterMark DEFAULT
-
low
private final int low
-
high
private final int high
-
-
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.
-
-