Package io.netty.channel
Interface MaxBytesRecvByteBufAllocator
-
- All Superinterfaces:
RecvByteBufAllocator
- All Known Implementing Classes:
DefaultMaxBytesRecvByteBufAllocator
public interface MaxBytesRecvByteBufAllocator extends RecvByteBufAllocator
RecvByteBufAllocator
that limits a read operation based upon a maximum value per individual read and a maximum amount when a read operation is attempted by the event loop.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.RecvByteBufAllocator
RecvByteBufAllocator.DelegatingHandle, RecvByteBufAllocator.ExtendedHandle, RecvByteBufAllocator.Handle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
maxBytesPerIndividualRead()
Returns the maximum number of bytes to read per individual read operation.MaxBytesRecvByteBufAllocator
maxBytesPerIndividualRead(int maxBytesPerIndividualRead)
Sets the maximum number of bytes to read per individual read operation.int
maxBytesPerRead()
Returns the maximum number of bytes to read per read loop.MaxBytesRecvByteBufAllocator
maxBytesPerRead(int maxBytesPerRead)
Sets the maximum number of bytes to read per read loop.java.util.Map.Entry<java.lang.Integer,java.lang.Integer>
maxBytesPerReadPair()
Atomic way to get the maximum number of bytes to read for a read loop and per individual read operation.MaxBytesRecvByteBufAllocator
maxBytesPerReadPair(int maxBytesPerRead, int maxBytesPerIndividualRead)
Sets the maximum number of bytes to read for a read loop and per individual read operation.-
Methods inherited from interface io.netty.channel.RecvByteBufAllocator
newHandle
-
-
-
-
Method Detail
-
maxBytesPerRead
int maxBytesPerRead()
Returns the maximum number of bytes to read per read loop. achannelRead()
event. If this value is greater than 1, an event loop might attempt to read multiple times to procure bytes.
-
maxBytesPerRead
MaxBytesRecvByteBufAllocator maxBytesPerRead(int maxBytesPerRead)
Sets the maximum number of bytes to read per read loop. If this value is greater than 1, an event loop might attempt to read multiple times to procure bytes.
-
maxBytesPerIndividualRead
int maxBytesPerIndividualRead()
Returns the maximum number of bytes to read per individual read operation. achannelRead()
event. If this value is greater than 1, an event loop might attempt to read multiple times to procure bytes.
-
maxBytesPerIndividualRead
MaxBytesRecvByteBufAllocator maxBytesPerIndividualRead(int maxBytesPerIndividualRead)
Sets the maximum number of bytes to read per individual read operation. If this value is greater than 1, an event loop might attempt to read multiple times to procure bytes.
-
maxBytesPerReadPair
java.util.Map.Entry<java.lang.Integer,java.lang.Integer> maxBytesPerReadPair()
Atomic way to get the maximum number of bytes to read for a read loop and per individual read operation. If this value is greater than 1, an event loop might attempt to read multiple times to procure bytes.- Returns:
- The Key is from
maxBytesPerRead()
. The Value is frommaxBytesPerIndividualRead()
-
maxBytesPerReadPair
MaxBytesRecvByteBufAllocator maxBytesPerReadPair(int maxBytesPerRead, int maxBytesPerIndividualRead)
Sets the maximum number of bytes to read for a read loop and per individual read operation. If this value is greater than 1, an event loop might attempt to read multiple times to procure bytes.- Parameters:
maxBytesPerRead
- seemaxBytesPerRead(int)
maxBytesPerIndividualRead
- seemaxBytesPerIndividualRead(int)
-
-