Class HealthRequest.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch.cluster.HealthRequest.Builder
-
- All Implemented Interfaces:
ObjectBuilder<HealthRequest>
- Enclosing class:
- HealthRequest
public static class HealthRequest.Builder extends ObjectBuilderBase implements ObjectBuilder<HealthRequest>
Builder forHealthRequest.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description HealthRequestbuild()Builds aHealthRequest.HealthRequest.BuilderclusterManagerTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Period to wait for a connection to the cluster-manager node.HealthRequest.BuilderclusterManagerTimeout(Time value)Period to wait for a connection to the cluster-manager node.HealthRequest.BuilderexpandWildcards(java.util.List<ExpandWildcard> list)Whether to expand wildcard expression to concrete indices that are open, closed or both.HealthRequest.BuilderexpandWildcards(ExpandWildcard value, ExpandWildcard... values)Whether to expand wildcard expression to concrete indices that are open, closed or both.HealthRequest.Builderindex(java.lang.String value, java.lang.String... values)Comma-separated list of data streams, indices, and index aliases used to limit the request.HealthRequest.Builderindex(java.util.List<java.lang.String> list)Comma-separated list of data streams, indices, and index aliases used to limit the request.HealthRequest.Builderlevel(Level value)Can be one of cluster, indices or shards.HealthRequest.Builderlocal(java.lang.Boolean value)If true, the request retrieves information from the local node only.HealthRequest.BuildermasterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Deprecated.HealthRequest.BuildermasterTimeout(Time value)Deprecated.HealthRequest.Buildertimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Period to wait for a response.HealthRequest.Buildertimeout(Time value)Period to wait for a response.HealthRequest.BuilderwaitForActiveShards(java.util.function.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.HealthRequest.BuilderwaitForActiveShards(WaitForActiveShards 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.BuilderwaitForEvents(WaitForEvents value)Can be one of immediate, urgent, high, normal, low, languid.HealthRequest.BuilderwaitForNodes(java.lang.String value)The request waits until the specified number N of nodes is available.HealthRequest.BuilderwaitForNoInitializingShards(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.BuilderwaitForNoRelocatingShards(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.BuilderwaitForStatus(HealthStatus value)One of green, yellow or red.-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
-
-
-
Method Detail
-
expandWildcards
public final HealthRequest.Builder expandWildcards(java.util.List<ExpandWildcard> list)
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcardsAdds all elements of
listtoexpandWildcards.
-
expandWildcards
public final HealthRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcardsAdds one or more values to
expandWildcards.
-
index
public final HealthRequest.Builder index(java.util.List<java.lang.String> list)
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:
indexAdds all elements of
listtoindex.
-
index
public final HealthRequest.Builder index(java.lang.String value, java.lang.String... values)
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:
indexAdds one or more values to
index.
-
level
public final HealthRequest.Builder level(@Nullable Level value)
Can be one of cluster, indices or shards. Controls the details level of the health information returned.API name:
level
-
local
public final HealthRequest.Builder local(@Nullable java.lang.Boolean value)
If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the cluster-manager node.API name:
local
-
masterTimeout
@Deprecated public final HealthRequest.Builder masterTimeout(@Nullable Time value)
Deprecated.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
@Deprecated public final HealthRequest.Builder masterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Deprecated.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
-
clusterManagerTimeout
public final HealthRequest.Builder clusterManagerTimeout(@Nullable Time value)
Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.API name:
cluster_manager_timeout
-
clusterManagerTimeout
public final HealthRequest.Builder clusterManagerTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.API name:
cluster_manager_timeout
-
timeout
public final HealthRequest.Builder timeout(@Nullable Time value)
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
public final HealthRequest.Builder timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
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
public final HealthRequest.Builder waitForActiveShards(@Nullable WaitForActiveShards 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.API name:
wait_for_active_shards
-
waitForActiveShards
public final HealthRequest.Builder waitForActiveShards(java.util.function.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
public final HealthRequest.Builder waitForEvents(@Nullable WaitForEvents value)
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
public final HealthRequest.Builder waitForNoInitializingShards(@Nullable java.lang.Boolean value)
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
public final HealthRequest.Builder waitForNoRelocatingShards(@Nullable java.lang.Boolean value)
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
public final HealthRequest.Builder waitForNodes(@Nullable java.lang.String value)
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
public final HealthRequest.Builder waitForStatus(@Nullable HealthStatus value)
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
public HealthRequest build()
Builds aHealthRequest.- Specified by:
buildin interfaceObjectBuilder<HealthRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-
-