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.
  • Enum Constant Details

    • HIGHER_VERSION_ONLY

      public static final ReservedStateVersionCheck HIGHER_VERSION_ONLY
      Returns true 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

      public static final ReservedStateVersionCheck HIGHER_OR_SAME_VERSION
      Returns true 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

      public static ReservedStateVersionCheck[] 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

      public static ReservedStateVersionCheck valueOf(String name)
      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 name
      NullPointerException - if the argument is null