Class HealthRequest.Builder

All Implemented Interfaces:
WithJson<HealthRequest.Builder>, ObjectBuilder<HealthRequest>
Enclosing class:
HealthRequest

public static class HealthRequest.Builder extends RequestBase.AbstractBuilder<HealthRequest.Builder> implements ObjectBuilder<HealthRequest>
Builder for HealthRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • expandWildcards

      public final HealthRequest.Builder expandWildcards(List<ExpandWildcard> list)
      Expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

      Adds all elements of list to expandWildcards.

    • expandWildcards

      public final HealthRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)
      Expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

      Adds one or more values to expandWildcards.

    • index

      public final HealthRequest.Builder index(List<String> list)
      A comma-separated list of data streams, indices, and index aliases that limit the request. Wildcard expressions (*) are supported. To target all data streams and indices in a cluster, omit this parameter or use _all or *.

      API name: index

      Adds all elements of list to index.

    • index

      public final HealthRequest.Builder index(String value, String... values)
      A comma-separated list of data streams, indices, and index aliases that limit the request. Wildcard expressions (*) are supported. To target all data streams and indices in a cluster, omit this parameter or use _all or *.

      API name: index

      Adds one or more values to index.

    • level

      public final HealthRequest.Builder level(@Nullable Level value)
      Return health information at a specific level of detail.

      API name: level

    • local

      public final HealthRequest.Builder local(@Nullable Boolean value)
      If true, retrieve information from the local node only. If false, retrieve information from the master node.

      API name: local

    • masterTimeout

      public final HealthRequest.Builder masterTimeout(@Nullable Time value)
      The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

      API name: master_timeout

    • masterTimeout

      public final HealthRequest.Builder masterTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

      API name: master_timeout

    • timeout

      public final HealthRequest.Builder timeout(@Nullable Time value)
      The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

      API name: timeout

    • timeout

      The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

      API name: timeout

    • waitForActiveShards

      public final HealthRequest.Builder waitForActiveShards(@Nullable WaitForActiveShards value)
      Wait for the specified number of active shards. Use all to wait for all shards in the cluster to be active. Use 0 to not wait.

      API name: wait_for_active_shards

    • waitForActiveShards

      Wait for the specified number of active shards. Use all to wait for all shards in the cluster to be active. Use 0 to not wait.

      API name: wait_for_active_shards

    • waitForEvents

      public final HealthRequest.Builder waitForEvents(@Nullable WaitForEvents value)
      Wait until all currently queued events with the given priority are processed.

      API name: wait_for_events

    • waitForNoInitializingShards

      public final HealthRequest.Builder waitForNoInitializingShards(@Nullable Boolean value)
      Wait (until the timeout expires) for the cluster to have no shard initializations. If false, the request does not wait for initializing shards.

      API name: wait_for_no_initializing_shards

    • waitForNoRelocatingShards

      public final HealthRequest.Builder waitForNoRelocatingShards(@Nullable Boolean value)
      Wait (until the timeout expires) for the cluster to have no shard relocations. If false, the request not wait for relocating shards.

      API name: wait_for_no_relocating_shards

    • waitForNodes

      public final HealthRequest.Builder waitForNodes(@Nullable String value)
      Wait until the specified number (N) of nodes is available. It also accepts >=N, <=N, >N and <N. Alternatively, use the notations ge(N), le(N), gt(N), and lt(N).

      API name: wait_for_nodes

    • waitForStatus

      public final HealthRequest.Builder waitForStatus(@Nullable HealthStatus value)
      Wait (until the timeout expires) for the cluster to reach a specific health status (or a better status). A green status is better than yellow and yellow is better than red. By default, the request does not wait for a particular status.

      API name: wait_for_status

    • self

      protected HealthRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<HealthRequest.Builder>
    • build

      public HealthRequest build()
      Builds a HealthRequest.
      Specified by:
      build in interface ObjectBuilder<HealthRequest>
      Throws:
      NullPointerException - if some of the required fields are null.