org.elasticsearch.cluster.routing
Class PlainShardsIterator

java.lang.Object
  extended by org.elasticsearch.cluster.routing.PlainShardsIterator
All Implemented Interfaces:
ShardsIterator
Direct Known Subclasses:
PlainShardIterator

public class PlainShardsIterator
extends Object
implements ShardsIterator


Constructor Summary
PlainShardsIterator(List<ShardRouting> shards)
           
PlainShardsIterator(List<ShardRouting> shards, int index)
           
 
Method Summary
 int assignedReplicasIncludingRelocating()
           
 Iterable<ShardRouting> asUnordered()
           
 ShardRouting firstOrNull()
          Returns the first shard, or null, without incrementing the iterator.
 ShardRouting nextOrNull()
          Returns the next shard, or null if none available.
 int remaining()
           
 ShardsIterator reset()
          Resets the iterator.
 int size()
          The number of shard routing instances.
 int sizeActive()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.elasticsearch.cluster.routing.ShardsIterator
equals, hashCode
 

Constructor Detail

PlainShardsIterator

public PlainShardsIterator(List<ShardRouting> shards)

PlainShardsIterator

public PlainShardsIterator(List<ShardRouting> shards,
                           int index)
Method Detail

reset

public ShardsIterator reset()
Description copied from interface: ShardsIterator
Resets the iterator.

Specified by:
reset in interface ShardsIterator

remaining

public int remaining()
Specified by:
remaining in interface ShardsIterator

firstOrNull

public ShardRouting firstOrNull()
Description copied from interface: ShardsIterator
Returns the first shard, or null, without incrementing the iterator.

Specified by:
firstOrNull in interface ShardsIterator
See Also:
ShardRouting.assignedToNode()

nextOrNull

public ShardRouting nextOrNull()
Description copied from interface: ShardsIterator
Returns the next shard, or null if none available.

Specified by:
nextOrNull in interface ShardsIterator

size

public int size()
Description copied from interface: ShardsIterator
The number of shard routing instances.

Specified by:
size in interface ShardsIterator

sizeActive

public int sizeActive()
Specified by:
sizeActive in interface ShardsIterator

assignedReplicasIncludingRelocating

public int assignedReplicasIncludingRelocating()
Specified by:
assignedReplicasIncludingRelocating in interface ShardsIterator

asUnordered

public Iterable<ShardRouting> asUnordered()
Specified by:
asUnordered in interface ShardsIterator


Copyright © 2009-2012. All Rights Reserved.