APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.net.http.quic

pack-priv abstract Class QuicBaseCongestionController

extends Object
implements QuicCongestionController
Class Inheritance
All Implemented Interfaces
jdk.internal.net.http.quic.QuicCongestionController
Known Direct Subclasses
jdk.internal.net.http.quic.QuicCubicCongestionController, jdk.internal.net.http.quic.QuicRenoCongestionController
Imports
jdk.internal.net.http.common.Deadline, .Log, .TimeLine, .TimeSource, .Utils, jdk.internal.net.http.quic.frames.AckFrame, jdk.internal.net.http.quic.packets.QuicPacket, java.util.Collection, java.util.concurrent.locks.Lock, .ReentrantLock

Implementation of the common parts of a QUIC congestion controller based on RFC 9002. This class implements the common parts of a congestion controller: - slow start - loss recovery - cooperation with pacer Subclasses implement congestion window growth in congestion avoidance phase.
External Specification
https://www.rfc-editor.org/info/rfc9002

Field Summary

Modifier and TypeField and Description
pack-priv long
pack-priv Deadline
pack-priv long
pack-priv final String
private static final int
pack-priv final Lock
private static final int
pack-priv long
pack-priv int
pack-priv int
private final QuicPacer
pack-priv long
pack-priv final TimeLine

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
appLimited()

Implements jdk.internal.net.http.quic.QuicCongestionController.appLimited.

Notify the congestion controller that sending is app-limited

public boolean
canSendPacket()

Implements jdk.internal.net.http.quic.QuicCongestionController.canSendPacket.

Returns true if a new non-ACK packet can be sent at this time.

pack-priv abstract boolean
congestionAvoidanceAcked(int packetBytes, Deadline sentTime)

public long
congestionWindow()

Implements jdk.internal.net.http.quic.QuicCongestionController.congestionWindow.

Returns the current size of the congestion window in bytes.

pack-priv boolean
private static boolean
public long
initialWindow()

Implements jdk.internal.net.http.quic.QuicCongestionController.initialWindow.

Returns the initial window size in bytes.

public boolean
isCwndLimited()

Implements jdk.internal.net.http.quic.QuicCongestionController.isCwndLimited.

Returns true if sending is blocked by congestion window.

public boolean
isPacerLimited()

Implements jdk.internal.net.http.quic.QuicCongestionController.isPacerLimited.

Returns true if sending is blocked by pacer.

public boolean
isSlowStart()

Implements jdk.internal.net.http.quic.QuicCongestionController.isSlowStart.

Returns true if the connection is in slow start phase.

public long
pack-priv abstract void
public Deadline
pacerDeadline()

Implements jdk.internal.net.http.quic.QuicCongestionController.pacerDeadline.

Returns deadline when pacer will unblock sending.

public void
packetAcked(int packetBytes, Deadline sentTime)

Implements jdk.internal.net.http.quic.QuicCongestionController.packetAcked.

Update CC after a non-ACK packet is acked

public void
packetDiscarded(Collection<QuicPacket> discardedPackets)

Implements jdk.internal.net.http.quic.QuicCongestionController.packetDiscarded.

Update CC after packets are discarded

public void
packetLost(Collection<QuicPacket> lostPackets, Deadline sentTime, boolean persistent)

Implements jdk.internal.net.http.quic.QuicCongestionController.packetLost.

Update CC after packets are declared lost

public void
packetSent(int packetBytes)

Implements jdk.internal.net.http.quic.QuicCongestionController.packetSent.

Update CC with a non-ACK packet

public void
public void
updatePacer(Deadline now)

Implements jdk.internal.net.http.quic.QuicCongestionController.updatePacer.

Update the pacer with the current time

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bytesInFlightback to summary
pack-priv long bytesInFlight
congestionRecoveryStartTimeback to summary
pack-priv Deadline congestionRecoveryStartTime
congestionWindowback to summary
pack-priv long congestionWindow
dbgTagback to summary
pack-priv final String dbgTag
INITIAL_WINDOWback to summary
private static final int INITIAL_WINDOW
lockback to summary
pack-priv final Lock lock
MAX_BYTES_IN_FLIGHTback to summary
private static final int MAX_BYTES_IN_FLIGHT
maxBytesInFlightback to summary
pack-priv long maxBytesInFlight
maxDatagramSizeback to summary
pack-priv int maxDatagramSize
minimumWindowback to summary
pack-priv int minimumWindow
pacerback to summary
private final QuicPacer pacer
ssThreshback to summary
pack-priv long ssThresh
timeSourceback to summary
pack-priv final TimeLine timeSource

Constructor Detail

QuicBaseCongestionControllerback to summary
pack-priv QuicBaseCongestionController(String dbgTag, QuicRttEstimator rttEstimator)
QuicBaseCongestionControllerback to summary
pack-priv QuicBaseCongestionController(String dbgTag, TimeLine source, QuicRttEstimator rttEstimator)

Method Detail

appLimitedback to summary
public void appLimited()

