Enum DocStoreMode

java.lang.Object
java.lang.Enum<DocStoreMode>
io.ebean.annotation.DocStoreMode
All Implemented Interfaces:
Serializable, Comparable<DocStoreMode>

public enum DocStoreMode extends Enum<DocStoreMode>
Defines the behavior options when a Insert, Update or Delete event occurs on a bean with an associated ElasticSearch index.

For some indexes or some transactions it can be beneficial to queue the event for later processing rather than look to update ElasticSearch at that time.

  • Enum Constant Details

    • QUEUE

      public static final DocStoreMode QUEUE
      Add the event to the queue for processing later (delaying the update to the document store).
    • UPDATE

      public static final DocStoreMode UPDATE
      Update the document store when transaction succeeds.
    • IGNORE

      public static final DocStoreMode IGNORE
      Ignore the event and not update the document store.

      This can be used on a index or for a transaction where you want to have more manual programmatic control over the updating of the document store. Say you want to IGNORE on a particular transaction and instead manually queue a bulk update.

    • DEFAULT

      public static final DocStoreMode DEFAULT
      The actual mode of QUEUE, UPDATE or IGNORE is set from the default configuration.
  • Method Details

    • values

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