Package org.elasticsearch.client
Class RequestOptions
- java.lang.Object
-
- org.elasticsearch.client.RequestOptions
-
public final class RequestOptions extends java.lang.Object
The portion of an HTTP request to Elasticsearch that can be manipulated without changing Elasticsearch's behavior.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RequestOptions.Builder
BuildsRequestOptions
.
-
Field Summary
Fields Modifier and Type Field Description static RequestOptions
DEFAULT
Default request options.
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.List<org.apache.http.Header>
getHeaders()
Headers to attach to the request.HttpAsyncResponseConsumerFactory
getHttpAsyncResponseConsumerFactory()
TheHttpAsyncResponseConsumerFactory
used to create oneHttpAsyncResponseConsumer
callback per retry.WarningsHandler
getWarningsHandler()
How this request should handle warnings.int
hashCode()
RequestOptions.Builder
toBuilder()
Create a builder that contains these options but can be modified.java.lang.String
toString()
-
-
-
Field Detail
-
DEFAULT
public static final RequestOptions DEFAULT
Default request options.
-
-
Method Detail
-
toBuilder
public RequestOptions.Builder toBuilder()
Create a builder that contains these options but can be modified.
-
getHeaders
public java.util.List<org.apache.http.Header> getHeaders()
Headers to attach to the request.
-
getHttpAsyncResponseConsumerFactory
public HttpAsyncResponseConsumerFactory getHttpAsyncResponseConsumerFactory()
TheHttpAsyncResponseConsumerFactory
used to create oneHttpAsyncResponseConsumer
callback per retry. Controls how the response body gets streamed from a non-blocking HTTP connection on the client side.
-
getWarningsHandler
public WarningsHandler getWarningsHandler()
How this request should handle warnings. If null (the default) then this request will default to the behavior dictacted byRestClientBuilder.setStrictDeprecationMode(boolean)
.This can be set to
WarningsHandler.PERMISSIVE
if the client should ignore all warnings which is the same behavior as setting strictDeprecationMode to true. It can be set toWarningsHandler.STRICT
if the client should fail if there are any warnings which is the same behavior as settings strictDeprecationMode to false.It can also be set to a custom implementation of WarningsHandler to permit only certain warnings or to fail the request if the warnings returned don't exactly match some set.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-