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>
,java.lang.constant.Constable
- 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.
-
Nested Class Summary
-
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
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 Details
-
COLLECTION
This life time is for objects that only live during collection time. -
PHASE
This life time is for objects that need to live until the end of the current search phase. -
CONTEXT
This life time is for objects that need to live until the search context they are attached to is destroyed.
-
-
Method Details
-
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
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
-