org.elasticsearch.cluster.routing
Class RoutingNode

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

public class RoutingNode
extends Object
implements Iterable<MutableShardRouting>


Constructor Summary
RoutingNode(String nodeId, DiscoveryNode node)
           
RoutingNode(String nodeId, DiscoveryNode node, List<MutableShardRouting> shards)
           
 
Method Summary
 void add(MutableShardRouting shard)
           
 Iterator<MutableShardRouting> iterator()
           
 DiscoveryNode node()
           
 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)
           
 String prettyPrint()
           
 void removeByShardId(int shardId)
           
 List<MutableShardRouting> shards()
           
 List<MutableShardRouting> shardsWithState(ShardRoutingState... states)
           
 List<MutableShardRouting> shardsWithState(String index, 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(String nodeId,
                   DiscoveryNode node)

RoutingNode

public RoutingNode(String nodeId,
                   DiscoveryNode node,
                   List<MutableShardRouting> shards)
Method Detail

iterator

public Iterator<MutableShardRouting> iterator()
Specified by:
iterator in interface Iterable<MutableShardRouting>

node

public DiscoveryNode node()

nodeId

public String nodeId()

shards

public List<MutableShardRouting> shards()

add

public void add(MutableShardRouting shard)

removeByShardId

public void removeByShardId(int shardId)

numberOfShardsWithState

public int numberOfShardsWithState(ShardRoutingState... states)

shardsWithState

public List<MutableShardRouting> shardsWithState(ShardRoutingState... states)

shardsWithState

public List<MutableShardRouting> shardsWithState(String index,
                                                 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 String prettyPrint()


Copyright © 2009-2012. All Rights Reserved.