public abstract class ResourceLeakDetectorFactory extends Object
ResourceLeakDetectors as needed| Constructor and Description |
|---|
ResourceLeakDetectorFactory() |
| Modifier and Type | Method and Description |
|---|---|
static ResourceLeakDetectorFactory |
instance()
Get the singleton instance of this factory class.
|
<T> ResourceLeakDetector<T> |
newResourceLeakDetector(Class<T> resource)
Returns a new instance of a
ResourceLeakDetector with the given resource class. |
<T> ResourceLeakDetector<T> |
newResourceLeakDetector(Class<T> resource,
int samplingInterval)
Returns a new instance of a
ResourceLeakDetector with the given resource class. |
abstract <T> ResourceLeakDetector<T> |
newResourceLeakDetector(Class<T> resource,
int samplingInterval,
long maxActive)
Deprecated.
Use
newResourceLeakDetector(Class, int) instead.
Returns a new instance of a |
static void |
setResourceLeakDetectorFactory(ResourceLeakDetectorFactory factory)
Set the factory's singleton instance.
|
public static ResourceLeakDetectorFactory instance()
ResourceLeakDetectorFactorypublic static void setResourceLeakDetectorFactory(ResourceLeakDetectorFactory factory)
ResourceLeakDetector is called by all the callers of this factory. That is, before initializing a
Netty Bootstrap.factory - the instance that will become the current ResourceLeakDetectorFactory's singletonpublic final <T> ResourceLeakDetector<T> newResourceLeakDetector(Class<T> resource)
ResourceLeakDetector with the given resource class.T - the type of the resource classresource - the resource class used to initialize the ResourceLeakDetectorResourceLeakDetector@Deprecated public abstract <T> ResourceLeakDetector<T> newResourceLeakDetector(Class<T> resource, int samplingInterval, long maxActive)
newResourceLeakDetector(Class, int) instead.
Returns a new instance of a ResourceLeakDetector with the given resource class.
T - 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(Class<T> resource, int samplingInterval)
ResourceLeakDetector with the given resource class.T - the type of the resource classresource - the resource class used to initialize the ResourceLeakDetectorsamplingInterval - the interval on which sampling takes placeResourceLeakDetectorCopyright © 2008–2025 The Netty Project. All rights reserved.