AdaptiveRecycler Class — netty Architecture
Architecture documentation for the AdaptiveRecycler class in AdaptivePoolingAllocator.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 9fe5ef6c_4772_abd4_c034_290347adb959["AdaptiveRecycler"] fee3fa6d_a7fb_30d6_ea34_49602c633a2c["AdaptivePoolingAllocator.java"] 9fe5ef6c_4772_abd4_c034_290347adb959 -->|defined in| fee3fa6d_a7fb_30d6_ea34_49602c633a2c e5a7f617_0899_b976_659b_6b8df63cafb0["AdaptiveRecycler()"] 9fe5ef6c_4772_abd4_c034_290347adb959 -->|method| e5a7f617_0899_b976_659b_6b8df63cafb0 87030e81_b8ed_986d_7a35_854ec64b14c1["AdaptiveByteBuf()"] 9fe5ef6c_4772_abd4_c034_290347adb959 -->|method| 87030e81_b8ed_986d_7a35_854ec64b14c1
Relationship Graph
Source Code
buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java lines 794–818
private static final class AdaptiveRecycler extends Recycler<AdaptiveByteBuf> {
private AdaptiveRecycler(boolean unguarded) {
// uses fast thread local
super(unguarded);
}
private AdaptiveRecycler(int maxCapacity, boolean unguarded) {
// doesn't use fast thread local, shared
super(maxCapacity, unguarded);
}
@Override
protected AdaptiveByteBuf newObject(final Handle<AdaptiveByteBuf> handle) {
return new AdaptiveByteBuf((EnhancedHandle<AdaptiveByteBuf>) handle);
}
public static AdaptiveRecycler threadLocal() {
return new AdaptiveRecycler(true);
}
public static AdaptiveRecycler sharedWith(int maxCapacity) {
return new AdaptiveRecycler(maxCapacity, true);
}
}
Source
Frequently Asked Questions
What is the AdaptiveRecycler class?
AdaptiveRecycler is a class in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java.
Where is AdaptiveRecycler defined?
AdaptiveRecycler is defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java at line 794.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free