Enum OnlineIndexer.IndexStatePrecondition
- java.lang.Object
-
- java.lang.Enum<OnlineIndexer.IndexStatePrecondition>
-
- com.apple.foundationdb.record.provider.foundationdb.OnlineIndexer.IndexStatePrecondition
-
- All Implemented Interfaces:
Serializable
,Comparable<OnlineIndexer.IndexStatePrecondition>
- Enclosing class:
- OnlineIndexer
public static enum OnlineIndexer.IndexStatePrecondition extends Enum<OnlineIndexer.IndexStatePrecondition>
This defines in which situations the index should be built.BUILD_IF_DISABLED
,BUILD_IF_DISABLED_CONTINUE_BUILD_IF_WRITE_ONLY
,BUILD_IF_DISABLED_REBUILD_IF_WRITE_ONLY
, andFORCE_BUILD
are sorted in a way so that each option will build the index in more situations than the ones before it.Of these,
BUILD_IF_DISABLED_CONTINUE_BUILD_IF_WRITE_ONLY
is recommended if there is no reason to believe current index data is corrupted.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BUILD_IF_DISABLED
Only build if the index is disabled.BUILD_IF_DISABLED_CONTINUE_BUILD_IF_WRITE_ONLY
Build if the index is disabled; Continue build if the index is write-only.BUILD_IF_DISABLED_REBUILD_IF_WRITE_ONLY
Build if the index is disabled; Rebuild if the index is write-only.ERROR_IF_DISABLED_CONTINUE_IF_WRITE_ONLY
Error if the index is disabled, or continue to build if the index is write only.FORCE_BUILD
Rebuild the index anyway, no matter it it disabled or write-only or readable.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isContinueIfWriteOnly()
static OnlineIndexer.IndexStatePrecondition
valueOf(String name)
Returns the enum constant of this type with the specified name.static OnlineIndexer.IndexStatePrecondition[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BUILD_IF_DISABLED
public static final OnlineIndexer.IndexStatePrecondition BUILD_IF_DISABLED
Only build if the index is disabled.
-
BUILD_IF_DISABLED_CONTINUE_BUILD_IF_WRITE_ONLY
public static final OnlineIndexer.IndexStatePrecondition BUILD_IF_DISABLED_CONTINUE_BUILD_IF_WRITE_ONLY
Build if the index is disabled; Continue build if the index is write-only.Recommended. This should be sufficient if current index data is not corrupted.
-
BUILD_IF_DISABLED_REBUILD_IF_WRITE_ONLY
public static final OnlineIndexer.IndexStatePrecondition BUILD_IF_DISABLED_REBUILD_IF_WRITE_ONLY
Build if the index is disabled; Rebuild if the index is write-only.
-
FORCE_BUILD
public static final OnlineIndexer.IndexStatePrecondition FORCE_BUILD
Rebuild the index anyway, no matter it it disabled or write-only or readable.
-
ERROR_IF_DISABLED_CONTINUE_IF_WRITE_ONLY
public static final OnlineIndexer.IndexStatePrecondition ERROR_IF_DISABLED_CONTINUE_IF_WRITE_ONLY
Error if the index is disabled, or continue to build if the index is write only. To use this option to build an index, one should mark the index as write-only and clear existing index entries before building. This option is provided to makeOnlineIndexer.buildIndexAsync()
(or its variations) behave same as what it did before version 2.8.90.0, which is not recommended.BUILD_IF_DISABLED_CONTINUE_BUILD_IF_WRITE_ONLY
should be adopted instead.
-
-
Method Detail
-
values
public static OnlineIndexer.IndexStatePrecondition[] 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 (OnlineIndexer.IndexStatePrecondition c : OnlineIndexer.IndexStatePrecondition.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OnlineIndexer.IndexStatePrecondition 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
-
isContinueIfWriteOnly
public boolean isContinueIfWriteOnly()
-
-