Record Class FooterByteCache.Key
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.cache.FooterByteCache.Key
- Enclosing class:
FooterByteCache
Cache key identifying a file by its storage path and total length. Uses
(path, length)
only — not lastModified — so that all range splits of the same file share one cache
entry regardless of any timing jitter in StorageObject.lastModified().-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefileLengthrecord component.final inthashCode()Returns a hash code value for this object.static FooterByteCache.KeykeyFor(StorageObject storageObject, long length) Creates a key from aStorageObject, using its path string as the canonical identifier.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Key
Creates an instance of aKeyrecord class.- Parameters:
path- the value for thepathrecord componentfileLength- the value for thefileLengthrecord component
-
-
Method Details
-
keyFor
Creates a key from aStorageObject, using its path string as the canonical identifier. All callers should prefer this factory over constructingKeydirectly so that path canonicalization happens in one place. -
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 '=='. -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
fileLength
public long fileLength()Returns the value of thefileLengthrecord component.- Returns:
- the value of the
fileLengthrecord component
-