public class ClusterHealthRequestBuilder extends MasterNodeReadOperationRequestBuilder<ClusterHealthRequest,ClusterHealthResponse,ClusterHealthRequestBuilder>
action, client, request
Constructor and Description |
---|
ClusterHealthRequestBuilder(ElasticsearchClient client,
ClusterHealthAction action) |
Modifier and Type | Method and Description |
---|---|
ClusterHealthRequestBuilder |
setIndices(java.lang.String... indices) |
ClusterHealthRequestBuilder |
setTimeout(java.lang.String timeout) |
ClusterHealthRequestBuilder |
setTimeout(TimeValue timeout) |
ClusterHealthRequestBuilder |
setWaitForActiveShards(ActiveShardCount waitForActiveShards)
Sets the number of shard copies that must be active before getting the health status.
|
ClusterHealthRequestBuilder |
setWaitForActiveShards(int waitForActiveShards)
A shortcut for
setWaitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount. |
ClusterHealthRequestBuilder |
setWaitForEvents(Priority waitForEvents) |
ClusterHealthRequestBuilder |
setWaitForGreenStatus() |
ClusterHealthRequestBuilder |
setWaitForNodes(java.lang.String waitForNodes)
Waits for N number of nodes.
|
ClusterHealthRequestBuilder |
setWaitForNoRelocatingShards(boolean waitForRelocatingShards)
Sets whether the request should wait for there to be no relocating shards before
retrieving the cluster health status.
|
ClusterHealthRequestBuilder |
setWaitForStatus(ClusterHealthStatus waitForStatus) |
ClusterHealthRequestBuilder |
setWaitForYellowStatus() |
setLocal
setMasterNodeTimeout, setMasterNodeTimeout
beforeExecute, execute, execute, get, get, get, request
public ClusterHealthRequestBuilder(ElasticsearchClient client, ClusterHealthAction action)
public ClusterHealthRequestBuilder setIndices(java.lang.String... indices)
public ClusterHealthRequestBuilder setTimeout(TimeValue timeout)
public ClusterHealthRequestBuilder setTimeout(java.lang.String timeout)
public ClusterHealthRequestBuilder setWaitForStatus(ClusterHealthStatus waitForStatus)
public ClusterHealthRequestBuilder setWaitForGreenStatus()
public ClusterHealthRequestBuilder setWaitForYellowStatus()
public ClusterHealthRequestBuilder setWaitForNoRelocatingShards(boolean waitForRelocatingShards)
false
, meaning the
operation does not wait on there being no more relocating shards. Set to true
to wait until the number of relocating shards in the cluster is 0.public ClusterHealthRequestBuilder setWaitForActiveShards(ActiveShardCount waitForActiveShards)
ActiveShardCount.NONE
, meaning we don't wait on any active shards.
Set this value to ActiveShardCount.ALL
to wait for all shards (primary and
all replicas) to be active across all indices in the cluster. Otherwise, use
ActiveShardCount.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.public ClusterHealthRequestBuilder setWaitForActiveShards(int waitForActiveShards)
setWaitForActiveShards(ActiveShardCount)
where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount.public ClusterHealthRequestBuilder setWaitForNodes(java.lang.String waitForNodes)
public ClusterHealthRequestBuilder setWaitForEvents(Priority waitForEvents)