SizeClassChunkManagementStrategy Class — netty Architecture
Architecture documentation for the SizeClassChunkManagementStrategy class in AdaptivePoolingAllocator.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD e8e4165c_55c2_33c4_44c5_1eea8eeb9f05["SizeClassChunkManagementStrategy"] fee3fa6d_a7fb_30d6_ea34_49602c633a2c["AdaptivePoolingAllocator.java"] e8e4165c_55c2_33c4_44c5_1eea8eeb9f05 -->|defined in| fee3fa6d_a7fb_30d6_ea34_49602c633a2c f78f916e_5152_0551_bb7a_8e8a86132979["SizeClassChunkManagementStrategy()"] e8e4165c_55c2_33c4_44c5_1eea8eeb9f05 -->|method| f78f916e_5152_0551_bb7a_8e8a86132979 c120f014_f998_c9e3_5513_5cc22342cc0a["ChunkController()"] e8e4165c_55c2_33c4_44c5_1eea8eeb9f05 -->|method| c120f014_f998_c9e3_5513_5cc22342cc0a afa006f3_39a6_ecf5_bdd6_c6a395f1287e["ChunkCache()"] e8e4165c_55c2_33c4_44c5_1eea8eeb9f05 -->|method| afa006f3_39a6_ecf5_bdd6_c6a395f1287e
Relationship Graph
Source Code
buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java lines 662–684
private static final class SizeClassChunkManagementStrategy implements ChunkManagementStrategy {
// To amortize activation/deactivation of chunks, we should have a minimum number of segments per chunk.
// We choose 32 because it seems neither too small nor too big.
// For segments of 16 KiB, the chunks will be half a megabyte.
private static final int MIN_SEGMENTS_PER_CHUNK = 32;
private final int segmentSize;
private final int chunkSize;
private SizeClassChunkManagementStrategy(int segmentSize) {
this.segmentSize = ObjectUtil.checkPositive(segmentSize, "segmentSize");
chunkSize = Math.max(MIN_CHUNK_SIZE, segmentSize * MIN_SEGMENTS_PER_CHUNK);
}
@Override
public ChunkController createController(MagazineGroup group) {
return new SizeClassChunkController(group, segmentSize, chunkSize);
}
@Override
public ChunkCache createChunkCache(boolean isThreadLocal) {
return new ConcurrentQueueChunkCache();
}
}
Source
Frequently Asked Questions
What is the SizeClassChunkManagementStrategy class?
SizeClassChunkManagementStrategy is a class in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java.
Where is SizeClassChunkManagementStrategy defined?
SizeClassChunkManagementStrategy is defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java at line 662.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free