Class ClusterHealthRequestBuilder
java.lang.Object
org.elasticsearch.action.ActionRequestBuilder<Request,Response>
org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder<Request,Response,RequestBuilder>
org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder<ClusterHealthRequest,ClusterHealthResponse,ClusterHealthRequestBuilder>
org.elasticsearch.action.admin.cluster.health.ClusterHealthRequestBuilder
public class ClusterHealthRequestBuilder
extends MasterNodeReadOperationRequestBuilder<ClusterHealthRequest,ClusterHealthResponse,ClusterHealthRequestBuilder>
-
Field Summary
Fields inherited from class org.elasticsearch.action.ActionRequestBuilder
action, client, request
-
Constructor Summary
ConstructorDescriptionClusterHealthRequestBuilder(ElasticsearchClient client, ClusterHealthAction action)
-
Method Summary
Modifier and TypeMethodDescriptionsetIndices(String... indices)
setIndicesOptions(IndicesOptions indicesOptions)
setTimeout(String timeout)
setTimeout(org.elasticsearch.core.TimeValue timeout)
setWaitForActiveShards(int waitForActiveShards)
A shortcut forsetWaitForActiveShards(ActiveShardCount)
where the numerical shard count is passed in, instead of having to first callActiveShardCount.from(int)
to get the ActiveShardCount.setWaitForActiveShards(ActiveShardCount waitForActiveShards)
Sets the number of shard copies that must be active before getting the health status.setWaitForEvents(Priority waitForEvents)
setWaitForNodes(String waitForNodes)
Waits for N number of nodes.setWaitForNoInitializingShards(boolean waitForNoInitializingShards)
Sets whether the request should wait for there to be no initializing shards before retrieving the cluster health status.setWaitForNoRelocatingShards(boolean waitForRelocatingShards)
Sets whether the request should wait for there to be no relocating shards before retrieving the cluster health status.setWaitForStatus(ClusterHealthStatus waitForStatus)
Methods inherited from class org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder
setLocal
Methods inherited from class org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder
setMasterNodeTimeout, setMasterNodeTimeout
-
Constructor Details
-
ClusterHealthRequestBuilder
-
-
Method Details
-
setIndices
-
setIndicesOptions
-
setTimeout
-
setTimeout
-
setWaitForStatus
-
setWaitForGreenStatus
-
setWaitForYellowStatus
-
setWaitForNoRelocatingShards
Sets whether the request should wait for there to be no relocating shards before retrieving the cluster health status. Defaults tofalse
, meaning the operation does not wait on there being no more relocating shards. Set totrue
to wait until the number of relocating shards in the cluster is 0. -
setWaitForNoInitializingShards
public ClusterHealthRequestBuilder setWaitForNoInitializingShards(boolean waitForNoInitializingShards)Sets whether the request should wait for there to be no initializing shards before retrieving the cluster health status. Defaults tofalse
, meaning the operation does not wait on there being no more initializing shards. Set totrue
to wait until the number of initializing shards in the cluster is 0. -
setWaitForActiveShards
Sets the number of shard copies that must be active before getting the health status. Defaults toActiveShardCount.NONE
, meaning we don't wait on any active shards. Set this value toActiveShardCount.ALL
to wait for all shards (primary and all replicas) to be active across all indices in the cluster. Otherwise, useActiveShardCount.from(int)
to set this value to any non-negative integer, up to the total number of shard copies that would exist across all indices in the cluster. -
setWaitForActiveShards
A shortcut forsetWaitForActiveShards(ActiveShardCount)
where the numerical shard count is passed in, instead of having to first callActiveShardCount.from(int)
to get the ActiveShardCount. -
setWaitForNodes
Waits for N number of nodes. Use "12" for exact mapping, ">12" and "<12" for range. -
setWaitForEvents
-