Class ClusterRerouteRequestBuilder
java.lang.Object
org.elasticsearch.action.ActionRequestBuilder<Request,Response>
org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder<Request,Response,RequestBuilder>
org.elasticsearch.action.support.master.AcknowledgedRequestBuilder<ClusterRerouteRequest,ClusterRerouteResponse,ClusterRerouteRequestBuilder>
org.elasticsearch.action.admin.cluster.reroute.ClusterRerouteRequestBuilder
public class ClusterRerouteRequestBuilder
extends AcknowledgedRequestBuilder<ClusterRerouteRequest,ClusterRerouteResponse,ClusterRerouteRequestBuilder>
Builder for a cluster reroute request
-
Field Summary
Fields inherited from class org.elasticsearch.action.ActionRequestBuilder
action, client, request
-
Constructor Summary
ConstructorDescriptionClusterRerouteRequestBuilder(ElasticsearchClient client, ClusterRerouteAction action)
-
Method Summary
Modifier and TypeMethodDescriptionadd(AllocationCommand... commands)
Adds allocation commands to be applied to the cluster.setDryRun(boolean dryRun)
Sets a dry run flag (defaults tofalse
) allowing to run the commands without actually applying them to the cluster state, and getting the resulting cluster state back.setExplain(boolean explain)
Sets the explain flag (defaults tofalse
).setRetryFailed(boolean retryFailed)
Sets the retry failed flag (defaults tofalse
).Methods inherited from class org.elasticsearch.action.support.master.AcknowledgedRequestBuilder
setTimeout, setTimeout
Methods inherited from class org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder
setMasterNodeTimeout, setMasterNodeTimeout
-
Constructor Details
-
ClusterRerouteRequestBuilder
-
-
Method Details
-
add
Adds allocation commands to be applied to the cluster. Note, can be empty, in which case will simply run a simple "reroute". -
setDryRun
Sets a dry run flag (defaults tofalse
) allowing to run the commands without actually applying them to the cluster state, and getting the resulting cluster state back. -
setExplain
Sets the explain flag (defaults tofalse
). If true, the request will include an explanation in addition to the cluster state. -
setRetryFailed
Sets the retry failed flag (defaults tofalse
). If true, the request will retry allocating shards that can't currently be allocated due to too many allocation failures.
-