Enum Class LeakDetection

java.lang.Object
java.lang.Enum<LeakDetection>
cloud.opencode.base.classloader.leak.LeakDetection
All Implemented Interfaces:
Serializable, Comparable<LeakDetection>, Constable

public enum LeakDetection extends Enum<LeakDetection>
Leak detection level for ClassLoader lifecycle tracking ClassLoader 生命周期追踪的泄漏检测级别

Defines the level of detail captured when tracking ClassLoader instances for potential memory leaks. Higher levels provide more diagnostic information at the cost of additional overhead.

定义追踪 ClassLoader 实例潜在内存泄漏时捕获的详细程度。 更高级别在额外开销的代价下提供更多诊断信息。

Security | 安全性:

  • Thread-safe: Yes (immutable enum) - 线程安全: 是 (不可变枚举)
Since:
JDK 25, opencode-base-classloader V1.0.3
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Enum Constant Details

    • DISABLED

      public static final LeakDetection DISABLED
      No leak detection — zero overhead 不检测泄漏 — 零开销
    • SIMPLE

      public static final LeakDetection SIMPLE
      Simple detection using PhantomReference to track unclosed ClassLoaders 简单检测,使用 PhantomReference 追踪未关闭的 ClassLoader
    • PARANOID

      public static final LeakDetection PARANOID
      Paranoid detection: SIMPLE + records creation stack trace for diagnostics 偏执检测: SIMPLE + 记录创建栈轨迹用于诊断
  • Method Details

    • values

      public static LeakDetection[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LeakDetection valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null