java.util.Iterator<ShardRouting>public class RoutingNodes.UnassignedShards.UnassignedIterator extends java.lang.Object implements java.util.Iterator<ShardRouting>
| Constructor | Description |
|---|---|
UnassignedIterator() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
hasNext() |
|
ShardRouting |
initialize(java.lang.String nodeId,
java.lang.String existingAllocationId,
long expectedShardSize,
RoutingChangesObserver routingChangesObserver) |
Initializes the current unassigned shard and moves it from the unassigned list.
|
ShardRouting |
next() |
|
void |
remove() |
Unsupported operation, just there for the interface.
|
void |
removeAndIgnore(UnassignedInfo.AllocationStatus attempt,
RoutingChangesObserver changes) |
Removes and ignores the unassigned shard (will be ignored for this run, but
will be added back to unassigned once the metadata is constructed again).
|
ShardRouting |
updateUnassigned(UnassignedInfo unassignedInfo,
RecoverySource recoverySource,
RoutingChangesObserver changes) |
updates the unassigned info and recovery source on the current unassigned shard
|
public boolean hasNext()
hasNext in interface java.util.Iterator<ShardRouting>public ShardRouting next()
next in interface java.util.Iterator<ShardRouting>public ShardRouting initialize(java.lang.String nodeId, @Nullable java.lang.String existingAllocationId, long expectedShardSize, RoutingChangesObserver routingChangesObserver)
existingAllocationId - allocation id to use. If null, a fresh allocation id is generated.public void removeAndIgnore(UnassignedInfo.AllocationStatus attempt, RoutingChangesObserver changes)
attempt - the result of the allocation attemptpublic ShardRouting updateUnassigned(UnassignedInfo unassignedInfo, RecoverySource recoverySource, RoutingChangesObserver changes)
unassignedInfo - the new unassigned info to userecoverySource - the new recovery source to usepublic void remove()
removeAndIgnore(AllocationStatus, RoutingChangesObserver) or
initialize(String, String, long, RoutingChangesObserver).remove in interface java.util.Iterator<ShardRouting>