Package com.apple.foundationdb.record
Enum IndexState
- java.lang.Object
-
- java.lang.Enum<IndexState>
-
- com.apple.foundationdb.record.IndexState
-
- All Implemented Interfaces:
Serializable
,Comparable<IndexState>
@API(MAINTAINED) public enum IndexState extends Enum<IndexState>
Different states an index might be in within a given store. These states might differ between record stores that have otherwise identical meta-data.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DISABLED
Indicates that this store does not use this index.READABLE
This is the default state for an index.WRITE_ONLY
Indicates the index should not be read from but is written to.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
code()
Value corresponding to the state.static IndexState
fromCode(Object code)
String
getLogName()
static IndexState
valueOf(String name)
Returns the enum constant of this type with the specified name.static IndexState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
READABLE
public static final IndexState READABLE
This is the default state for an index. It is safe to read this index and safe to use it for queries as the record store will maintain the index as new writes come in and the index has already been built.
-
WRITE_ONLY
public static final IndexState WRITE_ONLY
Indicates the index should not be read from but is written to. This is the state that an index should be in while it is being built but the build has not completed. Queries cannot use the index, but as records are added and removed, the index is updated.
-
DISABLED
public static final IndexState DISABLED
Indicates that this store does not use this index. The index cannot service reads or queries and it is not maintained by the record store.
-
-
Method Detail
-
values
public static IndexState[] 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 (IndexState c : IndexState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IndexState valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
code
@Nonnull public Object code()
Value corresponding to the state. When this state needs to be stored within a record store, this can be used as the code.- Returns:
- the code to serialize to serialize this state
-
getLogName
public String getLogName()
-
fromCode
public static IndexState fromCode(@Nonnull Object code)
-
-