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
ConstructorDescriptionRepositoryShardId
(IndexId index, int shardId) Creates an instance of aRepositoryShardId
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.index()
Returns the value of theindex
record component.static RepositoryShardId
readFrom
(StreamInput in) int
shardId()
Returns the value of theshardId
record component.final String
toString()
Returns a string representation of this record class.void
writeTo
(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
RepositoryShardId
Creates an instance of aRepositoryShardId
record class.- Parameters:
index
- the value for theindex
record componentshardId
- the value for theshardId
record component
-
-
Method Details
-
readFrom
- Throws:
IOException
-
indexName
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in 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 theindex
record component.- Returns:
- the value of the
index
record component
-
shardId
public int shardId()Returns the value of theshardId
record component.- Returns:
- the value of the
shardId
record component
-