public interface ShardRouting extends Streamable, Serializable, ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_PARAMS
Modifier and Type | Method and Description |
---|---|
boolean |
active()
|
boolean |
assignedToNode()
Returns
true iff this shard is assigned to a node ie. |
String |
currentNodeId()
The current node id the shard is allocated on.
|
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()
Returns
true iff this shard is a primary. |
void |
readFromThin(StreamInput in) |
boolean |
relocating()
Returns
true iff the this shard is currently relocating to
another node. |
String |
relocatingNodeId()
The relocating node id the shard is either relocating to or relocating from.
|
RestoreSource |
restoreSource()
Snapshot id and repository where this shard is being restored 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.
|
ShardRouting |
targetRoutingIfRelocating()
If the shard is relocating, return a shard routing representing the target shard or null o.w.
|
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
|
readFrom, writeTo
toXContent
ShardId shardId()
String index()
String getIndex()
int id()
int getId()
long version()
ShardRoutingState state()
boolean unassigned()
boolean initializing()
boolean started()
boolean relocating()
true
iff the this shard is currently relocating to
another node. Otherwise false
ShardRoutingState.RELOCATING
boolean active()
boolean assignedToNode()
String currentNodeId()
String relocatingNodeId()
ShardRouting targetRoutingIfRelocating()
RestoreSource restoreSource()
boolean primary()
true
iff this shard is a primary.String shortSummary()
ShardIterator shardsIt()
void writeToThin(StreamOutput out) throws IOException
IOException
void readFromThin(StreamInput in) throws ClassNotFoundException, IOException
ClassNotFoundException
IOException
Copyright © 2009–2015. All rights reserved.