Record Class CapacityPlanner.ScalingRecommendation
java.lang.Object
java.lang.Record
com.loomcache.server.metrics.CapacityPlanner.ScalingRecommendation
- Enclosing class:
CapacityPlanner
public static record CapacityPlanner.ScalingRecommendation(CapacityPlanner.ScalingAction action, String reason, double currentUtilization, double projectedUtilization)
extends Record
Scaling recommendation record.
-
Constructor Summary
ConstructorsConstructorDescriptionScalingRecommendation(CapacityPlanner.ScalingAction action, String reason, double currentUtilization, double projectedUtilization) Creates an instance of aScalingRecommendationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.doubleReturns the value of thecurrentUtilizationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theprojectedUtilizationrecord component.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScalingRecommendation
public ScalingRecommendation(CapacityPlanner.ScalingAction action, String reason, double currentUtilization, double projectedUtilization) Creates an instance of aScalingRecommendationrecord class.- Parameters:
action- the value for theactionrecord componentreason- the value for thereasonrecord componentcurrentUtilization- the value for thecurrentUtilizationrecord componentprojectedUtilization- the value for theprojectedUtilizationrecord 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. -
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
currentUtilization
public double currentUtilization()Returns the value of thecurrentUtilizationrecord component.- Returns:
- the value of the
currentUtilizationrecord component
-
projectedUtilization
public double projectedUtilization()Returns the value of theprojectedUtilizationrecord component.- Returns:
- the value of the
projectedUtilizationrecord component
-