public final class WriteBufferWaterMark
extends java.lang.Object
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.
Modifier and Type | Field and Description |
---|---|
static WriteBufferWaterMark |
DEFAULT |
private static int |
DEFAULT_HIGH_WATER_MARK |
private static int |
DEFAULT_LOW_WATER_MARK |
private int |
high |
private int |
low |
Constructor and 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.
|
Modifier and Type | Method and 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() |
private static final int DEFAULT_LOW_WATER_MARK
private static final int DEFAULT_HIGH_WATER_MARK
public static final WriteBufferWaterMark DEFAULT
private final int low
private final int high
public WriteBufferWaterMark(int low, int high)
low
- low water mark for write buffer.high
- high water mark for write bufferWriteBufferWaterMark(int low, int high, boolean validate)