Package org.github.jamm
Enum Class MemoryMeter.ByteBufferMode
- All Implemented Interfaces:
Serializable
,Comparable<MemoryMeter.ByteBufferMode>
,Constable
- Enclosing class:
- MemoryMeter
The different way of measuring deeply a ByteBuffer.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDefault mode, measure the ByteBuffer and all of its childrenMode used to handle SLAB allocatedByteBuffers
, without slices, where the overhead amortized over all the allocations is negligible and we prefer to undercount than over count.Mode used to handle SLAB allocatedByteBuffers
, with slices, where the overhead amortized over all the allocations is negligible and we prefer to undercount than over count. -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
isSlab
(ByteBuffer buffer) Checks if this buffer can be considered as a SLAB according to this mode.static MemoryMeter.ByteBufferMode
Returns the enum constant of this class with the specified name.static MemoryMeter.ByteBufferMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NORMAL
Default mode, measure the ByteBuffer and all of its children -
SLAB_ALLOCATION_NO_SLICE
Mode used to handle SLAB allocatedByteBuffers
, without slices, where the overhead amortized over all the allocations is negligible and we prefer to undercount than over count. -
SLAB_ALLOCATION_SLICE
Mode used to handle SLAB allocatedByteBuffers
, with slices, where the overhead amortized over all the allocations is negligible and we prefer to undercount than over count.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
isSlab
Checks if this buffer can be considered as a SLAB according to this mode.- Parameters:
buffer
- the buffer to check.- Returns:
true
if this buffer can be considered as a SLAB according to this mode,false
otherwise.
-