Class ClusterRerouteRequestBuilder
- java.lang.Object
-
- org.elasticsearch.action.ActionRequestBuilder<Request,Response,RequestBuilder>
-
- 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
Constructors Constructor Description ClusterRerouteRequestBuilder(ElasticsearchClient client, ClusterRerouteAction action)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClusterRerouteRequestBuilder
add(AllocationCommand... commands)
Adds allocation commands to be applied to the cluster.ClusterRerouteRequestBuilder
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.ClusterRerouteRequestBuilder
setExplain(boolean explain)
Sets the explain flag (defaults tofalse
).ClusterRerouteRequestBuilder
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 Detail
-
ClusterRerouteRequestBuilder
public ClusterRerouteRequestBuilder(ElasticsearchClient client, ClusterRerouteAction action)
-
-
Method Detail
-
add
public ClusterRerouteRequestBuilder add(AllocationCommand... commands)
Adds allocation commands to be applied to the cluster. Note, can be empty, in which case will simply run a simple "reroute".
-
setDryRun
public ClusterRerouteRequestBuilder 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
public ClusterRerouteRequestBuilder setExplain(boolean explain)
Sets the explain flag (defaults tofalse
). If true, the request will include an explanation in addition to the cluster state.
-
setRetryFailed
public ClusterRerouteRequestBuilder setRetryFailed(boolean retryFailed)
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.
-
-