Record Class ControllerMetrics

java.lang.Object
java.lang.Record
io.github.mahmoudimus.quic.congestion.ControllerMetrics
Record Components:
congestionWindow - the congestion window, in bytes
slowStartThreshold - the slow start threshold in bytes, Long.MAX_VALUE before the first congestion event, or -1 if the controller has none
pacingRate - the pacing rate in bits per second, or -1 if the controller sets none
bandwidthEstimate - 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 Details

    • ControllerMetrics

      public ControllerMetrics(long congestionWindow, long slowStartThreshold, long pacingRate)
      Metrics without a bandwidth estimate.
      Parameters:
      congestionWindow - the congestion window, in bytes
      slowStartThreshold - the slow start threshold in bytes, or -1
      pacingRate - the pacing rate in bits per second, or -1
    • ControllerMetrics

      public ControllerMetrics(long congestionWindow, long slowStartThreshold, long pacingRate, long bandwidthEstimate)
      Creates an instance of a ControllerMetrics record class.
      Parameters:
      congestionWindow - the value for the congestionWindow record component
      slowStartThreshold - the value for the slowStartThreshold record component
      pacingRate - the value for the pacingRate record component
      bandwidthEstimate - the value for the bandwidthEstimate record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • congestionWindow

      public long congestionWindow()
      Returns the value of the congestionWindow record component.
      Returns:
      the value of the congestionWindow record component
    • slowStartThreshold

      public long slowStartThreshold()
      Returns the value of the slowStartThreshold record component.
      Returns:
      the value of the slowStartThreshold record component
    • pacingRate

      public long pacingRate()
      Returns the value of the pacingRate record component.
      Returns:
      the value of the pacingRate record component
    • bandwidthEstimate

      public long bandwidthEstimate()
      Returns the value of the bandwidthEstimate record component.
      Returns:
      the value of the bandwidthEstimate record component