org.elasticsearch.cluster.routing
Interface ShardRouting

All Superinterfaces:
Serializable, Streamable, ToXContent
All Known Implementing Classes:
ImmutableShardRouting, MutableShardRouting

public interface ShardRouting
extends Streamable, Serializable, ToXContent

Shard routing represents the state of a shard instance allocated in the cluster.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Method Summary
 boolean active()
          Relocating or started.
 boolean assignedToNode()
          The shard is assigned to a node.
 String currentNodeId()
          The current node id the shard is allocated to.
 int getId()
          The shard id.
 String getIndex()
          The index name.
 int id()
          The shard id.
 String index()
          The index name.
 boolean initializing()
          The shard is initializing (usually recovering either from peer shard or from gateway).
 boolean primary()
          Is this a primary shard.
 void readFromThin(StreamInput in)
           
 boolean relocating()
          The shard is in relocating mode.
 String relocatingNodeId()
          The relocating node id the shard is either relocating to or relocating from.
 ShardId shardId()
          The shard id.
 ShardIterator shardsIt()
          A shard iterator with just this shard in it.
 String shortSummary()
          A short description of the shard.
 boolean started()
          The shard is in started mode.
 ShardRoutingState state()
          The shard state.
 boolean unassigned()
          The shard is unassigned (not allocated to any node).
 long version()
          The routing version associated with the shard.
 void writeToThin(StreamOutput out)
          Does not write index name and shard id
 
Methods inherited from interface org.elasticsearch.common.io.stream.Streamable
readFrom, writeTo
 
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
 

Method Detail

shardId

ShardId shardId()
The shard id.


index

String index()
The index name.


getIndex

String getIndex()
The index name.


id

int id()
The shard id.


getId

int getId()
The shard id.


version

long version()
The routing version associated with the shard.


state

ShardRoutingState state()
The shard state.


unassigned

boolean unassigned()
The shard is unassigned (not allocated to any node).


initializing

boolean initializing()
The shard is initializing (usually recovering either from peer shard or from gateway).


started

boolean started()
The shard is in started mode.


relocating

boolean relocating()
The shard is in relocating mode.


active

boolean active()
Relocating or started.


assignedToNode

boolean assignedToNode()
The shard is assigned to a node.


currentNodeId

String currentNodeId()
The current node id the shard is allocated to.


relocatingNodeId

String relocatingNodeId()
The relocating node id the shard is either relocating to or relocating from.


primary

boolean primary()
Is this a primary shard.


shortSummary

String shortSummary()
A short description of the shard.


shardsIt

ShardIterator shardsIt()
A shard iterator with just this shard in it.


writeToThin

void writeToThin(StreamOutput out)
                 throws IOException
Does not write index name and shard id

Throws:
IOException

readFromThin

void readFromThin(StreamInput in)
                  throws ClassNotFoundException,
                         IOException
Throws:
ClassNotFoundException
IOException


Copyright © 2009-2012. All Rights Reserved.