Top Description Fields Constructors Methods
io.netty.channel

public final Class WriteBufferWaterMark

extends Object
Class Inheritance
Static Imports
io.netty.util.internal.ObjectUtil.checkPositiveOrZero

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.

Field Summary

Modifier and TypeField and Description
public static final WriteBufferWaterMark
private static final int
private static final int
private final int
private final int

Constructor Summary

AccessConstructor and Description
public
WriteBufferWaterMark(int
low water mark for write buffer.
low
,
int
high water mark for write buffer
high
)

Create a new instance.

pack-priv
WriteBufferWaterMark(int low, int high, boolean validate)

This constructor is needed to keep backward-compatibility.

Method Summary

Modifier and TypeMethod and Description
public int
high()

Returns the high water mark for the write buffer.

public int
low()

Returns the low water mark for the write buffer.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

DEFAULTback to summary
public static final WriteBufferWaterMark DEFAULT
DEFAULT_HIGH_WATER_MARKback to summary
private static final int DEFAULT_HIGH_WATER_MARK
DEFAULT_LOW_WATER_MARKback to summary
private static final int DEFAULT_LOW_WATER_MARK
highback to summary
private final int high
lowback to summary
private final int low

Constructor Detail

WriteBufferWaterMarkback to summary
public WriteBufferWaterMark(int low, int high)

Create a new instance.

Parameters
low:int

low water mark for write buffer.

high:int

high water mark for write buffer

WriteBufferWaterMarkback to summary
pack-priv WriteBufferWaterMark(int low, int high, boolean validate)

This constructor is needed to keep backward-compatibility.

Method Detail

highback to summary
public int high()

Returns the high water mark for the write buffer.

lowback to summary
public int low()

Returns the low water mark for the write buffer.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override