Enum LeakDetectionPolicy
- java.lang.Object
-
- java.lang.Enum<LeakDetectionPolicy>
-
- org.apache.bookkeeper.common.allocator.LeakDetectionPolicy
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<LeakDetectionPolicy>
public enum LeakDetectionPolicy extends java.lang.Enum<LeakDetectionPolicy>
Define the policy for the Netty leak detector.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description Advanced
Instruments 1% of the allocated buffer to track for leaks, reporting stack traces of places where the buffer was used.Disabled
No leak detection and no overhead.Paranoid
Instruments 100% of the allocated buffer to track for leaks, reporting stack traces of places where the buffer was used.Simple
Instruments 1% of the allocated buffer to track for leaks.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LeakDetectionPolicy
parseLevel(java.lang.String levelStr)
static LeakDetectionPolicy
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static LeakDetectionPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Disabled
public static final LeakDetectionPolicy Disabled
No leak detection and no overhead.
-
Simple
public static final LeakDetectionPolicy Simple
Instruments 1% of the allocated buffer to track for leaks.
-
Advanced
public static final LeakDetectionPolicy Advanced
Instruments 1% of the allocated buffer to track for leaks, reporting stack traces of places where the buffer was used.
-
Paranoid
public static final LeakDetectionPolicy Paranoid
Instruments 100% of the allocated buffer to track for leaks, reporting stack traces of places where the buffer was used. Introduce very significant overhead.
-
-
Method Detail
-
values
public static LeakDetectionPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LeakDetectionPolicy c : LeakDetectionPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LeakDetectionPolicy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
parseLevel
public static LeakDetectionPolicy parseLevel(java.lang.String levelStr)
-
-