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 Modifier and Type Field Description private java.lang.reflect.Constructor<?>customClassConstructorprivate java.lang.reflect.Constructor<?>obsoleteCustomClassConstructor
-
Constructor Summary
Constructors Constructor Description DefaultResourceLeakDetectorFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.reflect.Constructor<?>customClassConstructor(java.lang.String customLeakDetector)<T> ResourceLeakDetector<T>newResourceLeakDetector(java.lang.Class<T> resource, int samplingInterval)Returns a new instance of aResourceLeakDetectorwith the given resource class.<T> ResourceLeakDetector<T>newResourceLeakDetector(java.lang.Class<T> resource, int samplingInterval, long maxActive)private static java.lang.reflect.Constructor<?>obsoleteCustomClassConstructor(java.lang.String customLeakDetector)-
Methods inherited from class io.netty.util.ResourceLeakDetectorFactory
instance, newResourceLeakDetector, setResourceLeakDetectorFactory
-
-
-
-
Method Detail
-
obsoleteCustomClassConstructor
private static java.lang.reflect.Constructor<?> obsoleteCustomClassConstructor(java.lang.String customLeakDetector)
-
customClassConstructor
private static java.lang.reflect.Constructor<?> customClassConstructor(java.lang.String customLeakDetector)
-
newResourceLeakDetector
public <T> ResourceLeakDetector<T> newResourceLeakDetector(java.lang.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
public <T> ResourceLeakDetector<T> newResourceLeakDetector(java.lang.Class<T> resource, int samplingInterval)
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
-
-