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
FieldsModifier and TypeFieldDescriptionprivate final java.lang.reflect.Constructor<?> private final java.lang.reflect.Constructor<?> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate 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 ResourceLeakDetectorFactory
instance, newResourceLeakDetector, setResourceLeakDetectorFactoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
obsoleteCustomClassConstructor
private final java.lang.reflect.Constructor<?> obsoleteCustomClassConstructor -
customClassConstructor
private final java.lang.reflect.Constructor<?> customClassConstructor
-
-
Constructor Details
-
DefaultResourceLeakDetectorFactory
DefaultResourceLeakDetectorFactory()
-
-
Method Details
-
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
-