public static enum MemoryMeter.ByteBufferMode extends Enum<MemoryMeter.ByteBufferMode>
| Enum Constant and Description |
|---|
NORMAL
Default mode, measure the ByteBuffer and all of its children
|
SLAB_ALLOCATION_NO_SLICE
Mode used to handle SLAB allocated
ByteBuffers, 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 allocated
ByteBuffers, with slices, where the overhead amortized over all
the allocations is negligible and we prefer to undercount than over count. |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
isSlab(ByteBuffer buffer)
Checks if this buffer can be considered as a SLAB according to this mode.
|
static MemoryMeter.ByteBufferMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MemoryMeter.ByteBufferMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MemoryMeter.ByteBufferMode NORMAL
public static final MemoryMeter.ByteBufferMode SLAB_ALLOCATION_NO_SLICE
ByteBuffers, without slices, where the overhead amortized over all
the allocations is negligible and we prefer to undercount than over count.public static final MemoryMeter.ByteBufferMode SLAB_ALLOCATION_SLICE
ByteBuffers, with slices, where the overhead amortized over all
the allocations is negligible and we prefer to undercount than over count.public static MemoryMeter.ByteBufferMode[] values()
for (MemoryMeter.ByteBufferMode c : MemoryMeter.ByteBufferMode.values()) System.out.println(c);
public static MemoryMeter.ByteBufferMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract boolean isSlab(ByteBuffer buffer)
buffer - the buffer to check.true if this buffer can be considered as a SLAB according to this mode, false otherwise.Copyright © 2023. All rights reserved.