Class HealthRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<HealthRequest.Builder>
co.elastic.clients.elasticsearch.cluster.HealthRequest.Builder
- All Implemented Interfaces:
WithJson<HealthRequest.Builder>
,ObjectBuilder<HealthRequest>
- Enclosing class:
- HealthRequest
public static class HealthRequest.Builder
extends RequestBase.AbstractBuilder<HealthRequest.Builder>
implements ObjectBuilder<HealthRequest>
Builder for
HealthRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aHealthRequest
.final HealthRequest.Builder
expandWildcards
(ExpandWildcard value, ExpandWildcard... values) Whether to expand wildcard expression to concrete indices that are open, closed or both.final HealthRequest.Builder
expandWildcards
(List<ExpandWildcard> list) Whether to expand wildcard expression to concrete indices that are open, closed or both.final HealthRequest.Builder
Comma-separated list of data streams, indices, and index aliases used to limit the request.final HealthRequest.Builder
Comma-separated list of data streams, indices, and index aliases used to limit the request.final HealthRequest.Builder
Can be one of cluster, indices or shards.final HealthRequest.Builder
If true, the request retrieves information from the local node only.final HealthRequest.Builder
masterTimeout
(Time value) Period to wait for a connection to the master node.final HealthRequest.Builder
Period to wait for a connection to the master node.protected HealthRequest.Builder
self()
final HealthRequest.Builder
Period to wait for a response.final HealthRequest.Builder
Period to wait for a response.final HealthRequest.Builder
A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait.final HealthRequest.Builder
A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait.final HealthRequest.Builder
waitForEvents
(WaitForEvents value) Can be one of immediate, urgent, high, normal, low, languid.final HealthRequest.Builder
waitForNodes
(String value) The request waits until the specified number N of nodes is available.final HealthRequest.Builder
A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations.final HealthRequest.Builder
waitForNoRelocatingShards
(Boolean value) A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations.final HealthRequest.Builder
waitForStatus
(HealthStatus value) One of green, yellow or red.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
Adds all elements of
list
toexpandWildcards
. -
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
Adds one or more values to
expandWildcards
. -
index
Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indices in a cluster, omit this parameter or use _all or *.API name:
index
Adds all elements of
list
toindex
. -
index
Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indices in a cluster, omit this parameter or use _all or *.API name:
index
Adds one or more values to
index
. -
level
Can be one of cluster, indices or shards. Controls the details level of the health information returned.API name:
level
-
local
If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.API name:
local
-
masterTimeout
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout
-
masterTimeout
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout
-
timeout
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name:
timeout
-
timeout
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name:
timeout
-
waitForActiveShards
A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait.API name:
wait_for_active_shards
-
waitForActiveShards
public final HealthRequest.Builder waitForActiveShards(Function<WaitForActiveShards.Builder, ObjectBuilder<WaitForActiveShards>> fn) A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait.API name:
wait_for_active_shards
-
waitForEvents
Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed.API name:
wait_for_events
-
waitForNoInitializingShards
A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations. Defaults to false, which means it will not wait for initializing shards.API name:
wait_for_no_initializing_shards
-
waitForNoRelocatingShards
A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations. Defaults to false, which means it will not wait for relocating shards.API name:
wait_for_no_relocating_shards
-
waitForNodes
The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and <N. Alternatively, it is possible to use ge(N), le(N), gt(N) and lt(N) notation.API name:
wait_for_nodes
-
waitForStatus
One of green, yellow or red. Will wait (until the timeout provided) until the status of the cluster changes to the one provided or better, i.e. green > yellow > red. By default, will not wait for any status.API name:
wait_for_status
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<HealthRequest.Builder>
-
build
Builds aHealthRequest
.- Specified by:
build
in interfaceObjectBuilder<HealthRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-