Class RerouteRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<RerouteRequest.Builder>
co.elastic.clients.elasticsearch.cluster.RerouteRequest.Builder
- All Implemented Interfaces:
WithJson<RerouteRequest.Builder>
,ObjectBuilder<RerouteRequest>
- Enclosing class:
- RerouteRequest
public static class RerouteRequest.Builder extends WithJsonObjectBuilderBase<RerouteRequest.Builder> implements ObjectBuilder<RerouteRequest>
Builder for
RerouteRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description RerouteRequest
build()
Builds aRerouteRequest
.RerouteRequest.Builder
commands(Command value, Command... values)
Defines the commands to perform.RerouteRequest.Builder
commands(java.util.function.Function<Command.Builder,ObjectBuilder<Command>> fn)
Defines the commands to perform.RerouteRequest.Builder
commands(java.util.List<Command> list)
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(Time value)
Period to wait for a connection to the master node.RerouteRequest.Builder
masterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Period to wait for a connection to the master node.RerouteRequest.Builder
metric(java.lang.String value, java.lang.String... values)
Limits the information returned to the specified metrics.RerouteRequest.Builder
metric(java.util.List<java.lang.String> list)
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.protected RerouteRequest.Builder
self()
RerouteRequest.Builder
timeout(Time value)
Period to wait for a response.RerouteRequest.Builder
timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Period to wait for a response.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
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
-
commands
Defines the commands to perform.API name:
commands
Adds all elements of
list
tocommands
. -
commands
Defines the commands to perform.API name:
commands
Adds one or more values to
commands
. -
commands
public final RerouteRequest.Builder commands(java.util.function.Function<Command.Builder,ObjectBuilder<Command>> fn)Defines the commands to perform.API name:
commands
Adds a value to
commands
using a builder lambda. -
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
-
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
-
masterTimeout
public final RerouteRequest.Builder masterTimeout(java.util.function.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
Limits the information returned to the specified metrics.API name:
metric
Adds all elements of
list
tometric
. -
metric
Limits the information returned to the specified metrics.API name:
metric
Adds one or more values to
metric
. -
retryFailed
If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures.API name:
retry_failed
-
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
-
timeout
public final RerouteRequest.Builder timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)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
- Specified by:
self
in classWithJsonObjectBuilderBase<RerouteRequest.Builder>
-
build
Builds aRerouteRequest
.- Specified by:
build
in interfaceObjectBuilder<RerouteRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-