public static final class RoutingNodes.UnassignedShards extends Object implements Iterable<ShardRouting>
Modifier and Type | Class and Description |
---|---|
class |
RoutingNodes.UnassignedShards.UnassignedIterator |
Constructor and Description |
---|
RoutingNodes.UnassignedShards(RoutingNodes nodes) |
Modifier and Type | Method and Description |
---|---|
void |
add(ShardRouting shardRouting) |
ShardRouting[] |
drain()
Drains all unassigned shards and returns it.
|
int |
getNumIgnoredPrimaries()
Returns the number of temporarily marked as ignored unassigned primaries
|
int |
getNumPrimaries()
Returns the number of non-ignored unassigned primaries
|
List<ShardRouting> |
ignored()
The list of ignored unassigned shards (read only).
|
int |
ignoredSize()
Returns the size of the temporarily marked as ignored unassigned shards
|
void |
ignoreShard(ShardRouting shard)
Marks a shard as temporarily ignored and adds it to the ignore unassigned list.
|
boolean |
isEmpty()
Returns
true iff this collection contains one or more non-ignored unassigned shards. |
boolean |
isIgnoredEmpty()
Returns
true iff any unassigned shards are marked as temporarily ignored. |
RoutingNodes.UnassignedShards.UnassignedIterator |
iterator() |
void |
shuffle() |
int |
size()
Returns the size of the non-ignored unassigned shards
|
void |
sort(Comparator<ShardRouting> comparator) |
public RoutingNodes.UnassignedShards(RoutingNodes nodes)
public void add(ShardRouting shardRouting)
public void sort(Comparator<ShardRouting> comparator)
public int size()
public int ignoredSize()
public int getNumPrimaries()
public int getNumIgnoredPrimaries()
public RoutingNodes.UnassignedShards.UnassignedIterator iterator()
iterator
in interface Iterable<ShardRouting>
public List<ShardRouting> ignored()
public void ignoreShard(ShardRouting shard)
public boolean isEmpty()
true
iff this collection contains one or more non-ignored unassigned shards.public boolean isIgnoredEmpty()
true
iff any unassigned shards are marked as temporarily ignored.public void shuffle()
public ShardRouting[] drain()
Copyright © 2009–2016. All rights reserved.