Package io.micronaut.buffer.netty
Class DefaultByteBufAllocatorConfiguration
java.lang.Object
io.micronaut.buffer.netty.DefaultByteBufAllocatorConfiguration
- All Implemented Interfaces:
ByteBufAllocatorConfiguration
@ConfigurationProperties("netty.default.allocator")
@Requires(property="netty.default.allocator")
@Context
@Internal
@Order(-2147483648)
public final class DefaultByteBufAllocatorConfiguration
extends Object
implements ByteBufAllocatorConfiguration
Allows configuring the default netty allocator. Note that Netty initializes the default
allocator once from system properties, so once this is loaded it cannot be altered again
for the lifecycle of the JVM.
- Since:
- 3.3.0
- Author:
- graemerocher
- See Also:
-
ByteBufAllocator
-
Field Summary
Fields inherited from interface io.micronaut.buffer.netty.ByteBufAllocatorConfiguration
DEFAULT_ALLOCATOR
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setCacheTrimInterval
(@Nullable Integer cacheTrimInterval) void
setChunkSize
(@Nullable Integer chunkSize) void
setMaxCachedBufferCapacity
(@Nullable Integer maxCachedBufferCapacity) void
setMaxCachedByteBuffersPerChunk
(@Nullable Integer maxCachedByteBuffersPerChunk) void
setMaxOrder
(@Nullable Integer maxOrder) void
setNormalCacheSize
(@Nullable Integer normalCacheSize) void
setNumDirectArenas
(@Nullable Integer numDirectArenas) void
setNumHeapArenas
(@Nullable Integer numHeapArenas) void
setPageSize
(@Nullable Integer pageSize) void
setSmallCacheSize
(@Nullable Integer smallCacheSize) void
setUseCacheForAllThreads
(@Nullable Boolean useCacheForAllThreads)
-
Method Details
-
setNumHeapArenas
- Specified by:
setNumHeapArenas
in interfaceByteBufAllocatorConfiguration
- Parameters:
numHeapArenas
- The number of heap arenas
-
setNumDirectArenas
- Specified by:
setNumDirectArenas
in interfaceByteBufAllocatorConfiguration
- Parameters:
numDirectArenas
- The number of direct arenas
-
setPageSize
- Specified by:
setPageSize
in interfaceByteBufAllocatorConfiguration
- Parameters:
pageSize
- The page size
-
setMaxOrder
- Specified by:
setMaxOrder
in interfaceByteBufAllocatorConfiguration
- Parameters:
maxOrder
- The max order
-
setChunkSize
- Specified by:
setChunkSize
in interfaceByteBufAllocatorConfiguration
- Parameters:
chunkSize
- The chunk size
-
setSmallCacheSize
- Specified by:
setSmallCacheSize
in interfaceByteBufAllocatorConfiguration
- Parameters:
smallCacheSize
- The small cache size
-
setNormalCacheSize
- Specified by:
setNormalCacheSize
in interfaceByteBufAllocatorConfiguration
- Parameters:
normalCacheSize
- The normal cache size
-
setUseCacheForAllThreads
- Specified by:
setUseCacheForAllThreads
in interfaceByteBufAllocatorConfiguration
- Parameters:
useCacheForAllThreads
- Whether to use the cache for all threads
-
setMaxCachedBufferCapacity
- Specified by:
setMaxCachedBufferCapacity
in interfaceByteBufAllocatorConfiguration
- Parameters:
maxCachedBufferCapacity
- The max cached buffer capacity
-
setCacheTrimInterval
- Specified by:
setCacheTrimInterval
in interfaceByteBufAllocatorConfiguration
- Parameters:
cacheTrimInterval
- The cache trim interval
-
setMaxCachedByteBuffersPerChunk
public void setMaxCachedByteBuffersPerChunk(@Nullable @Nullable Integer maxCachedByteBuffersPerChunk) - Specified by:
setMaxCachedByteBuffersPerChunk
in interfaceByteBufAllocatorConfiguration
- Parameters:
maxCachedByteBuffersPerChunk
- The max cached byte buffers per chunk
-