Class ResourceLeakDetectorFactory.DefaultResourceLeakDetectorFactory

java.lang.Object
io.netty.util.ResourceLeakDetectorFactory
io.netty.util.ResourceLeakDetectorFactory.DefaultResourceLeakDetectorFactory
Enclosing class:
ResourceLeakDetectorFactory

private static final class ResourceLeakDetectorFactory.DefaultResourceLeakDetectorFactory extends ResourceLeakDetectorFactory
Default implementation that loads custom leak detector via system property
  • Field Details

    • obsoleteCustomClassConstructor

      private final java.lang.reflect.Constructor<?> obsoleteCustomClassConstructor
    • customClassConstructor

      private final java.lang.reflect.Constructor<?> customClassConstructor
  • Constructor Details

    • DefaultResourceLeakDetectorFactory

      DefaultResourceLeakDetectorFactory()
  • Method Details

    • obsoleteCustomClassConstructor

      private static java.lang.reflect.Constructor<?> obsoleteCustomClassConstructor(java.lang.String customLeakDetector)
    • customClassConstructor

      private static java.lang.reflect.Constructor<?> customClassConstructor(java.lang.String customLeakDetector)
    • newResourceLeakDetector

      public <T> ResourceLeakDetector<T> newResourceLeakDetector(java.lang.Class<T> resource, int samplingInterval, long maxActive)
      Specified by:
      newResourceLeakDetector in class ResourceLeakDetectorFactory
      Type Parameters:
      T - the type of the resource class
      Parameters:
      resource - the resource class used to initialize the ResourceLeakDetector
      samplingInterval - the interval on which sampling takes place
      maxActive - This is deprecated and will be ignored.
      Returns:
      a new instance of ResourceLeakDetector
    • newResourceLeakDetector

      public <T> ResourceLeakDetector<T> newResourceLeakDetector(java.lang.Class<T> resource, int samplingInterval)
      Description copied from class: ResourceLeakDetectorFactory
      Returns a new instance of a ResourceLeakDetector with the given resource class.
      Overrides:
      newResourceLeakDetector in class ResourceLeakDetectorFactory
      Type Parameters:
      T - the type of the resource class
      Parameters:
      resource - the resource class used to initialize the ResourceLeakDetector
      samplingInterval - the interval on which sampling takes place
      Returns:
      a new instance of ResourceLeakDetector