Enum Class RefreshPolicy
- All Implemented Interfaces:
Serializable
,Comparable<RefreshPolicy>
,Constable
Enumeration of values that control the refresh policy for a request that
supports specifying a refresh policy.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionForce a refresh as part of this request.Don't refresh after this request.Leave this request open until a refresh has made the contents of this request visible to search. -
Method Summary
Modifier and TypeMethodDescriptionstatic RefreshPolicy
Get the default refresh policy, which isNONE
getValue()
static RefreshPolicy
Returns the enum constant of this class with the specified name.static RefreshPolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Don't refresh after this request. The default. -
IMMEDIATE
Force a refresh as part of this request. This refresh policy does not scale for high indexing or search throughput but is useful to present a consistent view to for indices with very low traffic. And it is wonderful for tests! -
WAIT_UNTIL
Leave this request open until a refresh has made the contents of this request visible to search. This refresh policy is compatible with high indexing and search throughput but it causes the request to wait to reply until a refresh occurs.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
-
getDefault
Get the default refresh policy, which isNONE
-