public class PlainShardsIterator extends Object implements ShardsIterator
ShardsIterator that iterates a list or sub-list of
shard routings.| Constructor and Description |
|---|
PlainShardsIterator(List<ShardRouting> shards) |
| Modifier and Type | Method and Description |
|---|---|
int |
assignedReplicasIncludingRelocating()
Returns the number of replicas in this iterator that are not in the
ShardRoutingState.UNASSIGNED. |
Iterable<ShardRouting> |
asUnordered() |
ShardRouting |
nextOrNull()
Returns the next shard, or null if none available.
|
int |
remaining()
Return the number of shards remaining in this
ShardsIterator |
void |
reset()
Resets the iterator to its initial state.
|
int |
size()
The number of shard routing instances.
|
int |
sizeActive()
The number of active shard routing instances
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCodepublic PlainShardsIterator(List<ShardRouting> shards)
public void reset()
ShardsIteratorreset in interface ShardsIteratorpublic int remaining()
ShardsIteratorShardsIteratorremaining in interface ShardsIteratorpublic ShardRouting nextOrNull()
ShardsIteratornextOrNull in interface ShardsIteratorpublic int size()
ShardsIteratorsize in interface ShardsIteratorpublic int sizeActive()
ShardsIteratorsizeActive in interface ShardsIteratorpublic int assignedReplicasIncludingRelocating()
ShardsIteratorShardRoutingState.UNASSIGNED. The returned double-counts replicas
that are in the state ShardRoutingState.RELOCATINGassignedReplicasIncludingRelocating in interface ShardsIteratorpublic Iterable<ShardRouting> asUnordered()
asUnordered in interface ShardsIteratorCopyright © 2009–2016. All rights reserved.