Package io.netty.util
Class ResourceLeakDetectorFactory.DefaultResourceLeakDetectorFactory
java.lang.Object
io.netty.util.ResourceLeakDetectorFactory
io.netty.util.ResourceLeakDetectorFactory.DefaultResourceLeakDetectorFactory
- Enclosing class:
ResourceLeakDetectorFactory
private static final class ResourceLeakDetectorFactory.DefaultResourceLeakDetectorFactory
extends ResourceLeakDetectorFactory
Default implementation that loads custom leak detector via system property
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Constructor<?> customClassConstructor(String customLeakDetector) <T> ResourceLeakDetector<T> newResourceLeakDetector(Class<T> resource, int samplingInterval) Returns a new instance of aResourceLeakDetectorwith the given resource class.<T> ResourceLeakDetector<T> newResourceLeakDetector(Class<T> resource, int samplingInterval, long maxActive) private static Constructor<?> obsoleteCustomClassConstructor(String customLeakDetector) Methods inherited from class io.netty.util.ResourceLeakDetectorFactory
instance, newResourceLeakDetector, setResourceLeakDetectorFactory
-
Field Details
-
obsoleteCustomClassConstructor
-
customClassConstructor
-
-
Constructor Details
-
DefaultResourceLeakDetectorFactory
DefaultResourceLeakDetectorFactory()
-
-
Method Details
-
obsoleteCustomClassConstructor
-
customClassConstructor
-
newResourceLeakDetector
public <T> ResourceLeakDetector<T> newResourceLeakDetector(Class<T> resource, int samplingInterval, long maxActive) - Specified by:
newResourceLeakDetectorin classResourceLeakDetectorFactory- Type Parameters:
T- the type of the resource class- Parameters:
resource- the resource class used to initialize theResourceLeakDetectorsamplingInterval- the interval on which sampling takes placemaxActive- This is deprecated and will be ignored.- Returns:
- a new instance of
ResourceLeakDetector
-
newResourceLeakDetector
Description copied from class:ResourceLeakDetectorFactoryReturns a new instance of aResourceLeakDetectorwith the given resource class.- Overrides:
newResourceLeakDetectorin classResourceLeakDetectorFactory- Type Parameters:
T- the type of the resource class- Parameters:
resource- the resource class used to initialize theResourceLeakDetectorsamplingInterval- the interval on which sampling takes place- Returns:
- a new instance of
ResourceLeakDetector
-