Module org.elasticsearch.server
Package org.elasticsearch.repositories
Record Class RepositoryShardId
java.lang.Object
java.lang.Record
org.elasticsearch.repositories.RepositoryShardId
- All Implemented Interfaces:
Writeable
Represents a shard snapshot in a repository.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionRepositoryShardId(IndexId index, int shardId) Creates an instance of aRepositoryShardIdrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.index()Returns the value of theindexrecord component.static RepositoryShardIdreadFrom(StreamInput in) intshardId()Returns the value of theshardIdrecord component.final StringtoString()Returns a string representation of this record class.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
RepositoryShardId
Creates an instance of aRepositoryShardIdrecord class.- Parameters:
index- the value for theindexrecord componentshardId- the value for theshardIdrecord component
-
-
Method Details
-
readFrom
- Throws:
IOException
-
indexName
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toString
Returns 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. -
hashCode
public 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. -
equals
Indicates 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
index
Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
shardId
public int shardId()Returns the value of theshardIdrecord component.- Returns:
- the value of the
shardIdrecord component
-