Module org.elasticsearch.server
Enum Class ReservedStateVersionCheck
java.lang.Object
java.lang.Enum<ReservedStateVersionCheck>
org.elasticsearch.reservedstate.service.ReservedStateVersionCheck
- All Implemented Interfaces:
Serializable
,Comparable<ReservedStateVersionCheck>
,Constable
,BiPredicate<Long,
Long>
public enum ReservedStateVersionCheck
extends Enum<ReservedStateVersionCheck>
implements BiPredicate<Long,Long>
Enum representing the logic for determining whether a reserved state should be processed
based on the current and new versions.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReturnstrue
if the new version is higher or equal to the current version.Returnstrue
if the new version is higher than the current version. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReservedStateVersionCheck
Returns the enum constant of this class with the specified name.static ReservedStateVersionCheck[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface java.util.function.BiPredicate
and, negate, or, test
-
Enum Constant Details
-
HIGHER_VERSION_ONLY
Returnstrue
if the new version is higher than the current version. This is the default behavior when processing changes to file settings. -
HIGHER_OR_SAME_VERSION
Returnstrue
if the new version is higher or equal to the current version. This allows re-processing of the same version. Used when processing file settings during service startup.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-