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 TypeMethodDescriptionvoidsetCacheTrimInterval(@Nullable Integer cacheTrimInterval) voidsetChunkSize(@Nullable Integer chunkSize) voidsetMaxCachedBufferCapacity(@Nullable Integer maxCachedBufferCapacity) voidsetMaxCachedByteBuffersPerChunk(@Nullable Integer maxCachedByteBuffersPerChunk) voidsetMaxOrder(@Nullable Integer maxOrder) voidsetNormalCacheSize(@Nullable Integer normalCacheSize) voidsetNumDirectArenas(@Nullable Integer numDirectArenas) voidsetNumHeapArenas(@Nullable Integer numHeapArenas) voidsetPageSize(@Nullable Integer pageSize) voidsetSmallCacheSize(@Nullable Integer smallCacheSize) voidsetUseCacheForAllThreads(@Nullable Boolean useCacheForAllThreads)
-
Method Details
-
setNumHeapArenas
- Specified by:
setNumHeapArenasin interfaceByteBufAllocatorConfiguration- Parameters:
numHeapArenas- The number of heap arenas
-
setNumDirectArenas
- Specified by:
setNumDirectArenasin interfaceByteBufAllocatorConfiguration- Parameters:
numDirectArenas- The number of direct arenas
-
setPageSize
- Specified by:
setPageSizein interfaceByteBufAllocatorConfiguration- Parameters:
pageSize- The page size
-
setMaxOrder
- Specified by:
setMaxOrderin interfaceByteBufAllocatorConfiguration- Parameters:
maxOrder- The max order
-
setChunkSize
- Specified by:
setChunkSizein interfaceByteBufAllocatorConfiguration- Parameters:
chunkSize- The chunk size
-
setSmallCacheSize
- Specified by:
setSmallCacheSizein interfaceByteBufAllocatorConfiguration- Parameters:
smallCacheSize- The small cache size
-
setNormalCacheSize
- Specified by:
setNormalCacheSizein interfaceByteBufAllocatorConfiguration- Parameters:
normalCacheSize- The normal cache size
-
setUseCacheForAllThreads
- Specified by:
setUseCacheForAllThreadsin interfaceByteBufAllocatorConfiguration- Parameters:
useCacheForAllThreads- Whether to use the cache for all threads
-
setMaxCachedBufferCapacity
- Specified by:
setMaxCachedBufferCapacityin interfaceByteBufAllocatorConfiguration- Parameters:
maxCachedBufferCapacity- The max cached buffer capacity
-
setCacheTrimInterval
- Specified by:
setCacheTrimIntervalin interfaceByteBufAllocatorConfiguration- Parameters:
cacheTrimInterval- The cache trim interval
-
setMaxCachedByteBuffersPerChunk
public void setMaxCachedByteBuffersPerChunk(@Nullable @Nullable Integer maxCachedByteBuffersPerChunk) - Specified by:
setMaxCachedByteBuffersPerChunkin interfaceByteBufAllocatorConfiguration- Parameters:
maxCachedByteBuffersPerChunk- The max cached byte buffers per chunk
-