WithTransferableScope Class — netty Architecture
Architecture documentation for the WithTransferableScope class in LeakPresenceExtension.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 728150d9_cfb5_1a1b_d50c_aa9e8a1ab502["WithTransferableScope"] 4cc4359a_c25b_64d1_ace3_a8c8a76aece1["LeakPresenceExtension.java"] 728150d9_cfb5_1a1b_d50c_aa9e8a1ab502 -->|defined in| 4cc4359a_c25b_64d1_ace3_a8c8a76aece1 3d43b518_bf50_c3bf_2eeb_09f680da812e["WithTransferableScope()"] 728150d9_cfb5_1a1b_d50c_aa9e8a1ab502 -->|method| 3d43b518_bf50_c3bf_2eeb_09f680da812e 9e67bea4_72d5_7c77_8b5c_bfd0198ed575["ResourceScope()"] 728150d9_cfb5_1a1b_d50c_aa9e8a1ab502 -->|method| 9e67bea4_72d5_7c77_8b5c_bfd0198ed575
Relationship Graph
Source Code
testsuite-common/src/main/java/io/netty/util/test/LeakPresenceExtension.java lines 111–132
public static final class WithTransferableScope<T> extends LeakPresenceDetector<T> {
static final InheritableThreadLocal<ResourceScope> SCOPE = new InheritableThreadLocal<>();
@SuppressWarnings("unused")
public WithTransferableScope(Class<?> resourceType, int samplingInterval) {
super(resourceType);
}
@SuppressWarnings("unused")
public WithTransferableScope(Class<?> resourceType, int samplingInterval, long maxActive) {
super(resourceType);
}
@Override
protected ResourceScope currentScope() throws AllocationProhibitedException {
ResourceScope scope = SCOPE.get();
if (scope == null) {
throw new AllocationProhibitedException("Resource created outside test?");
}
return scope;
}
}
Source
Frequently Asked Questions
What is the WithTransferableScope class?
WithTransferableScope is a class in the netty codebase, defined in testsuite-common/src/main/java/io/netty/util/test/LeakPresenceExtension.java.
Where is WithTransferableScope defined?
WithTransferableScope is defined in testsuite-common/src/main/java/io/netty/util/test/LeakPresenceExtension.java at line 111.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free