Implements jdk.internal.net.http.quic.QuicCongestionController.appLimited.

Doc from jdk.internal.net.http.quic.QuicCongestionController.appLimited.

Notify the congestion controller that sending is app-limited

Annotations
@Override
canSendPacketback to summary
public boolean canSendPacket()

Implements jdk.internal.net.http.quic.QuicCongestionController.canSendPacket.

Doc from jdk.internal.net.http.quic.QuicCongestionController.canSendPacket.

Returns true if a new non-ACK packet can be sent at this time.

Annotations
@Override
congestionAvoidanceAckedback to summary
pack-priv abstract boolean congestionAvoidanceAcked(int packetBytes, Deadline sentTime)
congestionWindowback to summary
public long congestionWindow()

Implements jdk.internal.net.http.quic.QuicCongestionController.congestionWindow.

Doc from jdk.internal.net.http.quic.QuicCongestionController.congestionWindow.

Returns the current size of the congestion window in bytes.

Annotations
@Override
inCongestionRecoveryback to summary
pack-priv boolean inCongestionRecovery(Deadline sentTime)
inFlightback to summary
private static boolean inFlight(QuicPacket packet)
initialWindowback to summary
public long initialWindow()

Implements jdk.internal.net.http.quic.QuicCongestionController.initialWindow.

Doc from jdk.internal.net.http.quic.QuicCongestionController.initialWindow.

Returns the initial window size in bytes.

Annotations
@Override
isCwndLimitedback to summary
public boolean isCwndLimited()

Implements jdk.internal.net.http.quic.QuicCongestionController.isCwndLimited.

Doc from jdk.internal.net.http.quic.QuicCongestionController.isCwndLimited.

Returns true if sending is blocked by congestion window.

Annotations
@Override
isPacerLimitedback to summary
public boolean isPacerLimited()

Implements jdk.internal.net.http.quic.QuicCongestionController.isPacerLimited.

Doc from jdk.internal.net.http.quic.QuicCongestionController.isPacerLimited.

Returns true if sending is blocked by pacer.

Annotations
@Override
isSlowStartback to summary
public boolean isSlowStart()

Implements jdk.internal.net.http.quic.QuicCongestionController.isSlowStart.

Doc from jdk.internal.net.http.quic.QuicCongestionController.isSlowStart.

Returns true if the connection is in slow start phase.

Annotations
@Override
maxDatagramSizeback to summary
public long maxDatagramSize()

Implements jdk.internal.net.http.quic.QuicCongestionController.maxDatagramSize.

Doc from jdk.internal.net.http.quic.QuicCongestionController.maxDatagramSize.

Returns maximum datagram size.

Annotations
@Override
onCongestionEventback to summary
pack-priv abstract void onCongestionEvent(Deadline sentTime)
pacerDeadlineback to summary
public Deadline pacerDeadline()

Implements jdk.internal.net.http.quic.QuicCongestionController.pacerDeadline.

Doc from jdk.internal.net.http.quic.QuicCongestionController.pacerDeadline.

Returns deadline when pacer will unblock sending.

Annotations
@Override
packetAckedback to summary
public void packetAcked(int packetBytes, Deadline sentTime)

Implements jdk.internal.net.http.quic.QuicCongestionController.packetAcked.

Doc from jdk.internal.net.http.quic.QuicCongestionController.packetAcked.

Update CC after a non-ACK packet is acked

Annotations
@Override
packetDiscardedback to summary
public void packetDiscarded(Collection<QuicPacket> discardedPackets)

Implements jdk.internal.net.http.quic.QuicCongestionController.packetDiscarded.

Doc from jdk.internal.net.http.quic.QuicCongestionController.packetDiscarded.

Update CC after packets are discarded

Annotations
@Override
packetLostback to summary
public void packetLost(Collection<QuicPacket> lostPackets, Deadline sentTime, boolean persistent)

Implements jdk.internal.net.http.quic.QuicCongestionController.packetLost.

Doc from jdk.internal.net.http.quic.QuicCongestionController.packetLost.

Update CC after packets are declared lost

Annotations
@Override
packetSentback to summary
public void packetSent(int packetBytes)

Implements jdk.internal.net.http.quic.QuicCongestionController.packetSent.

Doc from jdk.internal.net.http.quic.QuicCongestionController.packetSent.

Update CC with a non-ACK packet

Annotations
@Override
updateMaxDatagramSizeback to summary
public void updateMaxDatagramSize(int newSize)

Implements jdk.internal.net.http.quic.QuicCongestionController.updateMaxDatagramSize.

Doc from jdk.internal.net.http.quic.QuicCongestionController.updateMaxDatagramSize.

Update the maximum datagram size

Annotations
@Override
updatePacerback to summary
public void updatePacer(Deadline now)

Implements jdk.internal.net.http.quic.QuicCongestionController.updatePacer.

Doc from jdk.internal.net.http.quic.QuicCongestionController.updatePacer.

Update the pacer with the current time

Annotations
@Override