java.lang.Object
org.elasticsearch.cluster.routing.RoutingNode
- All Implemented Interfaces:
Iterable<ShardRouting>
A
RoutingNode represents a cluster node associated with a single DiscoveryNode including all shards
that are hosted on that nodes. Each RoutingNode has a unique node id that can be used to identify the node.-
Method Summary
Modifier and TypeMethodDescriptionIndex[]booleangetByShardId(ShardId id) inthashCode()booleanbooleanisEmpty()iterator()node()Returns the nodesDiscoveryNode.nodeId()Get the id of this nodeintThe number of shards on this node that will not be eventually relocated.intintDetermine the number of shards with a specific stateshardsWithState(String index, ShardRoutingState state) shardsWithState(String index, ShardRoutingState... states) Determine the shards of an index with a specific stateshardsWithState(ShardRoutingState state) Determine the shards with a specific stateintsize()started()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceIterable<ShardRouting>
-
node
Returns the nodesDiscoveryNode.- Returns:
- discoveryNode of this node
-
getByShardId
-
hasIndex
-
nodeId
Get the id of this node- Returns:
- id of the node
-
size
public int size() -
initializing
-
relocating
-
started
-
numberOfShardsWithState
Determine the number of shards with a specific state- Parameters:
state- which should be counted- Returns:
- number of shards
-
shardsWithState
Determine the shards with a specific state- Parameters:
state- state which should be listed- Returns:
- List of shards
-
shardsWithState
Determine the shards of an index with a specific state- Parameters:
index- id of the indexstates- set of states which should be listed- Returns:
- a list of shards
-
shardsWithState
-
numberOfOwningShards
public int numberOfOwningShards()The number of shards on this node that will not be eventually relocated. -
numberOfOwningShardsForIndex
-
prettyPrint
-
toString
-
copyShards
-
copyIndices
-
isEmpty
public boolean isEmpty() -
equals
-
hashCode
public int hashCode()
-