Package com.github.ambry.store
Enum IndexMemState
- java.lang.Object
-
- java.lang.Enum<IndexMemState>
-
- com.github.ambry.store.IndexMemState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<IndexMemState>
public enum IndexMemState extends java.lang.Enum<IndexMemState>
Values for different ways in which the index of aStore
can be maintained. The values are hints for the actual implementations which can choose to respect or ignore the hints.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IN_DIRECT_MEM
Index should be in direct (off-heap) memory.IN_HEAP_MEM
Index should be in heap memory.MMAP_WITH_FORCE_LOAD
Index should be mmap-ed and force loaded into memory.MMAP_WITHOUT_FORCE_LOAD
Index should be read from an mmap-ed file, but not forced to reside in memory.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IndexMemState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static IndexMemState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MMAP_WITHOUT_FORCE_LOAD
public static final IndexMemState MMAP_WITHOUT_FORCE_LOAD
Index should be read from an mmap-ed file, but not forced to reside in memory.
-
MMAP_WITH_FORCE_LOAD
public static final IndexMemState MMAP_WITH_FORCE_LOAD
Index should be mmap-ed and force loaded into memory. The index should make a best effort to keep the segments in memory, but it is not guaranteed.
-
IN_HEAP_MEM
public static final IndexMemState IN_HEAP_MEM
Index should be in heap memory.
-
IN_DIRECT_MEM
public static final IndexMemState IN_DIRECT_MEM
Index should be in direct (off-heap) memory.
-
-
Method Detail
-
values
public static IndexMemState[] 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 (IndexMemState c : IndexMemState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IndexMemState 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
-
-