Class SearchShard

java.lang.Object
org.elasticsearch.action.search.SearchShard
All Implemented Interfaces:
java.lang.Comparable<SearchShard>

public class SearchShard
extends java.lang.Object
implements java.lang.Comparable<SearchShard>
A class that encapsulates the ShardId and the cluster alias of a shard used during the search action.
  • Method Summary

    Modifier and Type Method Description
    int compareTo​(SearchShard o)  
    boolean equals​(java.lang.Object o)  
    java.lang.String getClusterAlias()
    Return the cluster alias if the shard is on a remote cluster and null otherwise (local).
    ShardId getShardId()
    Return the ShardId of this shard.
    int hashCode()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • getClusterAlias

      @Nullable public java.lang.String getClusterAlias()
      Return the cluster alias if the shard is on a remote cluster and null otherwise (local).
    • getShardId

      @Nullable public ShardId getShardId()
      Return the ShardId of this shard.
    • compareTo

      public int compareTo​(SearchShard o)
      Specified by:
      compareTo in interface java.lang.Comparable<SearchShard>
    • 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