Record Class IndexConfig

java.lang.Object
java.lang.Record
com.loomcache.server.query.IndexConfig

public record IndexConfig(String indexName, List<String> columnNames, IndexType indexType) extends Record
Configuration for an index on a map column.
  • Constructor Details

    • IndexConfig

      public IndexConfig(String indexName, String columnName, IndexType indexType)
    • IndexConfig

      public IndexConfig(String indexName, List<String> columnNames, IndexType indexType)
      Creates a new IndexConfig.
      Parameters:
      indexName - the unique name of this index
      columnNames - the columns to index, ordered by leftmost-prefix priority
      indexType - the type of index (SORTED, HASH, BITMAP)
  • Method Details

    • fromDeclarative

      public static IndexConfig fromDeclarative(String indexName, String columnName, @Nullable String indexTypeName)
    • fromDeclarative

      public static IndexConfig fromDeclarative(String indexName, List<String> columnNames, @Nullable String indexTypeName)
    • parseDeclaration

      public static IndexConfig parseDeclaration(String declaration)
    • columnName

      public String columnName()
    • composite

      public boolean composite()
    • leftmostPrefix

      public List<String> leftmostPrefix(Set<String> predicateColumns)
    • parseIndexType

      public static IndexType parseIndexType(@Nullable String indexTypeName)
    • 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.
    • indexName

      public String indexName()
      Returns the value of the indexName record component.
      Returns:
      the value of the indexName record component
    • columnNames

      public List<String> columnNames()
      Returns the value of the columnNames record component.
      Returns:
      the value of the columnNames record component
    • indexType

      public IndexType indexType()
      Returns the value of the indexType record component.
      Returns:
      the value of the indexType record component