org.elasticsearch.cluster.routing
Class RoutingNode

java.lang.Object
  extended by org.elasticsearch.cluster.routing.RoutingNode
All Implemented Interfaces:
java.lang.Iterable<MutableShardRouting>

public class RoutingNode
extends java.lang.Object
implements java.lang.Iterable<MutableShardRouting>


Constructor Summary
RoutingNode(java.lang.String nodeId)
           
RoutingNode(java.lang.String nodeId, java.util.List<MutableShardRouting> shards)
           
 
Method Summary
 void add(MutableShardRouting shard)
           
 java.util.Iterator<MutableShardRouting> iterator()
           
 java.lang.String nodeId()
           
 int numberOfOwningShards()
          The number fo shards on this node that will not be eventually relocated.
 int numberOfShardsNotWithState(ShardRoutingState state)
           
 int numberOfShardsWithState(ShardRoutingState... states)
           
 java.lang.String prettyPrint()
           
 void removeByShardId(int shardId)
           
 java.util.List<MutableShardRouting> shards()
           
 java.util.List<MutableShardRouting> shardsWithState(ShardRoutingState... states)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoutingNode

public RoutingNode(java.lang.String nodeId)

RoutingNode

public RoutingNode(java.lang.String nodeId,
                   java.util.List<MutableShardRouting> shards)
Method Detail

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.


prettyPrint

public java.lang.String prettyPrint()