Class PlainShardsIterator
java.lang.Object
org.elasticsearch.common.util.PlainIterator<ShardRouting>
org.elasticsearch.cluster.routing.PlainShardsIterator
- All Implemented Interfaces:
java.lang.Iterable<ShardRouting>
,ShardsIterator
,Countable
- Direct Known Subclasses:
PlainShardIterator
public class PlainShardsIterator extends PlainIterator<ShardRouting> 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 theShardRouting
s that this shards iterator holds.int
sizeActive()
The number of active shard routing instancesMethods inherited from class org.elasticsearch.common.util.PlainIterator
asList, iterator, nextOrNull, remaining, reset, size
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, iterator, spliterator
Methods inherited from interface org.elasticsearch.cluster.routing.ShardsIterator
equals, hashCode, nextOrNull, remaining, reset, size
-
Constructor Details
-
PlainShardsIterator
-
-
Method Details
-
sizeActive
public int sizeActive()Description copied from interface:ShardsIterator
The number of active shard routing instances- Specified by:
sizeActive
in interfaceShardsIterator
- Returns:
- number of active shard routing instances
-
getShardRoutings
Description copied from interface:ShardsIterator
Returns theShardRouting
s that this shards iterator holds.- Specified by:
getShardRoutings
in interfaceShardsIterator
-