com.hammurapi.store

## Enum Index.Type

- java.lang.Object
- - java.lang.Enum<Index.Type>
  - - com.hammurapi.store.Index.Type

- All Implemented Interfaces:
    Serializable, Comparable<Index.Type>
  Enclosing interface:
    Index<ST,T extends ST,PK,V,S extends Store<ST,PK,S>>

      public static enum Index.Type
      extends Enum<Index.Type>

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ASYNCHRONOUS` Asynchronous index modifications get evaluated in a separate task.
    `LAZY` Lazy index modifications get queued and are evaluated as part of the access operation (by reader).
    `SYNCHRONOUS` Synchronous indices as evaluated as part of insert/update (by writer).
    `UNIQUE` Unique index is evaluated as part of insert/update (synchronously).

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Index.Type` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static Index.Type[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### UNIQUE

          public static final Index.Type UNIQUE

      Unique index is evaluated as part of insert/update (synchronously). If uniqueness is violated, exception is thrown and insert/update is not executed.

    - #### SYNCHRONOUS

          public static final Index.Type SYNCHRONOUS

      Synchronous indices as evaluated as part of insert/update (by writer). If index extractor throws an exception, this exception is propagated to the caller and insert/update operation doesn't get executed.

    - #### ASYNCHRONOUS

          public static final Index.Type ASYNCHRONOUS

      Asynchronous index modifications get evaluated in a separate task. If reader accesses the index before the index update task goes to execution, index update is performed as part of the access operation (by reader). If index extractor throws exception, then index gets marked as corrupted and is removed from the store. If the reader accesses the index directly through one of index interfaces, then the exception is propagated to the caller code. All operations on a corrupted index result in exception.

    - #### LAZY

          public static final Index.Type LAZY

      Lazy index modifications get queued and are evaluated as part of the access operation (by reader). If index extractor throws exception, then index gets marked as corrupted and is removed from the store. If the reader accesses the index directly through one of index interfaces, then the exception is propagated to the caller code. All operations on a corrupted index result in exception.

  - ### Method Detail

    - #### values

          public static Index.Type[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (Index.Type c : Index.Type.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static Index.Type 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