Package io.ebean.annotation
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 Summary
Enum Constants Enum Constant Description DEFAULTThe actual mode of QUEUE, UPDATE or IGNORE is set from the default configuration.IGNOREIgnore the event and not update the document store.QUEUEAdd the event to the queue for processing later (delaying the update to the document store).UPDATEUpdate the document store when transaction succeeds.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DocStoreModevalueOf(String name)Returns the enum constant of this type with the specified name.static DocStoreMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
values
public static DocStoreMode[] 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 (DocStoreMode c : DocStoreMode.values()) System.out.println(c);
- 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 nameNullPointerException- if the argument is null
-
-