Module org.elasticsearch.server
Class OrderedShardsIterator
java.lang.Object
org.elasticsearch.cluster.routing.allocation.allocator.OrderedShardsIterator
- All Implemented Interfaces:
Iterator<ShardRouting>
This class iterates all shards from all nodes in order of allocation recency.
Shards from the node that had a new shard allocation would appear in the end of iteration.
-
Method Summary
Modifier and TypeMethodDescriptionstatic OrderedShardsIterator
create
(RoutingNodes routingNodes, NodeAllocationOrdering ordering) void
dePrioritizeNode
(String nodeId) boolean
hasNext()
next()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Method Details
-
create
public static OrderedShardsIterator create(RoutingNodes routingNodes, NodeAllocationOrdering ordering) -
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<ShardRouting>
-
next
- Specified by:
next
in interfaceIterator<ShardRouting>
-
dePrioritizeNode
-