Record Class SchemaCacheKey
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.cache.SchemaCacheKey
public record SchemaCacheKey(String canonicalPath, long lastModifiedEpochMillis, String formatType, String formatConfig, String endpoint, String region)
extends Record
Cache key for schema inference results. Includes mtime-in-key for invalidation.
Endpoint and region are included because the same canonical path on different
endpoints resolves to different objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaCacheKeyReturns the value of thecanonicalPathrecord component.endpoint()Returns the value of theendpointrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theformatConfigrecord component.Returns the value of theformatTyperecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastModifiedEpochMillisrecord component.region()Returns the value of theregionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SchemaCacheKey
public SchemaCacheKey(String canonicalPath, long lastModifiedEpochMillis, String formatType, String formatConfig, String endpoint, String region) Creates an instance of aSchemaCacheKeyrecord class.- Parameters:
canonicalPath- the value for thecanonicalPathrecord componentlastModifiedEpochMillis- the value for thelastModifiedEpochMillisrecord componentformatType- the value for theformatTyperecord componentformatConfig- the value for theformatConfigrecord componentendpoint- the value for theendpointrecord componentregion- the value for theregionrecord component
-
-
Method Details
-
build
-
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 '=='. -
canonicalPath
Returns the value of thecanonicalPathrecord component.- Returns:
- the value of the
canonicalPathrecord component
-
lastModifiedEpochMillis
public long lastModifiedEpochMillis()Returns the value of thelastModifiedEpochMillisrecord component.- Returns:
- the value of the
lastModifiedEpochMillisrecord component
-
formatType
Returns the value of theformatTyperecord component.- Returns:
- the value of the
formatTyperecord component
-
formatConfig
Returns the value of theformatConfigrecord component.- Returns:
- the value of the
formatConfigrecord component
-
endpoint
Returns the value of theendpointrecord component.- Returns:
- the value of the
endpointrecord component
-
region
Returns the value of theregionrecord component.- Returns:
- the value of the
regionrecord component
-