Record Class DataSourceCapabilities

java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.DataSourceCapabilities

public record DataSourceCapabilities(Set<String> schemes, Set<String> formats, Set<String> extensions, Set<String> catalogs) extends Record
Aggregated capability declarations from all registered DataSourcePlugin instances. Built once at startup from cheap SPI calls; does not store plugin references.
  • Constructor Details

    • DataSourceCapabilities

      public DataSourceCapabilities(Set<String> schemes, Set<String> formats, Set<String> extensions, Set<String> catalogs)
      Creates an instance of a DataSourceCapabilities record class.
      Parameters:
      schemes - the value for the schemes record component
      formats - the value for the formats record component
      extensions - the value for the extensions record component
      catalogs - the value for the catalogs record component
  • Method Details

    • supportsScheme

      public boolean supportsScheme(String s)
    • supportsFormat

      public boolean supportsFormat(String f)
    • supportsExtension

      public boolean supportsExtension(String ext)
    • supportsCatalog

      public boolean supportsCatalog(String c)
    • supportedSchemesString

      public String supportedSchemesString()
    • build

      public static DataSourceCapabilities build(List<DataSourcePlugin> plugins)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • schemes

      public Set<String> schemes()
      Returns the value of the schemes record component.
      Returns:
      the value of the schemes record component
    • formats

      public Set<String> formats()
      Returns the value of the formats record component.
      Returns:
      the value of the formats record component
    • extensions

      public Set<String> extensions()
      Returns the value of the extensions record component.
      Returns:
      the value of the extensions record component
    • catalogs

      public Set<String> catalogs()
      Returns the value of the catalogs record component.
      Returns:
      the value of the catalogs record component