Package org.github.jamm

# Enum Class MemoryMeter.ByteBufferMode

java.lang.Object
java.lang.Enum<MemoryMeter.ByteBufferMode>
org.github.jamm.MemoryMeter.ByteBufferMode

All Implemented Interfaces:
  `Serializable`, `Comparable<MemoryMeter.ByteBufferMode>`, `Constable`

Enclosing class:
  `MemoryMeter`

public static enum MemoryMeter.ByteBufferMode extends Enum<MemoryMeter.ByteBufferMode>
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 Constants
Enum Constant
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.

## Method Summary

Modifier and Type
Method
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 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.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### NORMAL

public static final MemoryMeter.ByteBufferMode NORMAL
Default mode, measure the ByteBuffer and all of its children

### SLAB_ALLOCATION_NO_SLICE

public static final MemoryMeter.ByteBufferMode 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

public static final MemoryMeter.ByteBufferMode 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.

## Method Details

### values

public static MemoryMeter.ByteBufferMode[] 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 MemoryMeter.ByteBufferMode 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

### isSlab

public abstract boolean isSlab(ByteBuffer buffer)
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.