Class RerouteRequest.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.RequestBase.AbstractBuilder<RerouteRequest.Builder>
org.opensearch.client.opensearch.cluster.RerouteRequest.Builder
- All Implemented Interfaces:
CopyableBuilder<RerouteRequest.Builder,,RerouteRequest> MutableBuilder<RerouteRequest.Builder,,RerouteRequest> ObjectBuilder<RerouteRequest>
- Enclosing class:
RerouteRequest
public static class RerouteRequest.Builder
extends RequestBase.AbstractBuilder<RerouteRequest.Builder>
implements CopyableBuilder<RerouteRequest.Builder,RerouteRequest>
Builder for
RerouteRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aRerouteRequest.final RerouteRequest.BuilderThe amount of time to wait for a response from the cluster manager node.final RerouteRequest.BuilderclusterManagerTimeout(Time value) The amount of time to wait for a response from the cluster manager node.final RerouteRequest.BuilderDefines the reroute commands to perform, eithermove,cancel, orallocate.final RerouteRequest.BuilderDefines the reroute commands to perform, eithermove,cancel, orallocate.final RerouteRequest.BuilderDefines the reroute commands to perform, eithermove,cancel, orallocate.copy()Create a new builderCopyableBuilderthat is a copy of this one.final RerouteRequest.BuilderWhentrue, the request simulates the operation and returns the resulting state.final RerouteRequest.BuilderWhentrue, the response contains an explanation of why reroute certain commands can or cannot be executed.final RerouteRequest.BuilderDeprecated.final RerouteRequest.BuildermasterTimeout(Time value) Deprecated.final RerouteRequest.Buildermetric(List<ClusterRerouteMetric> list) Limits the information returned to the specified metrics.final RerouteRequest.Buildermetric(ClusterRerouteMetric value, ClusterRerouteMetric... values) Limits the information returned to the specified metrics.final RerouteRequest.BuilderretryFailed(Boolean value) Whentrue, retries shard allocation if it was blocked because of too many subsequent failures.protected RerouteRequest.Builderself()final RerouteRequest.BuilderA duration.final RerouteRequest.BuilderA duration.Methods inherited from class org.opensearch.client.opensearch._types.RequestBase.AbstractBuilder
errorTrace, humanMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<RerouteRequest.Builder,RerouteRequest> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classRequestBase.AbstractBuilder<RerouteRequest.Builder>
-
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 -
clusterManagerTimeout
@Nonnull public final RerouteRequest.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 -
commands
Defines the reroute commands to perform, eithermove,cancel, orallocate.API name:
commandsAdds all elements of
listtocommands. -
commands
Defines the reroute commands to perform, eithermove,cancel, orallocate.API name:
commandsAdds one or more values to
commands. -
commands
@Nonnull public final RerouteRequest.Builder commands(Function<Command.Builder, ObjectBuilder<Command>> fn) Defines the reroute commands to perform, eithermove,cancel, orallocate.API name:
commandsAdds a value to
commandsusing a builder lambda. -
dryRun
Whentrue, the request simulates the operation and returns the resulting state.API name:
dry_run -
explain
Whentrue, the response contains an explanation of why reroute certain commands can or cannot be executed.API name:
explain -
masterTimeout
Deprecated.A duration. Units can benanos,micros,ms(milliseconds),s(seconds),m(minutes),h(hours) andd(days). Also accepts0without a unit and-1to indicate an unspecified value.API name:
master_timeout -
masterTimeout
@Deprecated @Nonnull public final RerouteRequest.Builder masterTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) Deprecated.A duration. Units can benanos,micros,ms(milliseconds),s(seconds),m(minutes),h(hours) andd(days). Also accepts0without a unit and-1to indicate an unspecified value.API name:
master_timeout -
metric
Limits the information returned to the specified metrics.API name:
metricAdds all elements of
listtometric. -
metric
@Nonnull public final RerouteRequest.Builder metric(ClusterRerouteMetric value, ClusterRerouteMetric... values) Limits the information returned to the specified metrics.API name:
metricAdds one or more values to
metric. -
retryFailed
Whentrue, retries shard allocation if it was blocked because of too many subsequent failures.API name:
retry_failed -
timeout
A duration. Units can benanos,micros,ms(milliseconds),s(seconds),m(minutes),h(hours) andd(days). Also accepts0without a unit and-1to indicate an unspecified value.API name:
timeout -
timeout
A duration. Units can benanos,micros,ms(milliseconds),s(seconds),m(minutes),h(hours) andd(days). Also accepts0without a unit and-1to indicate an unspecified value.API name:
timeout -
build
Builds aRerouteRequest.- Specified by:
buildin interfaceObjectBuilder<RerouteRequest>- Throws:
NullPointerException- if some of the required fields are null.
-