Record Class ListingCacheKey

java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.cache.ListingCacheKey

public record ListingCacheKey(String scheme, String bucketOrContainer, String prefixAndGlob, String endpoint, String region, long credentialHashH1, long credentialHashH2) extends Record
Cache key for file listing results. Includes a 128-bit Murmur3 hash of credential values (NOT the credential keys) for isolation between users with different credentials. Endpoint and region are included because the same bucket on different endpoints contains different objects.
  • Constructor Details

    • ListingCacheKey

      public ListingCacheKey(String scheme, String bucketOrContainer, String prefixAndGlob, String endpoint, String region, long credentialHashH1, long credentialHashH2)
      Creates an instance of a ListingCacheKey record class.
      Parameters:
      scheme - the value for the scheme record component
      bucketOrContainer - the value for the bucketOrContainer record component
      prefixAndGlob - the value for the prefixAndGlob record component
      endpoint - the value for the endpoint record component
      region - the value for the region record component
      credentialHashH1 - the value for the credentialHashH1 record component
      credentialHashH2 - the value for the credentialHashH2 record component
  • Method Details

    • build

      public static ListingCacheKey build(String scheme, String bucket, String prefixAndGlob, Map<String,Object> config)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • scheme

      public String scheme()
      Returns the value of the scheme record component.
      Returns:
      the value of the scheme record component
    • bucketOrContainer

      public String bucketOrContainer()
      Returns the value of the bucketOrContainer record component.
      Returns:
      the value of the bucketOrContainer record component
    • prefixAndGlob

      public String prefixAndGlob()
      Returns the value of the prefixAndGlob record component.
      Returns:
      the value of the prefixAndGlob record component
    • endpoint

      public String endpoint()
      Returns the value of the endpoint record component.
      Returns:
      the value of the endpoint record component
    • region

      public String region()
      Returns the value of the region record component.
      Returns:
      the value of the region record component
    • credentialHashH1

      public long credentialHashH1()
      Returns the value of the credentialHashH1 record component.
      Returns:
      the value of the credentialHashH1 record component
    • credentialHashH2

      public long credentialHashH2()
      Returns the value of the credentialHashH2 record component.
      Returns:
      the value of the credentialHashH2 record component