Class RerouteRequest.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • commands

      public final RerouteRequest.Builder commands(List<Command> list)
      Defines the commands to perform.

      API name: commands

      Adds all elements of list to commands.

    • commands

      public final RerouteRequest.Builder commands(Command value, Command... values)
      Defines the commands to perform.

      API name: commands

      Adds one or more values to commands.

    • commands

      Defines the commands to perform.

      API name: commands

      Adds a value to commands using a builder lambda.

    • dryRun

      public final RerouteRequest.Builder dryRun(@Nullable Boolean value)
      If true, then the request simulates the operation. It will calculate the result of applying the commands to the current cluster state and return the resulting cluster state after the commands (and rebalancing) have been applied; it will not actually perform the requested changes.

      API name: dry_run

    • explain

      public final RerouteRequest.Builder explain(@Nullable Boolean value)
      If true, then the response contains an explanation of why the commands can or cannot run.

      API name: explain

    • masterTimeout

      public final RerouteRequest.Builder masterTimeout(@Nullable Time value)
      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 RerouteRequest.Builder masterTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      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

    • metric

      public final RerouteRequest.Builder metric(List<String> list)
      Limits the information returned to the specified metrics.

      API name: metric

      Adds all elements of list to metric.

    • metric

      public final RerouteRequest.Builder metric(String value, String... values)
      Limits the information returned to the specified metrics.

      API name: metric

      Adds one or more values to metric.

    • retryFailed

      public final RerouteRequest.Builder retryFailed(@Nullable Boolean value)
      If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures.

      API name: retry_failed

    • timeout

      public final RerouteRequest.Builder timeout(@Nullable Time value)
      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

      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

    • self

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

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