Module org.elasticsearch.server
Package org.elasticsearch.repositories
Record Class FinalizeSnapshotContext.UpdatedShardGenerations
java.lang.Object
java.lang.Record
org.elasticsearch.repositories.FinalizeSnapshotContext.UpdatedShardGenerations
- Enclosing class:
FinalizeSnapshotContext
public static record FinalizeSnapshotContext.UpdatedShardGenerations(ShardGenerations liveIndices, ShardGenerations deletedIndices)
extends Record
A record used to track the new shard generations that have been written for each shard in a snapshot.
An index may be deleted after the shard generation is written but before the snapshot is finalized.
In this case, its shard generation is tracked in
deletedIndices because it's still a valid
shard generation blob that exists in the repository and may be used by subsequent snapshots, even though
the index will not be included in the snapshot being finalized. Otherwise, it is tracked in
liveIndices.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUpdatedShardGenerations(ShardGenerations liveIndices, ShardGenerations deletedIndices) Creates an instance of aUpdatedShardGenerationsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeletedIndicesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhasShardGen(RepositoryShardId repositoryShardId) Returns the value of theliveIndicesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
UpdatedShardGenerations
Creates an instance of aUpdatedShardGenerationsrecord class.- Parameters:
liveIndices- the value for theliveIndicesrecord componentdeletedIndices- the value for thedeletedIndicesrecord component
-
-
Method Details
-
hasShardGen
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
liveIndices
Returns the value of theliveIndicesrecord component.- Returns:
- the value of the
liveIndicesrecord component
-
deletedIndices
Returns the value of thedeletedIndicesrecord component.- Returns:
- the value of the
deletedIndicesrecord component
-