Class RerouteRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch.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
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description RerouteRequest.Builder
addCommands(Command value)
Add a value tocommands(List)
, creating the list if needed.RerouteRequest.Builder
addCommands(java.util.function.Function<Command.Builder,ObjectBuilder<Command>> fn)
Add a value tocommands(List)
, creating the list if needed.RerouteRequest.Builder
addMetric(java.lang.String value)
Add a value tometric(List)
, creating the list if needed.RerouteRequest
build()
Builds aRerouteRequest
.RerouteRequest.Builder
commands(Command... value)
Defines the commands to perform.RerouteRequest.Builder
commands(java.util.function.Function<Command.Builder,ObjectBuilder<Command>> fn)
Setcommands(List)
to a singleton list.RerouteRequest.Builder
commands(java.util.List<Command> value)
Defines the commands to perform.RerouteRequest.Builder
dryRun(java.lang.Boolean value)
If true, then the request simulates the operation only and returns the resulting state.RerouteRequest.Builder
explain(java.lang.Boolean value)
If true, then the response contains an explanation of why the commands can or cannot be executed.RerouteRequest.Builder
masterTimeout(java.lang.String value)
Period to wait for a connection to the master node.RerouteRequest.Builder
metric(java.lang.String... value)
Limits the information returned to the specified metrics.RerouteRequest.Builder
metric(java.util.List<java.lang.String> value)
Limits the information returned to the specified metrics.RerouteRequest.Builder
retryFailed(java.lang.Boolean value)
If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures.RerouteRequest.Builder
timeout(java.lang.String value)
Period to wait for a response.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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:
build
in interfaceObjectBuilder<RerouteRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-