public class ClusterHealthRequest extends MasterNodeReadRequest<ClusterHealthRequest> implements IndicesRequest.Replaceable
TransportRequest.EmptyIndicesRequest.ReplaceablelocalDEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout| Constructor and Description |
|---|
ClusterHealthRequest() |
ClusterHealthRequest(java.lang.String... indices) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
indices()
Returns the array of indices that the action relates to
|
ClusterHealthRequest |
indices(java.lang.String... indices)
Sets the indices that the action relates to.
|
IndicesOptions |
indicesOptions()
Returns the indices options used to resolve indices.
|
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
TimeValue |
timeout() |
ClusterHealthRequest |
timeout(java.lang.String timeout) |
ClusterHealthRequest |
timeout(TimeValue timeout) |
ActionRequestValidationException |
validate() |
ActiveShardCount |
waitForActiveShards() |
ClusterHealthRequest |
waitForActiveShards(ActiveShardCount waitForActiveShards)
Sets the number of shard copies that must be active across all indices before getting the
health status.
|
ClusterHealthRequest |
waitForActiveShards(int waitForActiveShards)
A shortcut for
waitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount. |
Priority |
waitForEvents() |
ClusterHealthRequest |
waitForEvents(Priority waitForEvents) |
ClusterHealthRequest |
waitForGreenStatus() |
java.lang.String |
waitForNodes() |
ClusterHealthRequest |
waitForNodes(java.lang.String waitForNodes)
Waits for N number of nodes.
|
boolean |
waitForNoRelocatingShards() |
ClusterHealthRequest |
waitForNoRelocatingShards(boolean waitForNoRelocatingShards)
Sets whether the request should wait for there to be no relocating shards before
retrieving the cluster health status.
|
ClusterHealthStatus |
waitForStatus() |
ClusterHealthRequest |
waitForStatus(ClusterHealthStatus waitForStatus) |
ClusterHealthRequest |
waitForYellowStatus() |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
local, localmasterNodeTimeout, masterNodeTimeout, masterNodeTimeoutgetShouldStoreResultgetParentTask, setParentTaskremoteAddress, remoteAddressclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateTask, getDescription, setParentTaskpublic ClusterHealthRequest()
public ClusterHealthRequest(java.lang.String... indices)
public java.lang.String[] indices()
IndicesRequestindices in interface IndicesRequestpublic ClusterHealthRequest indices(java.lang.String... indices)
IndicesRequest.Replaceableindices in interface IndicesRequest.Replaceablepublic IndicesOptions indicesOptions()
IndicesRequestindicesOptions in interface IndicesRequestpublic TimeValue timeout()
public ClusterHealthRequest timeout(TimeValue timeout)
public ClusterHealthRequest timeout(java.lang.String timeout)
public ClusterHealthStatus waitForStatus()
public ClusterHealthRequest waitForStatus(ClusterHealthStatus waitForStatus)
public ClusterHealthRequest waitForGreenStatus()
public ClusterHealthRequest waitForYellowStatus()
public boolean waitForNoRelocatingShards()
public ClusterHealthRequest waitForNoRelocatingShards(boolean waitForNoRelocatingShards)
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 ActiveShardCount waitForActiveShards()
public ClusterHealthRequest waitForActiveShards(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 to wait for.public ClusterHealthRequest waitForActiveShards(int waitForActiveShards)
waitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount.public java.lang.String waitForNodes()
public ClusterHealthRequest waitForNodes(java.lang.String waitForNodes)
public ClusterHealthRequest waitForEvents(Priority waitForEvents)
public Priority waitForEvents()
public ActionRequestValidationException validate()
validate in class ActionRequestpublic void readFrom(StreamInput in) throws java.io.IOException
StreamablereadFrom in interface StreamablereadFrom in class MasterNodeReadRequest<ClusterHealthRequest>java.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
StreamablewriteTo in interface StreamablewriteTo in class MasterNodeReadRequest<ClusterHealthRequest>java.io.IOException