Module org.elasticsearch.server
Package org.elasticsearch.indices.store
Record Class TransportNodesListShardStoreMetadata.StoreFilesMetadata
java.lang.Object
java.lang.Record
org.elasticsearch.indices.store.TransportNodesListShardStoreMetadata.StoreFilesMetadata
- All Implemented Interfaces:
Iterable<StoreFileMetadata>,Writeable
- Enclosing class:
- TransportNodesListShardStoreMetadata
public static record TransportNodesListShardStoreMetadata.StoreFilesMetadata(Store.MetadataSnapshot metadataSnapshot, List<RetentionLease> peerRecoveryRetentionLeases)
extends Record
implements Iterable<StoreFileMetadata>, Writeable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsConstructorDescriptionStoreFilesMetadata(Store.MetadataSnapshot metadataSnapshot, List<RetentionLease> peerRecoveryRetentionLeases) Creates an instance of aStoreFilesMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanfileExists(String name) longReturns the retaining sequence number of the peer recovery retention lease for a given node if exists; otherwise, returns -1.final inthashCode()Returns a hash code value for this object.booleanisEmpty()iterator()Returns the value of themetadataSnapshotrecord component.Returns the value of thepeerRecoveryRetentionLeasesrecord component.readFrom(StreamInput in) syncId()toString()Returns a string representation of this record class.voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
EMPTY
-
-
Constructor Details
-
StoreFilesMetadata
public StoreFilesMetadata(Store.MetadataSnapshot metadataSnapshot, List<RetentionLease> peerRecoveryRetentionLeases) Creates an instance of aStoreFilesMetadatarecord class.- Parameters:
metadataSnapshot- the value for themetadataSnapshotrecord componentpeerRecoveryRetentionLeases- the value for thepeerRecoveryRetentionLeasesrecord component
-
-
Method Details
-
readFrom
public static TransportNodesListShardStoreMetadata.StoreFilesMetadata readFrom(StreamInput in) throws IOException - Throws:
IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
isEmpty
public boolean isEmpty() -
iterator
- Specified by:
iteratorin interfaceIterable<StoreFileMetadata>
-
fileExists
-
file
-
getPeerRecoveryRetentionLeaseRetainingSeqNo
Returns the retaining sequence number of the peer recovery retention lease for a given node if exists; otherwise, returns -1. -
syncId
- Returns:
- commit sync id if exists, else null
-
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). -
metadataSnapshot
Returns the value of themetadataSnapshotrecord component.- Returns:
- the value of the
metadataSnapshotrecord component
-
peerRecoveryRetentionLeases
Returns the value of thepeerRecoveryRetentionLeasesrecord component.- Returns:
- the value of the
peerRecoveryRetentionLeasesrecord component
-