Enum PlanHashable.PlanHashMode

java.lang.Object
java.lang.Enum<PlanHashable.PlanHashMode>
com.apple.foundationdb.record.PlanHashable.PlanHashMode
All Implemented Interfaces:
Serializable, Comparable<PlanHashable.PlanHashMode>, java.lang.constant.Constable
Enclosing interface:
PlanHashable

public static enum PlanHashable.PlanHashMode extends Enum<PlanHashable.PlanHashMode>
A mode for a plan hash which captures both kind and version. One reason we use an enum here is to force implementors to declare a new version, and to avoid greater than/less than comparisons. In reality (the future will tell), we only want at most two versions to not be deprecated.
  • Enum Constant Details

  • Method Details

    • values

      public static PlanHashable.PlanHashMode[] 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 PlanHashable.PlanHashMode 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
    • getKind

      public PlanHashable.PlanHashKind getKind()
      Get the plan hash kind associated with this mode.
      Returns:
      the plan hash kind
    • getNumericVersion

      public int getNumericVersion()
      Returns a numeric version. Do not use this information if you can. This method should strictly be used when this method is serialized, etc. However, it should not be used to switch on different plan hash versions.
      Returns:
      a numerical version