Class PlainShardsIterator

java.lang.Object
org.elasticsearch.cluster.routing.PlainShardsIterator
All Implemented Interfaces:
java.lang.Iterable<ShardRouting>, ShardsIterator
Direct Known Subclasses:
PlainShardIterator

public class PlainShardsIterator
extends java.lang.Object
implements ShardsIterator
A simple ShardsIterator that iterates a list or sub-list of shard indexRoutings.
  • Constructor Summary

    Constructors 
    Constructor Description
    PlainShardsIterator​(java.util.List<ShardRouting> shards)  
  • Method Summary

    Modifier and Type Method 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface org.elasticsearch.cluster.routing.ShardsIterator

    equals, hashCode