Package com.tnsai.quality.slo
Record Class DegradationPolicy.ShedLowPriorityLoad
java.lang.Object
java.lang.Record
com.tnsai.quality.slo.DegradationPolicy.ShedLowPriorityLoad
- All Implemented Interfaces:
DegradationPolicy
- Enclosing interface:
DegradationPolicy
public static record DegradationPolicy.ShedLowPriorityLoad(double dropFraction)
extends Record
implements DegradationPolicy
Drop the configured fraction of low-priority requests.
0.0
means shed nothing; 1.0 means shed all low-priority.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tnsai.quality.slo.DegradationPolicy
DegradationPolicy.DisableFeature, DegradationPolicy.NoDegradation, DegradationPolicy.RefuseNewWork, DegradationPolicy.RouteToFallback, DegradationPolicy.ShedLowPriorityLoad -
Constructor Summary
ConstructorsConstructorDescriptionShedLowPriorityLoad(double dropFraction) Creates an instance of aShedLowPriorityLoadrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thedropFractionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ShedLowPriorityLoad
public ShedLowPriorityLoad(double dropFraction) Creates an instance of aShedLowPriorityLoadrecord class.- Parameters:
dropFraction- the value for thedropFractionrecord component
-
-
Method Details
-
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 '=='. -
dropFraction
public double dropFraction()Returns the value of thedropFractionrecord component.- Returns:
- the value of the
dropFractionrecord component
-