org.elasticsearch.cluster.routing
Class RoutingNode
java.lang.Object
org.elasticsearch.cluster.routing.RoutingNode
- All Implemented Interfaces:
- java.lang.Iterable<MutableShardRouting>
public class RoutingNode
- extends java.lang.Object
- implements java.lang.Iterable<MutableShardRouting>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoutingNode
public RoutingNode(java.lang.String nodeId)
RoutingNode
public RoutingNode(java.lang.String nodeId,
java.util.List<MutableShardRouting> shards)
iterator
public java.util.Iterator<MutableShardRouting> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<MutableShardRouting>
nodeId
public java.lang.String nodeId()
shards
public java.util.List<MutableShardRouting> shards()
add
public void add(MutableShardRouting shard)
removeByShardId
public void removeByShardId(int shardId)
numberOfShardsWithState
public int numberOfShardsWithState(ShardRoutingState... states)
shardsWithState
public java.util.List<MutableShardRouting> shardsWithState(ShardRoutingState... states)
numberOfShardsNotWithState
public int numberOfShardsNotWithState(ShardRoutingState state)
numberOfOwningShards
public int numberOfOwningShards()
- The number fo shards on this node that will not be eventually relocated.
canAllocate
public boolean canAllocate(MetaData metaData,
RoutingTable routingTable)
canAllocate
public boolean canAllocate(ShardRouting requested)
canAllocate
public boolean canAllocate(MutableShardRouting requested)
prettyPrint
public java.lang.String prettyPrint()