Class ClusterRerouteRequestBuilder


public class ClusterRerouteRequestBuilder
extends AcknowledgedRequestBuilder<ClusterRerouteRequest,​ClusterRerouteResponse,​ClusterRerouteRequestBuilder>
Builder for a cluster reroute request
  • Constructor Details

  • Method Details

    • 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 to false) 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 to false). 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 to false). If true, the request will retry allocating shards that can't currently be allocated due to too many allocation failures.