Enum IndexState

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

@API(UNSTABLE) public enum IndexState extends Enum<IndexState>
Different states an index might be in within a given store. These states might differ between record stores that have otherwise identical meta-data.
  • Enum Constant Details

    • READABLE

      public static final IndexState READABLE
      This is the default state for an index. It is safe to read this index and safe to use it for queries as the record store will maintain the index as new writes come in and the index has already been built.
    • WRITE_ONLY

      public static final IndexState WRITE_ONLY
      Indicates the index should not be read from but is written to. This is the state that an index should be in while it is being built but the build has not completed. Queries cannot use the index, but as records are added and removed, the index is updated.
    • DISABLED

      public static final IndexState DISABLED
      Indicates that this store does not use this index. The index cannot service reads or queries and it is not maintained by the record store.
    • READABLE_UNIQUE_PENDING

      public static final IndexState READABLE_UNIQUE_PENDING
      Indicates that this unique index is fully "indexed", but some uniqueness violations still exist. This may happen when the online indexer finds some duplicating records. In this mode, it is safe to consider an index as READABLE for queries as long as uniqueness is not assumed.
  • Method Details

    • values

      public static IndexState[] 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 IndexState 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
    • code

      @Nonnull public Object code()
      Value corresponding to the state. When this state needs to be stored within a record store, this can be used as the code.
      Returns:
      the code to serialize to serialize this state
    • getLogName

      public String getLogName()
    • isScannable

      public boolean isScannable()
    • isWriteOnly

      public boolean isWriteOnly()
    • fromCode

      public static IndexState fromCode(@Nonnull Object code)