Record Class CubicConfig
java.lang.Object
java.lang.Record
io.github.mahmoudimus.quic.congestion.CubicConfig
- Record Components:
initialWindow- the initial congestion window in bytes; RFC 9002 recommendsmin(10 * max_datagram_size, max(2 * max_datagram_size, 14720))
- All Implemented Interfaces:
ControllerFactory
Configuration of the
Cubic controller.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CubicConfigThe default: a 12000-byte initial window. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(long now, int currentMtu) A new controller.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 theinitialWindowrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
The default: a 12000-byte initial window.
-
-
Constructor Details
-
CubicConfig
public CubicConfig(long initialWindow) A configuration.- Parameters:
initialWindow- the initial window, positive
-
-
Method Details
-
build
Description copied from interface:ControllerFactoryA new controller.- Specified by:
buildin interfaceControllerFactory- Parameters:
now- the current time, in nanosecondscurrentMtu- the path's current maximum UDP payload size- Returns:
- the controller
-
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 '=='. -
initialWindow
public long initialWindow()Returns the value of theinitialWindowrecord component.- Returns:
- the value of the
initialWindowrecord component
-