public class DefaultMaxBytesRecvByteBufAllocator extends Object implements MaxBytesRecvByteBufAllocator
RecvByteBufAllocator that yields a buffer size prediction based upon decrementing the value from
the max bytes per read.RecvByteBufAllocator.DelegatingHandle, RecvByteBufAllocator.ExtendedHandle, RecvByteBufAllocator.Handle| Constructor and Description |
|---|
DefaultMaxBytesRecvByteBufAllocator() |
DefaultMaxBytesRecvByteBufAllocator(int maxBytesPerRead,
int maxBytesPerIndividualRead) |
| Modifier and Type | Method and Description |
|---|---|
int |
maxBytesPerIndividualRead()
Returns the maximum number of bytes to read per individual read operation.
|
DefaultMaxBytesRecvByteBufAllocator |
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.
|
DefaultMaxBytesRecvByteBufAllocator |
maxBytesPerRead(int maxBytesPerRead)
Sets the maximum number of bytes to read per read loop.
|
Map.Entry<Integer,Integer> |
maxBytesPerReadPair()
Atomic way to get the maximum number of bytes to read for a read loop and per individual read operation.
|
DefaultMaxBytesRecvByteBufAllocator |
maxBytesPerReadPair(int maxBytesPerRead,
int maxBytesPerIndividualRead)
Sets the maximum number of bytes to read for a read loop and per individual read operation.
|
RecvByteBufAllocator.Handle |
newHandle()
Creates a new handle.
|
public DefaultMaxBytesRecvByteBufAllocator()
public DefaultMaxBytesRecvByteBufAllocator(int maxBytesPerRead,
int maxBytesPerIndividualRead)
public RecvByteBufAllocator.Handle newHandle()
RecvByteBufAllocatornewHandle in interface RecvByteBufAllocatorpublic int maxBytesPerRead()
MaxBytesRecvByteBufAllocatorchannelRead() event.
If this value is greater than 1, an event loop might attempt to read multiple times to procure bytes.maxBytesPerRead in interface MaxBytesRecvByteBufAllocatorpublic DefaultMaxBytesRecvByteBufAllocator maxBytesPerRead(int maxBytesPerRead)
MaxBytesRecvByteBufAllocatormaxBytesPerRead in interface MaxBytesRecvByteBufAllocatorpublic int maxBytesPerIndividualRead()
MaxBytesRecvByteBufAllocatorchannelRead() event.
If this value is greater than 1, an event loop might attempt to read multiple times to procure bytes.maxBytesPerIndividualRead in interface MaxBytesRecvByteBufAllocatorpublic DefaultMaxBytesRecvByteBufAllocator maxBytesPerIndividualRead(int maxBytesPerIndividualRead)
MaxBytesRecvByteBufAllocatormaxBytesPerIndividualRead in interface MaxBytesRecvByteBufAllocatorpublic Map.Entry<Integer,Integer> maxBytesPerReadPair()
MaxBytesRecvByteBufAllocatormaxBytesPerReadPair in interface MaxBytesRecvByteBufAllocatorMaxBytesRecvByteBufAllocator.maxBytesPerRead(). The Value is from MaxBytesRecvByteBufAllocator.maxBytesPerIndividualRead()public DefaultMaxBytesRecvByteBufAllocator maxBytesPerReadPair(int maxBytesPerRead, int maxBytesPerIndividualRead)
MaxBytesRecvByteBufAllocatormaxBytesPerReadPair in interface MaxBytesRecvByteBufAllocatormaxBytesPerRead - see MaxBytesRecvByteBufAllocator.maxBytesPerRead(int)maxBytesPerIndividualRead - see MaxBytesRecvByteBufAllocator.maxBytesPerIndividualRead(int)Copyright © 2008–2025 The Netty Project. All rights reserved.