Package org.elasticsearch.action.support
Enum WriteRequest.RefreshPolicy
- java.lang.Object
-
- java.lang.Enum<WriteRequest.RefreshPolicy>
-
- org.elasticsearch.action.support.WriteRequest.RefreshPolicy
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<WriteRequest.RefreshPolicy>
,java.lang.constant.Constable
,Writeable
- Enclosing interface:
- WriteRequest<R extends WriteRequest<R>>
public static enum WriteRequest.RefreshPolicy extends java.lang.Enum<WriteRequest.RefreshPolicy> implements Writeable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IMMEDIATE
Force a refresh as part of this request.NONE
Don't refresh after this request.WAIT_UNTIL
Leave this request open until a refresh has made the contents of this request visible to search.
-
Method Summary
Modifier and Type Method Description java.lang.String
getValue()
static WriteRequest.RefreshPolicy
parse(java.lang.String value)
Parse the string representation of a refresh policy, usually from a request parameter.static WriteRequest.RefreshPolicy
readFrom(StreamInput in)
static WriteRequest.RefreshPolicy
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static WriteRequest.RefreshPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.void
writeTo(StreamOutput out)
Write this into the StreamOutput.
-
-
-
Enum Constant Detail
-
NONE
public static final WriteRequest.RefreshPolicy NONE
Don't refresh after this request. The default.
-
IMMEDIATE
public static final WriteRequest.RefreshPolicy 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
public static final WriteRequest.RefreshPolicy 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 Detail
-
values
public static WriteRequest.RefreshPolicy[] 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 WriteRequest.RefreshPolicy 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
-
getValue
public java.lang.String getValue()
-
parse
public static WriteRequest.RefreshPolicy parse(java.lang.String value)
Parse the string representation of a refresh policy, usually from a request parameter.
-
readFrom
public static WriteRequest.RefreshPolicy readFrom(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Writeable
Write this into the StreamOutput.
-
-