Record Class ListingHint
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.spi.ListingHint
- Record Components:
length- the object's length in byteslastModifiedMillis- the object's last-modified time, in epoch milliseconds
Metadata about a file already known from a directory listing, passed to
ExternalSourceFactory.resolveMetadataAsync(java.lang.String, org.elasticsearch.xpack.esql.datasources.spi.ListingHint, java.util.Map<java.lang.String, java.lang.Object>, java.util.concurrent.Executor, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.esql.datasources.spi.SourceMetadata>) so the factory can build the storage object
without a synchronous existence/HEAD probe before the async metadata read. A null hint
means nothing is known (e.g. a single, explicitly-referenced path) and the factory is responsible
for verifying existence itself.
New listing-derived fields (etag/version-id, checksum, storage class, ...) should be added here rather than as extra parameters, so the async-resolution signature and its overrides stay stable.
-
Constructor Summary
ConstructorsConstructorDescriptionListingHint(long length, long lastModifiedMillis) Creates an instance of aListingHintrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastModifiedMillisrecord component.longlength()Returns the value of thelengthrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ListingHint
public ListingHint(long length, long lastModifiedMillis) Creates an instance of aListingHintrecord class.- Parameters:
length- the value for thelengthrecord componentlastModifiedMillis- the value for thelastModifiedMillisrecord component
-
-
Method Details
-
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 with '=='. -
length
public long length()Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-
lastModifiedMillis
public long lastModifiedMillis()Returns the value of thelastModifiedMillisrecord component.- Returns:
- the value of the
lastModifiedMillisrecord component
-