Enum GenerationPolicy

java.lang.Object
java.lang.Enum<GenerationPolicy>
com.aerospike.client.policy.GenerationPolicy
All Implemented Interfaces:
Serializable, Comparable<GenerationPolicy>, java.lang.constant.Constable

public enum GenerationPolicy
extends Enum<GenerationPolicy>
How to handle record writes based on record generation.
  • Enum Constant Details

    • NONE

      public static final GenerationPolicy NONE
      Do not use record generation to restrict writes.
    • EXPECT_GEN_EQUAL

      public static final GenerationPolicy EXPECT_GEN_EQUAL
      Update/delete record if expected generation is equal to server generation. Otherwise, fail.
    • EXPECT_GEN_GT

      public static final GenerationPolicy EXPECT_GEN_GT
      Update/delete record if expected generation greater than the server generation. Otherwise, fail. This is useful for restore after backup.
  • Method Details

    • values

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

      public static GenerationPolicy 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 name
      NullPointerException - if the argument is null