Package com.apple.foundationdb.record
Enum IndexState
- All Implemented Interfaces:
Serializable
,Comparable<IndexState>
,java.lang.constant.Constable
Different states an index might be in within a given store.
These states might differ between record stores that have
otherwise identical meta-data.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that this store does not use this index.This is the default state for an index.Indicates that this unique index is fully "indexed", but some uniqueness violations still exist.Indicates the index should not be read from but is written to. -
Method Summary
Modifier and TypeMethodDescriptioncode()
Value corresponding to the state.static IndexState
boolean
boolean
static IndexState
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 Details
-
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
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
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. -
READABLE_UNIQUE_PENDING
Indicates that this unique index is fully "indexed", but some uniqueness violations still exist. This may happen when the online indexer finds some duplicating records. In this mode, it is safe to consider an index asREADABLE
for queries as long as uniqueness is not assumed.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
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
-
isScannable
public boolean isScannable() -
isWriteOnly
public boolean isWriteOnly() -
fromCode
-