Enum SearchContext.Lifetime
- java.lang.Object
-
- java.lang.Enum<SearchContext.Lifetime>
-
- org.elasticsearch.search.internal.SearchContext.Lifetime
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SearchContext.Lifetime>
- Enclosing class:
- SearchContext
public static enum SearchContext.Lifetime extends java.lang.Enum<SearchContext.Lifetime>
The life time of an object that is used during search execution.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COLLECTION
This life time is for objects that only live during collection time.CONTEXT
This life time is for objects that need to live until the search context they are attached to is destroyed.PHASE
This life time is for objects that need to live until the end of the current search phase.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SearchContext.Lifetime
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SearchContext.Lifetime[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
COLLECTION
public static final SearchContext.Lifetime COLLECTION
This life time is for objects that only live during collection time.
-
PHASE
public static final SearchContext.Lifetime PHASE
This life time is for objects that need to live until the end of the current search phase.
-
CONTEXT
public static final SearchContext.Lifetime CONTEXT
This life time is for objects that need to live until the search context they are attached to is destroyed.
-
-
Method Detail
-
values
public static SearchContext.Lifetime[] 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 (SearchContext.Lifetime c : SearchContext.Lifetime.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SearchContext.Lifetime valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-