Class HealthRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch.cluster.HealthRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<HealthRequest>
- Enclosing class:
- HealthRequest
public static class HealthRequest.Builder extends java.lang.Object implements ObjectBuilder<HealthRequest>
Builder for
HealthRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description HealthRequest.Builder
addExpandWildcards(ExpandWildcardOptions value)
Add a value toexpandWildcards(List)
, creating the list if needed.HealthRequest.Builder
addIndex(java.lang.String value)
Add a value toindex(List)
, creating the list if needed.HealthRequest
build()
Builds aHealthRequest
.HealthRequest.Builder
expandWildcards(ExpandWildcardOptions... value)
Whether to expand wildcard expression to concrete indices that are open, closed or both.HealthRequest.Builder
expandWildcards(java.util.List<ExpandWildcardOptions> value)
Whether to expand wildcard expression to concrete indices that are open, closed or both.HealthRequest.Builder
index(java.lang.String... value)
Comma-separated list of data streams, indices, and index aliases used to limit the request.HealthRequest.Builder
index(java.util.List<java.lang.String> value)
Comma-separated list of data streams, indices, and index aliases used to limit the request.HealthRequest.Builder
level(Level value)
Can be one of cluster, indices or shards.HealthRequest.Builder
local(java.lang.Boolean value)
If true, the request retrieves information from the local node only.HealthRequest.Builder
masterTimeout(java.lang.String value)
Period to wait for a connection to the master node.HealthRequest.Builder
timeout(java.lang.String value)
Period to wait for a response.HealthRequest.Builder
waitForActiveShards(jakarta.json.JsonValue value)
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.HealthRequest.Builder
waitForEvents(WaitForEvents value)
Can be one of immediate, urgent, high, normal, low, languid.HealthRequest.Builder
waitForNodes(java.lang.String value)
The request waits until the specified number N of nodes is available.HealthRequest.Builder
waitForNoInitializingShards(java.lang.Boolean value)
A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations.HealthRequest.Builder
waitForNoRelocatingShards(java.lang.Boolean value)
A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations.HealthRequest.Builder
waitForStatus(WaitForStatus value)
One of green, yellow or red.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
-
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
-
addIndex
Add a value toindex(List)
, creating the list if needed. -
expandWildcards
public HealthRequest.Builder expandWildcards(@Nullable java.util.List<ExpandWildcardOptions> value)Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
-
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
-
addExpandWildcards
Add a value toexpandWildcards(List)
, creating the list if needed. -
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
-
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
-
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
-
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
-
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
-
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
-
build
Builds aHealthRequest
.- Specified by:
build
in interfaceObjectBuilder<HealthRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-