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.Builderallocator(IoUringBufferRingAllocator allocator)Set theIoUringBufferRingAllocatorto use to allocateByteBufs.IoUringBufferRingConfig.BuilderbatchAllocation(boolean batchAllocation)Set allocation strategy that is used to allocateByteBufs.IoUringBufferRingConfig.BuilderbatchSize(int batchSize)Set the size of the batch on how many buffers are added everytime we need to expand the buffer ring.IoUringBufferRingConfig.BuilderbufferGroupId(short bgId)Set the buffer group id to use.IoUringBufferRingConfig.BuilderbufferRingSize(short bufferRingSize)Set the size of the ring.IoUringBufferRingConfigbuild()Create a newIoUringBufferRingConfig.IoUringBufferRingConfig.Builderincremental(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 theIoUringBufferRingAllocatorto use to allocateByteBufs.- Parameters:
allocator- The allocator.
-
batchAllocation
public IoUringBufferRingConfig.Builder batchAllocation(boolean batchAllocation)
Set allocation strategy that is used to allocateByteBufs.- Parameters:
batchAllocation-trueif the ring should always be filled via a batch allocation orfalseif we will try to allocate a newByteBufas 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-trueif incremental mode is used,falseotherwise.- Returns:
- This builder.
-
build
public IoUringBufferRingConfig build()
Create a newIoUringBufferRingConfig.- Returns:
- a new config.
-
-