Package io.netty.channel.uring
Class IoUringBufferRingConfig.Builder
- java.lang.Object
-
- io.netty.channel.uring.IoUringBufferRingConfig.Builder
-
- Enclosing class:
- IoUringBufferRingConfig
public static final class IoUringBufferRingConfig.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IoUringBufferRingConfig.Builder
allocator(IoUringBufferRingAllocator allocator)
Set theIoUringBufferRingAllocator
to use to allocateByteBuf
s.IoUringBufferRingConfig.Builder
batchAllocation(boolean batchAllocation)
Set allocation strategy that is used to allocateByteBuf
s.IoUringBufferRingConfig.Builder
batchSize(int batchSize)
Set the size of the batch on how many buffers are added everytime we need to expand the buffer ring.IoUringBufferRingConfig.Builder
bufferGroupId(short bgId)
Set the buffer group id to use.IoUringBufferRingConfig.Builder
bufferRingSize(short bufferRingSize)
Set the size of the ring.IoUringBufferRingConfig
build()
Create a newIoUringBufferRingConfig
.IoUringBufferRingConfig.Builder
incremental(boolean incremental)
Set if incremental mode should be used for the buffer ring.
-
-
-
Method Detail
-
bufferGroupId
public IoUringBufferRingConfig.Builder bufferGroupId(short bgId)
Set the buffer group id to use.- Parameters:
bgId
- The buffer group id to use.- Returns:
- This builder.
-
bufferRingSize
public IoUringBufferRingConfig.Builder bufferRingSize(short bufferRingSize)
Set the size of the ring.- Parameters:
bufferRingSize
- The size of the ring.- Returns:
- This builder.
-
batchSize
public IoUringBufferRingConfig.Builder batchSize(int batchSize)
Set the size of the batch on how many buffers are added everytime we need to expand the buffer ring.- Parameters:
batchSize
- The batch size.- Returns:
- This builder.
-
allocator
public IoUringBufferRingConfig.Builder allocator(IoUringBufferRingAllocator allocator)
Set theIoUringBufferRingAllocator
to use to allocateByteBuf
s.- Parameters:
allocator
- The allocator.
-
batchAllocation
public IoUringBufferRingConfig.Builder batchAllocation(boolean batchAllocation)
Set allocation strategy that is used to allocateByteBuf
s.- Parameters:
batchAllocation
-true
if the ring should always be filled via a batch allocation orfalse
if we will try to allocate a newByteBuf
as soon as we used a buffer from the ring.- Returns:
- This builder.
-
incremental
public IoUringBufferRingConfig.Builder incremental(boolean incremental)
Set if incremental mode should be used for the buffer ring.- Parameters:
incremental
-true
if incremental mode is used,false
otherwise.- Returns:
- This builder.
-
build
public IoUringBufferRingConfig build()
Create a newIoUringBufferRingConfig
.- Returns:
- a new config.
-
-