Record Class QueryOptimizer.CostEstimate
java.lang.Object
java.lang.Record
com.loomcache.server.query.QueryOptimizer.CostEstimate
- Enclosing class:
QueryOptimizer
-
Constructor Summary
ConstructorsConstructorDescriptionCostEstimate(long estimatedRows, double estimatedCost, boolean usesIndex, @Nullable String indexName) Creates an instance of aCostEstimaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theestimatedCostrecord component.longReturns the value of theestimatedRowsrecord component.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of theindexNamerecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theusesIndexrecord component.
-
Constructor Details
-
CostEstimate
public CostEstimate(long estimatedRows, double estimatedCost, boolean usesIndex, @Nullable String indexName) Creates an instance of aCostEstimaterecord class.- Parameters:
estimatedRows- the value for theestimatedRowsrecord componentestimatedCost- the value for theestimatedCostrecord componentusesIndex- the value for theusesIndexrecord componentindexName- the value for theindexNamerecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
estimatedRows
public long estimatedRows()Returns the value of theestimatedRowsrecord component.- Returns:
- the value of the
estimatedRowsrecord component
-
estimatedCost
public double estimatedCost()Returns the value of theestimatedCostrecord component.- Returns:
- the value of the
estimatedCostrecord component
-
usesIndex
public boolean usesIndex()Returns the value of theusesIndexrecord component.- Returns:
- the value of the
usesIndexrecord component
-
indexName
Returns the value of theindexNamerecord component.- Returns:
- the value of the
indexNamerecord component
-