|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elasticsearch.cluster.routing.PlainShardsIterator
public class PlainShardsIterator
| Field Summary | |
|---|---|
protected java.util.List<ShardRouting> |
shards
|
| Constructor Summary | |
|---|---|
PlainShardsIterator(java.util.List<ShardRouting> shards)
|
|
PlainShardsIterator(java.util.List<ShardRouting> shards,
int index)
|
|
| Method Summary | |
|---|---|
boolean |
hasNext()
|
boolean |
hasNextActive()
Is there an active shard we can iterate to. |
boolean |
hasNextAssigned()
Is there an assigned shard we can iterate to. |
java.util.Iterator<ShardRouting> |
iterator()
|
ShardRouting |
next()
|
ShardRouting |
nextActive()
Returns the next active shard, or throws NoSuchElementException. |
ShardRouting |
nextActiveOrNull()
Returns the next active shard, or null. |
ShardRouting |
nextAssigned()
Returns the next assigned shard, or throws NoSuchElementException. |
ShardRouting |
nextAssignedOrNull()
Returns the next assigned shard, or null. |
void |
remove()
|
ShardsIterator |
reset()
Resets the iterator. |
int |
size()
The number of shard routing instances. |
int |
sizeActive()
The number of active shard routing instances. |
int |
sizeAssigned()
The number of assigned 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 org.elasticsearch.cluster.routing.ShardsIterator |
|---|
equals, hashCode |
| Field Detail |
|---|
protected final java.util.List<ShardRouting> shards
| Constructor Detail |
|---|
public PlainShardsIterator(java.util.List<ShardRouting> shards)
public PlainShardsIterator(java.util.List<ShardRouting> shards,
int index)
| Method Detail |
|---|
public java.util.Iterator<ShardRouting> iterator()
iterator in interface java.lang.Iterable<ShardRouting>public ShardsIterator reset()
ShardsIterator
reset in interface ShardsIteratorpublic boolean hasNext()
hasNext in interface java.util.Iterator<ShardRouting>
public ShardRouting next()
throws java.util.NoSuchElementException
next in interface java.util.Iterator<ShardRouting>java.util.NoSuchElementExceptionpublic void remove()
remove in interface java.util.Iterator<ShardRouting>public int size()
ShardsIterator
size in interface ShardsIteratorpublic int sizeActive()
ShardsIterator
sizeActive in interface ShardsIteratorShardRouting.active()public boolean hasNextActive()
ShardsIterator
hasNextActive in interface ShardsIteratorShardRouting.active()
public ShardRouting nextActive()
throws java.util.NoSuchElementException
ShardsIteratorNoSuchElementException.
nextActive in interface ShardsIteratorjava.util.NoSuchElementExceptionShardRouting.active()
public ShardRouting nextActiveOrNull()
throws java.util.NoSuchElementException
ShardsIterator
nextActiveOrNull in interface ShardsIteratorjava.util.NoSuchElementExceptionShardRouting.active()public int sizeAssigned()
ShardsIterator
sizeAssigned in interface ShardsIteratorShardRouting.assignedToNode()public boolean hasNextAssigned()
ShardsIterator
hasNextAssigned in interface ShardsIteratorShardRouting.assignedToNode()
public ShardRouting nextAssigned()
throws java.util.NoSuchElementException
ShardsIteratorNoSuchElementException.
nextAssigned in interface ShardsIteratorjava.util.NoSuchElementExceptionShardRouting.assignedToNode()public ShardRouting nextAssignedOrNull()
ShardsIterator
nextAssignedOrNull in interface ShardsIteratorShardRouting.assignedToNode()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||