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, wait
equals, hashCode
public PlainShardsIterator(List<ShardRouting> shards)
public void reset()
ShardsIterator
reset
in interface ShardsIterator
public int remaining()
ShardsIterator
ShardsIterator
remaining
in interface ShardsIterator
public ShardRouting nextOrNull()
ShardsIterator
nextOrNull
in interface ShardsIterator
public int size()
ShardsIterator
size
in interface ShardsIterator
public int sizeActive()
ShardsIterator
sizeActive
in interface ShardsIterator
public int assignedReplicasIncludingRelocating()
ShardsIterator
ShardRoutingState.UNASSIGNED
. The returned double-counts replicas
that are in the state ShardRoutingState.RELOCATING
assignedReplicasIncludingRelocating
in interface ShardsIterator
public Iterable<ShardRouting> asUnordered()
asUnordered
in interface ShardsIterator
Copyright © 2009–2016. All rights reserved.