org.elasticsearch.cluster.routing
Class ImmutableShardRouting
java.lang.Object
org.elasticsearch.cluster.routing.ImmutableShardRouting
- All Implemented Interfaces:
- java.io.Serializable, ShardRouting, Streamable
- Direct Known Subclasses:
- MutableShardRouting
public class ImmutableShardRouting
- extends java.lang.Object
- implements Streamable, java.io.Serializable, ShardRouting
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
index
protected java.lang.String index
shardId
protected int shardId
currentNodeId
protected java.lang.String currentNodeId
relocatingNodeId
protected java.lang.String relocatingNodeId
primary
protected boolean primary
state
protected ShardRoutingState state
ImmutableShardRouting
public ImmutableShardRouting()
ImmutableShardRouting
public ImmutableShardRouting(ShardRouting copy)
ImmutableShardRouting
public ImmutableShardRouting(java.lang.String index,
int shardId,
java.lang.String currentNodeId,
boolean primary,
ShardRoutingState state)
ImmutableShardRouting
public ImmutableShardRouting(java.lang.String index,
int shardId,
java.lang.String currentNodeId,
java.lang.String relocatingNodeId,
boolean primary,
ShardRoutingState state)
index
public java.lang.String index()
- Specified by:
index
in interface ShardRouting
id
public int id()
- Specified by:
id
in interface ShardRouting
unassigned
public boolean unassigned()
- Specified by:
unassigned
in interface ShardRouting
initializing
public boolean initializing()
- Specified by:
initializing
in interface ShardRouting
active
public boolean active()
- Description copied from interface:
ShardRouting
- Relocating or started.
- Specified by:
active
in interface ShardRouting
started
public boolean started()
- Specified by:
started
in interface ShardRouting
relocating
public boolean relocating()
- Specified by:
relocating
in interface ShardRouting
assignedToNode
public boolean assignedToNode()
- Specified by:
assignedToNode
in interface ShardRouting
currentNodeId
public java.lang.String currentNodeId()
- Specified by:
currentNodeId
in interface ShardRouting
relocatingNodeId
public java.lang.String relocatingNodeId()
- Specified by:
relocatingNodeId
in interface ShardRouting
primary
public boolean primary()
- Specified by:
primary
in interface ShardRouting
state
public ShardRoutingState state()
- Specified by:
state
in interface ShardRouting
shardId
public ShardId shardId()
- Specified by:
shardId
in interface ShardRouting
shardsIt
public ShardsIterator shardsIt()
- Description copied from interface:
ShardRouting
- A shard iterator with just this shard in it.
- Specified by:
shardsIt
in interface ShardRouting
readShardRoutingEntry
public static ImmutableShardRouting readShardRoutingEntry(StreamInput in)
throws java.io.IOException
- Throws:
java.io.IOException
readShardRoutingEntry
public static ImmutableShardRouting readShardRoutingEntry(StreamInput in,
java.lang.String index,
int shardId)
throws java.io.IOException
- Throws:
java.io.IOException
readFrom
public void readFrom(StreamInput in,
java.lang.String index,
int shardId)
throws java.io.IOException
- Throws:
java.io.IOException
readFromThin
public void readFromThin(StreamInput in)
throws java.io.IOException
- Specified by:
readFromThin
in interface ShardRouting
- Throws:
java.io.IOException
readFrom
public void readFrom(StreamInput in)
throws java.io.IOException
- Specified by:
readFrom
in interface Streamable
- Throws:
java.io.IOException
writeToThin
public void writeToThin(StreamOutput out)
throws java.io.IOException
- Does not write index name and shard id
- Specified by:
writeToThin
in interface ShardRouting
- Throws:
java.io.IOException
writeTo
public void writeTo(StreamOutput out)
throws java.io.IOException
- Specified by:
writeTo
in interface Streamable
- Throws:
java.io.IOException
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
shortSummary
public java.lang.String shortSummary()
- Specified by:
shortSummary
in interface ShardRouting