Class 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 the ResourceLeakDetector with custom error messages for use in the Alluxio codebase.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class io.netty.util.ResourceLeakDetector

        io.netty.util.ResourceLeakDetector.Level
    • 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.
      • Methods inherited from class io.netty.util.ResourceLeakDetector

        addExclusions, getLevel, isEnabled, needReport, open, reportInstancesLeak, setEnabled, setLevel, track
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 class
        samplingInterval - on average, how often a resource should be tracked
        exitOnLeak - 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 class io.netty.util.ResourceLeakDetector<T>
        Parameters:
        resourceType - the class of the resource that was leaked
        records - 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 class io.netty.util.ResourceLeakDetector<T>
        Parameters:
        resourceType - the class name of the resource which was leaked