Class RerouteRequest.Builder
java.lang.Object
org.opensearch.client.opensearch.cluster.RerouteRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<RerouteRequest>
- Enclosing class:
- RerouteRequest
public static class RerouteRequest.Builder extends java.lang.Object implements ObjectBuilder<RerouteRequest>
Builder for
RerouteRequest.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.client.util.ObjectBuilder
ObjectBuilder.Constant<V> -
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description RerouteRequest.BuilderaddCommands(java.util.function.Function<Command.Builder,ObjectBuilder<Command>> fn)Add a value tocommands(List), creating the list if needed.RerouteRequest.BuilderaddCommands(Command value)Add a value tocommands(List), creating the list if needed.RerouteRequest.BuilderaddMetric(java.lang.String value)Add a value tometric(List), creating the list if needed.RerouteRequestbuild()Builds aRerouteRequest.RerouteRequest.Buildercommands(java.util.function.Function<Command.Builder,ObjectBuilder<Command>> fn)Setcommands(List)to a singleton list.RerouteRequest.Buildercommands(java.util.List<Command> value)Defines the commands to perform.RerouteRequest.Buildercommands(Command... value)Defines the commands to perform.RerouteRequest.BuilderdryRun(java.lang.Boolean value)If true, then the request simulates the operation only and returns the resulting state.RerouteRequest.Builderexplain(java.lang.Boolean value)If true, then the response contains an explanation of why the commands can or cannot be executed.RerouteRequest.BuildermasterTimeout(jakarta.json.JsonValue value)Period to wait for a connection to the master node.RerouteRequest.Buildermetric(java.lang.String... value)Limits the information returned to the specified metrics.RerouteRequest.Buildermetric(java.util.List<java.lang.String> value)Limits the information returned to the specified metrics.RerouteRequest.BuilderretryFailed(java.lang.Boolean value)If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures.RerouteRequest.Buildertimeout(jakarta.json.JsonValue value)Period to wait for a response.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
dryRun
If true, then the request simulates the operation only and returns the resulting state. API name:dry_run -
explain
If true, then the response contains an explanation of why the commands can or cannot be executed. API name:explain -
metric
Limits the information returned to the specified metrics. API name:metric -
metric
Limits the information returned to the specified metrics. API name:metric -
addMetric
Add a value tometric(List), creating the list if needed. -
retryFailed
If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures. API name:retry_failed -
masterTimeout
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 -
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 -
commands
Defines the commands to perform. API name:commands -
commands
Defines the commands to perform. API name:commands -
addCommands
Add a value tocommands(List), creating the list if needed. -
commands
public RerouteRequest.Builder commands(java.util.function.Function<Command.Builder,ObjectBuilder<Command>> fn)Setcommands(List)to a singleton list. -
addCommands
public RerouteRequest.Builder addCommands(java.util.function.Function<Command.Builder,ObjectBuilder<Command>> fn)Add a value tocommands(List), creating the list if needed. -
build
Builds aRerouteRequest.- Specified by:
buildin interfaceObjectBuilder<RerouteRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-