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
Modifier and TypeFieldDescription -
Constructor Summary
ConstructorDescriptionStoreFilesMetadata
(Store.MetadataSnapshot metadataSnapshot, List<RetentionLease> peerRecoveryRetentionLeases) Creates an instance of aStoreFilesMetadata
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.boolean
fileExists
(String name) long
Returns the retaining sequence number of the peer recovery retention lease for a given node if exists; otherwise, returns -1.final int
hashCode()
Returns a hash code value for this object.boolean
isEmpty()
iterator()
Returns the value of themetadataSnapshot
record component.Returns the value of thepeerRecoveryRetentionLeases
record component.readFrom
(StreamInput in) syncId()
toString()
Returns a string representation of this record class.void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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 aStoreFilesMetadata
record class.- Parameters:
metadataSnapshot
- the value for themetadataSnapshot
record componentpeerRecoveryRetentionLeases
- the value for thepeerRecoveryRetentionLeases
record component
-
-
Method Details
-
readFrom
public static TransportNodesListShardStoreMetadata.StoreFilesMetadata readFrom(StreamInput in) throws IOException - Throws:
IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
isEmpty
public boolean isEmpty() -
iterator
- Specified by:
iterator
in 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 themetadataSnapshot
record component.- Returns:
- the value of the
metadataSnapshot
record component
-
peerRecoveryRetentionLeases
Returns the value of thepeerRecoveryRetentionLeases
record component.- Returns:
- the value of the
peerRecoveryRetentionLeases
record component
-