private static final class ResourceLeakDetectorFactory.DefaultResourceLeakDetectorFactory extends ResourceLeakDetectorFactory
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Constructor<?> |
customClassConstructor |
private java.lang.reflect.Constructor<?> |
obsoleteCustomClassConstructor |
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)
Returns a new instance of a
ResourceLeakDetector with 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) |
instance, newResourceLeakDetector, setResourceLeakDetectorFactory
private final java.lang.reflect.Constructor<?> obsoleteCustomClassConstructor
private final java.lang.reflect.Constructor<?> customClassConstructor
private static java.lang.reflect.Constructor<?> obsoleteCustomClassConstructor(java.lang.String customLeakDetector)
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)
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
- This is deprecated and will be ignored.ResourceLeakDetector
public <T> ResourceLeakDetector<T> newResourceLeakDetector(java.lang.Class<T> resource, int samplingInterval)
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 placeResourceLeakDetector