Record Class Cluster.Autoscaling.Metrics
java.lang.Object
java.lang.Record
com.yahoo.vespa.hosted.controller.api.integration.configserver.Cluster.Autoscaling.Metrics
- Enclosing class:
- Cluster.Autoscaling
public static record Cluster.Autoscaling.Metrics(double queryRate, double growthRateHeadroom, double cpuCostPerQuery)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMetrics(double queryRate, double growthRateHeadroom, double cpuCostPerQuery) Creates an instance of aMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecpuCostPerQueryrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thegrowthRateHeadroomrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thequeryRaterecord component.final StringtoString()Returns a string representation of this record class.static Cluster.Autoscaling.Metricszero()
-
Constructor Details
-
Metrics
public Metrics(double queryRate, double growthRateHeadroom, double cpuCostPerQuery) Creates an instance of aMetricsrecord class.- Parameters:
queryRate- the value for thequeryRaterecord componentgrowthRateHeadroom- the value for thegrowthRateHeadroomrecord componentcpuCostPerQuery- the value for thecpuCostPerQueryrecord component
-
-
Method Details
-
zero
-
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. -
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. -
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. All components in this record class are compared with '=='. -
queryRate
public double queryRate()Returns the value of thequeryRaterecord component.- Returns:
- the value of the
queryRaterecord component
-
growthRateHeadroom
public double growthRateHeadroom()Returns the value of thegrowthRateHeadroomrecord component.- Returns:
- the value of the
growthRateHeadroomrecord component
-
cpuCostPerQuery
public double cpuCostPerQuery()Returns the value of thecpuCostPerQueryrecord component.- Returns:
- the value of the
cpuCostPerQueryrecord component
-