Class RerouteRequest
- java.lang.Object
-
- org.opensearch.client.opensearch._types.RequestBase
-
- org.opensearch.client.opensearch.cluster.RerouteRequest
-
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class RerouteRequest extends RequestBase implements JsonpSerializable
Allows to manually change the allocation of individual shards in the cluster.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRerouteRequest.BuilderBuilder forRerouteRequest.-
Nested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<RerouteRequest>_DESERIALIZERJson deserializer forRerouteRequeststatic Endpoint<RerouteRequest,RerouteResponse,ErrorResponse>_ENDPOINTEndpoint "cluster.reroute".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TimeclusterManagerTimeout()Period to wait for a connection to the cluster-manager node.java.util.List<Command>commands()Defines the commands to perform.java.lang.BooleandryRun()If true, then the request simulates the operation only and returns the resulting state.java.lang.Booleanexplain()If true, then the response contains an explanation of why the commands can or cannot be executed.TimemasterTimeout()Deprecated.java.util.List<java.lang.String>metric()Limits the information returned to the specified metrics.static RerouteRequestof(java.util.function.Function<RerouteRequest.Builder,ObjectBuilder<RerouteRequest>> fn)java.lang.BooleanretryFailed()If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupRerouteRequestDeserializer(ObjectDeserializer<RerouteRequest.Builder> op)Timetimeout()Period to wait for a response.
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<RerouteRequest> _DESERIALIZER
Json deserializer forRerouteRequest
-
_ENDPOINT
public static final Endpoint<RerouteRequest,RerouteResponse,ErrorResponse> _ENDPOINT
Endpoint "cluster.reroute".
-
-
Method Detail
-
of
public static RerouteRequest of(java.util.function.Function<RerouteRequest.Builder,ObjectBuilder<RerouteRequest>> fn)
-
commands
public final java.util.List<Command> commands()
Defines the commands to perform.API name:
commands
-
dryRun
@Nullable public final java.lang.Boolean dryRun()
If true, then the request simulates the operation only and returns the resulting state.API name:
dry_run
-
explain
@Nullable public final java.lang.Boolean explain()
If true, then the response contains an explanation of why the commands can or cannot be executed.API name:
explain
-
masterTimeout
@Deprecated @Nullable public final Time masterTimeout()
Deprecated.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
-
clusterManagerTimeout
@Nullable public final Time clusterManagerTimeout()
Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.API name:
cluster_amanger_timeout
-
metric
public final java.util.List<java.lang.String> metric()
Limits the information returned to the specified metrics.API name:
metric
-
retryFailed
@Nullable public final java.lang.Boolean retryFailed()
If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures.API name:
retry_failed
-
timeout
@Nullable public final Time 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
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
-
setupRerouteRequestDeserializer
protected static void setupRerouteRequestDeserializer(ObjectDeserializer<RerouteRequest.Builder> op)
-
-