Class StateRequest.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • allowNoIndices

      public final StateRequest.Builder allowNoIndices(@Nullable Boolean value)
      A setting that does two separate checks on the index expression. If false, the request returns an error (1) if any wildcard expression (including _all and *) resolves to zero matching indices or (2) if the complete set of resolved indices, aliases or data streams is empty after all expressions are evaluated. If true, index expressions that resolve to no indices are allowed and the request returns an empty result.

      API name: allow_no_indices

    • expandWildcards

      public final StateRequest.Builder expandWildcards(List<ExpandWildcard> list)
      Whether to 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 StateRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)
      Whether to expand wildcard expression to concrete indices that are open, closed or both

      API name: expand_wildcards

      Adds one or more values to expandWildcards.

    • flatSettings

      public final StateRequest.Builder flatSettings(@Nullable Boolean value)
      Return settings in flat format

      API name: flat_settings

    • ignoreUnavailable

      public final StateRequest.Builder ignoreUnavailable(@Nullable Boolean value)
      If false, the request returns an error if it targets a concrete (non-wildcarded) index, alias, or data stream that is missing, closed, or otherwise unavailable. If true, unavailable concrete targets are silently ignored.

      API name: ignore_unavailable

    • index

      public final StateRequest.Builder index(List<String> list)
      A comma-separated list of index names; use _all or empty string to perform the operation on all indices

      API name: index

      Adds all elements of list to index.

    • index

      public final StateRequest.Builder index(String value, String... values)
      A comma-separated list of index names; use _all or empty string to perform the operation on all indices

      API name: index

      Adds one or more values to index.

    • local

      @Deprecated public final StateRequest.Builder local(@Nullable Boolean value)
      Deprecated.
      9.0.0 This parameter has no effect, is now deprecated, and will be removed in a future version.
      Return local information, do not retrieve the state from master node

      API name: local

    • masterTimeout

      public final StateRequest.Builder masterTimeout(@Nullable Time value)
      Timeout for waiting for new cluster state in case it is blocked

      API name: master_timeout

    • masterTimeout

      public final StateRequest.Builder masterTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      Timeout for waiting for new cluster state in case it is blocked

      API name: master_timeout

    • metric

      public final StateRequest.Builder metric(List<ClusterStateMetric> list)
      Limit the information returned to the specified metrics.

      API name: metric

      Adds all elements of list to metric.

    • metric

      public final StateRequest.Builder metric(ClusterStateMetric value, ClusterStateMetric... values)
      Limit the information returned to the specified metrics.

      API name: metric

      Adds one or more values to metric.

    • waitForMetadataVersion

      public final StateRequest.Builder waitForMetadataVersion(@Nullable Long value)
      Wait for the metadata version to be equal or greater than the specified metadata version

      API name: wait_for_metadata_version

    • waitForTimeout

      public final StateRequest.Builder waitForTimeout(@Nullable Time value)
      The maximum time to wait for wait_for_metadata_version before timing out

      API name: wait_for_timeout

    • waitForTimeout

      public final StateRequest.Builder waitForTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      The maximum time to wait for wait_for_metadata_version before timing out

      API name: wait_for_timeout

    • self

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

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