public abstract class ResourceLeakDetectorFactory
extends java.lang.Object
ResourceLeakDetector
| Constructor and Description |
|---|
ResourceLeakDetectorFactory() |
| Modifier and Type | Method and Description |
|---|---|
static ResourceLeakDetectorFactory |
instance()
获取此工厂类的单例实例。
|
<T> ResourceLeakDetector<T> |
newResourceLeakDetector(java.lang.Class<T> resource)
用给定的资源类返回 ResourceLeakDetector的新实例。
|
<T> ResourceLeakDetector<T> |
newResourceLeakDetector(java.lang.Class<T> resource, int samplingInterval)
用给定的资源类返回 ResourceLeakDetector的新实例。
|
abstract <T> ResourceLeakDetector<T> |
newResourceLeakDetector(java.lang.Class<T> resource, int samplingInterval, long maxActive)
已过时。
改为使用
newResourceLeakDetector(Class, int) 。
返回具有给定资源类的 |
static void |
setResourceLeakDetectorFactory(ResourceLeakDetectorFactory factory)
设置工厂的单例实例。
|
public static ResourceLeakDetectorFactory instance()
public static void setResourceLeakDetectorFactory(ResourceLeakDetectorFactory factory)
factory - 将成为当前ResourceLeakDetectorFactory的单例的实例
public final <T> ResourceLeakDetector<T> newResourceLeakDetector(java.lang.Class<T> resource)
ResourceLeakDetector的新实例。
T - 资源类的类型
resource - 用于初始化ResourceLeakDetector的资源类
ResourceLeakDetector的新实例
@Deprecated public abstract <T> ResourceLeakDetector<T> newResourceLeakDetector(java.lang.Class<T> resource, int samplingInterval, long maxActive)
T - 资源类的类型
resource - 用于初始化ResourceLeakDetector的资源类
samplingInterval - 采样发生的时间间隔
maxActive - 这是不赞成的,将被忽略。
ResourceLeakDetector的新实例
public <T> ResourceLeakDetector<T> newResourceLeakDetector(java.lang.Class<T> resource, int samplingInterval)
ResourceLeakDetector的新实例。
T - 资源类的类型
resource - 用于初始化ResourceLeakDetector的资源类
samplingInterval - 采样发生的时间间隔
ResourceLeakDetector的新实例
Copyright © 2008–2018 The Netty Project. All rights reserved.