public class PlainShardsIterator extends java.lang.Object implements ShardsIterator
ShardsIterator that iterates a list or sub-list of
shard routings.| Constructor and Description |
|---|
PlainShardsIterator(java.util.List<ShardRouting> shards) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<ShardRouting> |
getShardRoutings()
Returns the
ShardRoutings that this shards iterator holds. |
java.util.Iterator<ShardRouting> |
iterator() |
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(java.util.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 java.util.List<ShardRouting> getShardRoutings()
ShardsIteratorShardRoutings that this shards iterator holds.getShardRoutings in interface ShardsIteratorpublic java.util.Iterator<ShardRouting> iterator()
iterator in interface java.lang.Iterable<ShardRouting>