Record Class QueryOptimizer.CostEstimate

java.lang.Object
java.lang.Record
com.loomcache.server.query.QueryOptimizer.CostEstimate
Enclosing class:
QueryOptimizer

public static record QueryOptimizer.CostEstimate(long estimatedRows, double estimatedCost, boolean usesIndex, @Nullable String indexName) extends Record
Cost estimate for a query plan.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CostEstimate(long estimatedRows, double estimatedCost, boolean usesIndex, @Nullable String indexName)
    Creates an instance of a CostEstimate record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    double
    Returns the value of the estimatedCost record component.
    long
    Returns the value of the estimatedRows record component.
    final int
    Returns a hash code value for this object.
    @Nullable String
    Returns the value of the indexName record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the usesIndex record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CostEstimate

      public CostEstimate(long estimatedRows, double estimatedCost, boolean usesIndex, @Nullable String indexName)
      Creates an instance of a CostEstimate record class.
      Parameters:
      estimatedRows - the value for the estimatedRows record component
      estimatedCost - the value for the estimatedCost record component
      usesIndex - the value for the usesIndex record component
      indexName - the value for the indexName record component
  • Method Details

    • 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 the compare method from their corresponding wrapper classes.
      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.
    • estimatedRows

      public long estimatedRows()
      Returns the value of the estimatedRows record component.
      Returns:
      the value of the estimatedRows record component
    • estimatedCost

      public double estimatedCost()
      Returns the value of the estimatedCost record component.
      Returns:
      the value of the estimatedCost record component
    • usesIndex

      public boolean usesIndex()
      Returns the value of the usesIndex record component.
      Returns:
      the value of the usesIndex record component
    • indexName

      public @Nullable String indexName()
      Returns the value of the indexName record component.
      Returns:
      the value of the indexName record component