public class RoutingNodes.UnassignedShards.UnassignedIterator extends java.lang.Object implements java.util.Iterator<ShardRouting>
Constructor and Description |
---|
UnassignedIterator() |
Modifier and Type | Method and Description |
---|---|
ShardRouting |
demotePrimaryToReplicaShard()
marks the current primary shard as replica
|
boolean |
hasNext() |
ShardRouting |
initialize(java.lang.String nodeId,
java.lang.String existingAllocationId,
long expectedShardSize)
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()
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 |
updateUnassignedInfo(UnassignedInfo unassignedInfo)
updates the unassigned info 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)
existingAllocationId
- allocation id to use. If null, a fresh allocation id is generated.public void removeAndIgnore()
public ShardRouting updateUnassignedInfo(UnassignedInfo unassignedInfo)
unassignedInfo
- the new unassigned info to usepublic ShardRouting demotePrimaryToReplicaShard()
public void remove()
removeAndIgnore()
or
initialize(String, String, long)
.remove
in interface java.util.Iterator<ShardRouting>