Class HealthRequest.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • copy

      @Nonnull public HealthRequest.Builder copy()
      Description copied from interface: CopyableBuilder
      Create a new builder CopyableBuilder that is a copy of this one.
      Specified by:
      copy in interface CopyableBuilder<HealthRequest.Builder,HealthRequest>
      Returns:
      a new builder instance.
    • self

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

      @Nonnull public final HealthRequest.Builder awarenessAttribute(@Nullable String value)
      The name of the awareness attribute for which to return the cluster health status (for example, zone). Applicable only if level is set to awareness_attributes.

      API name: awareness_attribute

    • clusterManagerTimeout

      @Nonnull public final HealthRequest.Builder clusterManagerTimeout(@Nullable Time value)
      The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see Common parameters.

      API name: cluster_manager_timeout

    • clusterManagerTimeout

      @Nonnull public final HealthRequest.Builder clusterManagerTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see Common parameters.

      API name: cluster_manager_timeout

    • expandWildcards

      @Nonnull public final HealthRequest.Builder expandWildcards(List<ExpandWildcard> list)
      Specifies the type of index that wildcard expressions can match. Supports comma-separated values.

      API name: expand_wildcards

      Adds all elements of list to expandWildcards.

    • expandWildcards

      @Nonnull public final HealthRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)
      Specifies the type of index that wildcard expressions can match. Supports comma-separated values.

      API name: expand_wildcards

      Adds one or more values to expandWildcards.

    • index

      @Nonnull public final HealthRequest.Builder index(List<String> list)
      A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indexes, omit this parameter or use * or _all.

      API name: index

      Adds all elements of list to index.

    • index

      @Nonnull public final HealthRequest.Builder index(String value, String... values)
      A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indexes, omit this parameter or use * or _all.

      API name: index

      Adds one or more values to index.

    • level

      @Nonnull public final HealthRequest.Builder level(@Nullable ClusterHealthLevel value)
      Controls the amount of detail included in the cluster health response.

      API name: level

    • local

      @Nonnull public final HealthRequest.Builder local(@Nullable Boolean value)
      Whether to return information from the local node only instead of from the cluster manager node.

      API name: local

    • masterTimeout

      @Deprecated @Nonnull public final HealthRequest.Builder masterTimeout(@Nullable Time value)
      Deprecated.
      A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts 0 without a unit and -1 to indicate an unspecified value.

      API name: master_timeout

    • masterTimeout

      @Deprecated @Nonnull public final HealthRequest.Builder masterTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      Deprecated.
      A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts 0 without a unit and -1 to indicate an unspecified value.

      API name: master_timeout

    • timeout

      @Nonnull public final HealthRequest.Builder timeout(@Nullable Time value)
      The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see Common parameters.

      API name: timeout

    • timeout

      @Nonnull public final HealthRequest.Builder timeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see Common parameters.

      API name: timeout

    • waitForActiveShards

      @Nonnull public final HealthRequest.Builder waitForActiveShards(@Nullable WaitForActiveShards value)
      Waits until the specified number of shards is active before returning a response. Use all for all shards.

      API name: wait_for_active_shards

    • waitForActiveShards

      Waits until the specified number of shards is active before returning a response. Use all for all shards.

      API name: wait_for_active_shards

    • waitForEvents

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

      API name: wait_for_events

    • waitForNoInitializingShards

      @Nonnull public final HealthRequest.Builder waitForNoInitializingShards(@Nullable Boolean value)
      Whether to wait until there are no initializing shards in the cluster.

      API name: wait_for_no_initializing_shards

    • waitForNoRelocatingShards

      @Nonnull public final HealthRequest.Builder waitForNoRelocatingShards(@Nullable Boolean value)
      Whether to wait until there are no relocating shards in the cluster.

      API name: wait_for_no_relocating_shards

    • waitForNodes

      @Nonnull public final HealthRequest.Builder waitForNodes(@Nullable WaitForNodes value)
      Waits until the specified number of nodes (N) is available. Accepts >=N, <=N, >N, and <N. You can also use ge(N), le(N), gt(N), and lt(N) notation.

      API name: wait_for_nodes

    • waitForNodes

      Waits until the specified number of nodes (N) is available. Accepts >=N, <=N, >N, and <N. You can also use ge(N), le(N), gt(N), and lt(N) notation.

      API name: wait_for_nodes

    • waitForStatus

      @Nonnull public final HealthRequest.Builder waitForStatus(@Nullable HealthStatus value)
      Waits until the cluster health reaches the specified status or better.

      API name: wait_for_status

    • build

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