org.elasticsearch.index.shard
Class ShardId
java.lang.Object
org.elasticsearch.index.shard.ShardId
- All Implemented Interfaces:
- Serializable, Streamable
public class ShardId
- extends Object
- implements Serializable, Streamable
Allows for shard level components to be injected with the shard id.
- See Also:
- Serialized Form
ShardId
public ShardId(String index,
int shardId)
ShardId
public ShardId(Index index,
int shardId)
index
public Index index()
getIndex
public String getIndex()
id
public int id()
getId
public int getId()
toString
public String toString()
- Overrides:
toString
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
readShardId
public static ShardId readShardId(StreamInput in)
throws IOException
- Throws:
IOException
readFrom
public void readFrom(StreamInput in)
throws IOException
- Specified by:
readFrom
in interface Streamable
- Throws:
IOException
writeTo
public void writeTo(StreamOutput out)
throws IOException
- Specified by:
writeTo
in interface Streamable
- Throws:
IOException
Copyright © 2009-2012. All Rights Reserved.