private static final class ResourceLeakDetectorFactory.DefaultResourceLeakDetectorFactory extends ResourceLeakDetectorFactory
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Constructor<?> |
customClassConstructor |
Constructor and Description |
---|
DefaultResourceLeakDetectorFactory() |
Modifier and Type | Method and Description |
---|---|
private static java.lang.reflect.Constructor<?> |
customClassConstructor(java.lang.String customLeakDetector) |
<T> ResourceLeakDetector<T> |
newResourceLeakDetector(java.lang.Class<T> resource,
int samplingInterval,
long maxActive)
Returns a new instance of a
ResourceLeakDetector with the given resource class. |
instance, newResourceLeakDetector, setResourceLeakDetectorFactory
private final java.lang.reflect.Constructor<?> customClassConstructor
private static java.lang.reflect.Constructor<?> customClassConstructor(java.lang.String customLeakDetector)
public <T> ResourceLeakDetector<T> newResourceLeakDetector(java.lang.Class<T> resource, int samplingInterval, long maxActive)
ResourceLeakDetectorFactory
ResourceLeakDetector
with the given resource class.newResourceLeakDetector
in class ResourceLeakDetectorFactory
T
- - the type of the resource classresource
- - the resource class used to initialize the ResourceLeakDetector
samplingInterval
- - the interval on which sampling takes placemaxActive
- - the maximum active instancesResourceLeakDetector