public enum MemoryAccessStrategy extends Enum<MemoryAccessStrategy>
| Enum Constant and Description |
|---|
DIRECT
Os dados são gravados fora do heap.
|
HEAP
Os dados são gravados no heap.
|
UNSAFE
Os dados são gravados fora do heap.
|
| Modifier and Type | Method and Description |
|---|---|
static MemoryAccessStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MemoryAccessStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MemoryAccessStrategy HEAP
Equivale ao trecho a seguir:
segmentMemory = new byte[capacity];
public static final MemoryAccessStrategy DIRECT
Equivale ao trecho a seguir:
segmentMemory = ByteBuffer.allocateDirect(capacity);
public static final MemoryAccessStrategy UNSAFE
Equivale ao trecho a seguir:
segmentMemory = Unsafe.allocateMemory(capacity);
public static MemoryAccessStrategy[] values()
for (MemoryAccessStrategy c : MemoryAccessStrategy.values()) System.out.println(c);
public static MemoryAccessStrategy 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 nullCopyright © 2016. All rights reserved.