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(DiscoveryNode node)
RoutingNode
public RoutingNode(DiscoveryNode node,
java.util.List<MutableShardRouting> shards)
iterator
public java.util.Iterator<MutableShardRouting> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<MutableShardRouting>
node
public DiscoveryNode node()
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)
shardsWithState
public java.util.List<MutableShardRouting> shardsWithState(java.lang.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 java.lang.String prettyPrint()