Class RerouteRequest

java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch.cluster.RerouteRequest
All Implemented Interfaces:
JsonpSerializable, PlainJsonSerializable, ToCopyableBuilder<RerouteRequest.Builder,RerouteRequest>

@JsonpDeserializable @Generated("org.opensearch.client.codegen.CodeGenerator") public final class RerouteRequest extends RequestBase implements PlainJsonSerializable, ToCopyableBuilder<RerouteRequest.Builder,RerouteRequest>
Allows to manually change the allocation of individual shards in the cluster.
  • Field Details

  • Method Details

    • of

    • clusterManagerTimeout

      @Nullable public final Time clusterManagerTimeout()
      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

    • commands

      @Nonnull public final List<Command> commands()
      Defines the reroute commands to perform, either move, cancel, or allocate.

      API name: commands

    • dryRun

      @Nullable public final Boolean dryRun()
      When true, the request simulates the operation and returns the resulting state.

      API name: dry_run

    • explain

      @Nullable public final Boolean explain()
      When true, the response contains an explanation of why reroute certain commands can or cannot be executed.

      API name: explain

    • masterTimeout

      @Deprecated @Nullable public final Time masterTimeout()
      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

    • metric

      @Nonnull public final List<ClusterRerouteMetric> metric()
      Limits the information returned to the specified metrics.

      API name: metric

    • retryFailed

      @Nullable public final Boolean retryFailed()
      When true, retries shard allocation if it was blocked because of too many subsequent failures.

      API name: retry_failed

    • timeout

      @Nullable public final Time timeout()
      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: timeout

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toBuilder

      @Nonnull public RerouteRequest.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Create a new builder ToCopyableBuilder that is initialised with the current state of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<RerouteRequest.Builder,RerouteRequest>
      Returns:
      a new builder instance.
    • builder

      @Nonnull public static RerouteRequest.Builder builder()
    • setupRerouteRequestDeserializer

      protected static void setupRerouteRequestDeserializer(ObjectDeserializer<RerouteRequest.Builder> op)
    • applyQueryParameters

      protected void applyQueryParameters(@Nonnull Map<String,String> params)
      Overrides:
      applyQueryParameters in class RequestBase
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object