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, setResourceLeakDetectorFactoryprivate 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 ResourceLeakDetectorFactoryT - the type of the resource classresource - the resource class used to initialize the ResourceLeakDetectorsamplingInterval - the interval on which sampling takes placemaxActive - This is deprecated and will be ignored.ResourceLeakDetectorpublic <T> ResourceLeakDetector<T> newResourceLeakDetector(java.lang.Class<T> resource, int samplingInterval)
ResourceLeakDetectorFactoryResourceLeakDetector with the given resource class.newResourceLeakDetector in class ResourceLeakDetectorFactoryT - the type of the resource classresource - the resource class used to initialize the ResourceLeakDetectorsamplingInterval - the interval on which sampling takes placeResourceLeakDetector