public class ClusterHealthRequestBuilder extends MasterNodeReadOperationRequestBuilder<ClusterHealthRequest,ClusterHealthResponse,ClusterHealthRequestBuilder>
action, client, request
Constructor | Description |
---|---|
ClusterHealthRequestBuilder(ElasticsearchClient client,
ClusterHealthAction action) |
Modifier and Type | Method | Description |
---|---|---|
ClusterHealthRequestBuilder |
setIndices(java.lang.String... indices) |
|
ClusterHealthRequestBuilder |
setTimeout(java.lang.String timeout) |
|
ClusterHealthRequestBuilder |
setTimeout(TimeValue timeout) |
|
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 |
setWaitForActiveShards(ActiveShardCount waitForActiveShards) |
Sets the number of shard copies that must be active before getting the health status.
|
ClusterHealthRequestBuilder |
setWaitForEvents(Priority waitForEvents) |
|
ClusterHealthRequestBuilder |
setWaitForGreenStatus() |
|
ClusterHealthRequestBuilder |
setWaitForNodes(java.lang.String waitForNodes) |
Waits for N number of nodes.
|
ClusterHealthRequestBuilder |
setWaitForNoInitializingShards(boolean waitForNoInitializingShards) |
Sets whether the request should wait for there to be no initializing shards before
retrieving the cluster health status.
|
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() |
execute, execute, get, get, get, request
setMasterNodeTimeout, setMasterNodeTimeout
setLocal
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 setWaitForNoInitializingShards(boolean waitForNoInitializingShards)
false
, meaning the
operation does not wait on there being no more initializing shards. Set to true
to wait until the number of initializing 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)