java.lang.Object
org.elasticsearch.cluster.routing.allocation.allocator.OrderedShardsIterator
All Implemented Interfaces:
Iterator<ShardRouting>

public class OrderedShardsIterator extends Object implements Iterator<ShardRouting>
This class iterates all shards from all nodes. The shard order is defined by (1) allocation recency: shards from the node that had a new shard allocation would appear in the end of iteration. (2) shard priority: for necessary moves data stream write shards, then regular index shards, then the rest for rebalancing the order is inverse