Interface BufferAllocator.UnpooledOptionBuilder
- Enclosing interface:
BufferAllocator
public static sealed interface BufferAllocator.UnpooledOptionBuilder
Options for creating unpooled buffer allocators.
-
Method Summary
Modifier and TypeMethodDescriptionmaxByteBufferCapacity(int capacity) Sets the maximum capacity, in bytes, that may be requested byBufferAllocator.getByteBuffer(int).maxCharBufferCapacity(int capacity) Sets the maximum capacity, in chars, that may be requested byBufferAllocator.getCharBuffer(int).
-
Method Details
-
maxByteBufferCapacity
Sets the maximum capacity, in bytes, that may be requested by
BufferAllocator.getByteBuffer(int).If
BufferAllocator.getByteBuffer(int)is called with an argument greater thancapacity,MxPackException.SizeLimitExceededis thrown.Default:
Integer.MAX_VALUE- Parameters:
capacity- the maximum capacity, in bytes, that may be requested byBufferAllocator.getByteBuffer(int)- Returns:
- this builder
-
maxCharBufferCapacity
Sets the maximum capacity, in chars, that may be requested by
BufferAllocator.getCharBuffer(int).If
BufferAllocator.getCharBuffer(int)is called with an argument greater thancapacity,MxPackException.SizeLimitExceededis thrown.Default:
Integer.MAX_VALUE- Parameters:
capacity- the maximum capacity, in chars, that may be requested byBufferAllocator.getCharBuffer(int)- Returns:
- this builder
-