Package org.elasticsearch.client
Class RequestOptions
java.lang.Object
org.elasticsearch.client.RequestOptions
The portion of an HTTP request to Elasticsearch that can be
manipulated without changing Elasticsearch's behavior.
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsHeader
(String name) Return true if the options contain the given headerboolean
List<org.apache.http.Header>
Headers to attach to the request.TheHttpAsyncResponseConsumerFactory
used to create oneHttpAsyncResponseConsumer
callback per retry.org.apache.http.client.config.RequestConfig
get RequestConfig, which can set socketTimeout, connectTimeout and so on by requestHow this request should handle warnings.int
hashCode()
Create a builder that contains these options but can be modified.toString()
-
Field Details
-
DEFAULT
Default request options.
-
-
Method Details
-
toBuilder
Create a builder that contains these options but can be modified. -
getHeaders
Headers to attach to the request. -
containsHeader
Return true if the options contain the given header -
getParameters
-
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
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.
-
getRequestConfig
public org.apache.http.client.config.RequestConfig getRequestConfig()get RequestConfig, which can set socketTimeout, connectTimeout and so on by request- Returns:
- RequestConfig
-
toString
-
equals
-
hashCode
public int hashCode()
-