Class BatchedRerouteService

All Implemented Interfaces:

public class BatchedRerouteService extends Object implements RerouteService
A BatchedRerouteService is a RerouteService that batches together reroute requests to avoid unnecessary extra reroutes. This component only does meaningful work on the elected master node. Reroute requests will fail with a NotMasterException on other nodes.
  • Constructor Details

  • Method Details

    • reroute

      public final void reroute(String reason, Priority priority, ActionListener<ClusterState> listener)
      Initiates a reroute.
      Specified by:
      reroute in interface RerouteService
      priority - the (minimum) priority at which to run this reroute. If there is already a pending reroute at a higher priority then this reroute is batched with the pending one; if there is already a pending reroute at a lower priority then the priority of the pending batch is raised to the given priority.