Home / Function/ newResourceLeakDetector() — netty Function Reference

newResourceLeakDetector() — netty Function Reference

Architecture documentation for the newResourceLeakDetector() function in ResourceLeakDetectorFactory.java from the netty codebase.

Function java CommonUtil Logging calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  6253fca3_3624_5884_5f7d_7404ebd9a3e8["newResourceLeakDetector()"]
  a2baa9f7_c2e2_a3ea_bda8_069d2223e0f6["DefaultResourceLeakDetectorFactory"]
  6253fca3_3624_5884_5f7d_7404ebd9a3e8 -->|defined in| a2baa9f7_c2e2_a3ea_bda8_069d2223e0f6
  70ae2cba_4e67_6af8_ed29_8669c301e51f["newResourceLeakDetector()"]
  70ae2cba_4e67_6af8_ed29_8669c301e51f -->|calls| 6253fca3_3624_5884_5f7d_7404ebd9a3e8
  70ae2cba_4e67_6af8_ed29_8669c301e51f["newResourceLeakDetector()"]
  6253fca3_3624_5884_5f7d_7404ebd9a3e8 -->|calls| 70ae2cba_4e67_6af8_ed29_8669c301e51f
  style 6253fca3_3624_5884_5f7d_7404ebd9a3e8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/ResourceLeakDetectorFactory.java lines 152–176

        @SuppressWarnings("deprecation")
        @Override
        public <T> ResourceLeakDetector<T> newResourceLeakDetector(Class<T> resource, int samplingInterval,
                                                                   long maxActive) {
            if (obsoleteCustomClassConstructor != null) {
                try {
                    @SuppressWarnings("unchecked")
                    ResourceLeakDetector<T> leakDetector =
                            (ResourceLeakDetector<T>) obsoleteCustomClassConstructor.newInstance(
                                    resource, samplingInterval, maxActive);
                    logger.debug("Loaded custom ResourceLeakDetector: {}",
                            obsoleteCustomClassConstructor.getDeclaringClass().getName());
                    return leakDetector;
                } catch (Throwable t) {
                    logger.error(
                            "Could not load custom resource leak detector provided: {} with the given resource: {}",
                            obsoleteCustomClassConstructor.getDeclaringClass().getName(), resource, t);
                }
            }

            ResourceLeakDetector<T> resourceLeakDetector = new ResourceLeakDetector<T>(resource, samplingInterval,
                                                                                       maxActive);
            logger.debug("Loaded default ResourceLeakDetector: {}", resourceLeakDetector);
            return resourceLeakDetector;
        }

Domain

Subdomains

Frequently Asked Questions

What does newResourceLeakDetector() do?
newResourceLeakDetector() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/ResourceLeakDetectorFactory.java.
Where is newResourceLeakDetector() defined?
newResourceLeakDetector() is defined in common/src/main/java/io/netty/util/ResourceLeakDetectorFactory.java at line 152.
What does newResourceLeakDetector() call?
newResourceLeakDetector() calls 1 function(s): newResourceLeakDetector.
What calls newResourceLeakDetector()?
newResourceLeakDetector() is called by 1 function(s): newResourceLeakDetector.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free