Record Class ControllerMetrics
java.lang.Object
java.lang.Record
io.github.mahmoudimus.quic.congestion.ControllerMetrics
- Record Components:
congestionWindow- the congestion window, in bytesslowStartThreshold- the slow start threshold in bytes,Long.MAX_VALUEbefore the first congestion event, or -1 if the controller has nonepacingRate- the pacing rate in bits per second, or -1 if the controller sets nonebandwidthEstimate- the estimated sustainable bandwidth of the path in bits per second, or -1 if the controller keeps no estimate or has no sample yet
public record ControllerMetrics(long congestionWindow, long slowStartThreshold, long pacingRate, long bandwidthEstimate)
extends Record
Congestion controller metrics.
-
Constructor Summary
ConstructorsConstructorDescriptionControllerMetrics(long congestionWindow, long slowStartThreshold, long pacingRate) Metrics without a bandwidth estimate.ControllerMetrics(long congestionWindow, long slowStartThreshold, long pacingRate, long bandwidthEstimate) Creates an instance of aControllerMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thebandwidthEstimaterecord component.longReturns the value of thecongestionWindowrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thepacingRaterecord component.longReturns the value of theslowStartThresholdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ControllerMetrics
public ControllerMetrics(long congestionWindow, long slowStartThreshold, long pacingRate) Metrics without a bandwidth estimate.- Parameters:
congestionWindow- the congestion window, in bytesslowStartThreshold- the slow start threshold in bytes, or -1pacingRate- the pacing rate in bits per second, or -1
-
ControllerMetrics
public ControllerMetrics(long congestionWindow, long slowStartThreshold, long pacingRate, long bandwidthEstimate) Creates an instance of aControllerMetricsrecord class.- Parameters:
congestionWindow- the value for thecongestionWindowrecord componentslowStartThreshold- the value for theslowStartThresholdrecord componentpacingRate- the value for thepacingRaterecord componentbandwidthEstimate- the value for thebandwidthEstimaterecord 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 '=='. -
congestionWindow
public long congestionWindow()Returns the value of thecongestionWindowrecord component.- Returns:
- the value of the
congestionWindowrecord component
-
slowStartThreshold
public long slowStartThreshold()Returns the value of theslowStartThresholdrecord component.- Returns:
- the value of the
slowStartThresholdrecord component
-
pacingRate
public long pacingRate()Returns the value of thepacingRaterecord component.- Returns:
- the value of the
pacingRaterecord component
-
bandwidthEstimate
public long bandwidthEstimate()Returns the value of thebandwidthEstimaterecord component.- Returns:
- the value of the
bandwidthEstimaterecord component
-