Package alluxio.resource
Class AlluxioResourceLeakDetector<T>
- java.lang.Object
-
- io.netty.util.ResourceLeakDetector<T>
-
- alluxio.resource.AlluxioResourceLeakDetector<T>
-
- Type Parameters:
T
- the type of resource the detector tracks
public class AlluxioResourceLeakDetector<T> extends io.netty.util.ResourceLeakDetector<T>
An extension of theResourceLeakDetector
with custom error messages for use in the Alluxio codebase.
-
-
Constructor Summary
Constructors Constructor Description AlluxioResourceLeakDetector(java.lang.Class<?> resourceType, int samplingInterval, boolean exitOnLeak)
Creates a new instance of the leak detector with the specific resource type and sampling interval.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
reportTracedLeak(java.lang.String resourceType, java.lang.String records)
A traced leak report which includes records of the recent accesses of the particular object and the stacktrace of where the particular object was created.protected void
reportUntracedLeak(java.lang.String resourceType)
An untraced leak report where there is no information about recent object accesses nor where the stacktrace of where the object was created.
-
-
-
Constructor Detail
-
AlluxioResourceLeakDetector
public AlluxioResourceLeakDetector(java.lang.Class<?> resourceType, int samplingInterval, boolean exitOnLeak)
Creates a new instance of the leak detector with the specific resource type and sampling interval.- Parameters:
resourceType
- the resource classsamplingInterval
- on average, how often a resource should be trackedexitOnLeak
- whether to exit the JVM when a leak is detected
-
-
Method Detail
-
reportTracedLeak
protected void reportTracedLeak(java.lang.String resourceType, java.lang.String records)
A traced leak report which includes records of the recent accesses of the particular object and the stacktrace of where the particular object was created.- Overrides:
reportTracedLeak
in classio.netty.util.ResourceLeakDetector<T>
- Parameters:
resourceType
- the class of the resource that was leakedrecords
- the stacktrace of where the leaked resource was created
-
reportUntracedLeak
protected void reportUntracedLeak(java.lang.String resourceType)
An untraced leak report where there is no information about recent object accesses nor where the stacktrace of where the object was created.- Overrides:
reportUntracedLeak
in classio.netty.util.ResourceLeakDetector<T>
- Parameters:
resourceType
- the class name of the resource which was leaked
-
-