java.lang.Object
java.lang.Record
org.elasticsearch.action.search.SearchShard
- All Implemented Interfaces:
- Comparable<SearchShard>
public record SearchShard(String clusterAlias, ShardId shardId)
extends Record
implements Comparable<SearchShard>
A class that encapsulates the 
ShardId and the cluster alias
 of a shard used during the search action.- 
Constructor SummaryConstructorsConstructorDescriptionSearchShard(String clusterAlias, ShardId shardId) Creates an instance of aSearchShardrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of theclusterAliasrecord component.intfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.shardId()Returns the value of theshardIdrecord component.final StringtoString()Returns a string representation of this record class.
- 
Constructor Details- 
SearchShardCreates an instance of aSearchShardrecord class.- Parameters:
- clusterAlias- the value for the- clusterAliasrecord component
- shardId- the value for the- shardIdrecord component
 
 
- 
- 
Method Details- 
compareTo- Specified by:
- compareToin interface- Comparable<SearchShard>
 
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object).
- 
clusterAliasReturns the value of theclusterAliasrecord component.- Returns:
- the value of the clusterAliasrecord component
 
- 
shardIdReturns the value of theshardIdrecord component.- Returns:
- the value of the shardIdrecord component
 
 
-