Class ClusterHealthRequestBuilder


public class ClusterHealthRequestBuilder
extends MasterNodeReadOperationRequestBuilder<ClusterHealthRequest,​ClusterHealthResponse,​ClusterHealthRequestBuilder>
  • Constructor Details

  • Method Details

    • setIndices

      public ClusterHealthRequestBuilder setIndices​(java.lang.String... indices)
    • setIndicesOptions

      public ClusterHealthRequestBuilder setIndicesOptions​(IndicesOptions indicesOptions)
    • setTimeout

      public ClusterHealthRequestBuilder setTimeout​(org.elasticsearch.common.unit.TimeValue timeout)
    • setTimeout

      public ClusterHealthRequestBuilder setTimeout​(java.lang.String timeout)
    • setWaitForStatus

      public ClusterHealthRequestBuilder setWaitForStatus​(ClusterHealthStatus waitForStatus)
    • setWaitForGreenStatus

      public ClusterHealthRequestBuilder setWaitForGreenStatus()
    • setWaitForYellowStatus

      public ClusterHealthRequestBuilder setWaitForYellowStatus()
    • setWaitForNoRelocatingShards

      public ClusterHealthRequestBuilder setWaitForNoRelocatingShards​(boolean waitForRelocatingShards)
      Sets whether the request should wait for there to be no relocating shards before retrieving the cluster health status. Defaults to 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.
    • 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 to 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.
    • setWaitForActiveShards

      public ClusterHealthRequestBuilder setWaitForActiveShards​(ActiveShardCount waitForActiveShards)
      Sets the number of shard copies that must be active before getting the health status. Defaults to 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.
    • setWaitForActiveShards

      public 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.
    • setWaitForNodes

      public ClusterHealthRequestBuilder setWaitForNodes​(java.lang.String waitForNodes)
      Waits for N number of nodes. Use "12" for exact mapping, ">12" and "<12" for range.
    • setWaitForEvents

      public ClusterHealthRequestBuilder setWaitForEvents​(Priority waitForEvents)