org.elasticsearch.index.shard
Class ShardId

java.lang.Object
  extended by 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

Constructor Summary
ShardId(Index index, int shardId)
           
ShardId(String index, int shardId)
           
 
Method Summary
 boolean equals(Object o)
           
 int getId()
           
 String getIndex()
           
 int hashCode()
           
 int id()
           
 Index index()
           
 void readFrom(StreamInput in)
           
static ShardId readShardId(StreamInput in)
           
 String toString()
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShardId

public ShardId(String index,
               int shardId)

ShardId

public ShardId(Index index,
               int shardId)
Method Detail

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.