public class StaticWindowCongestionControl extends java.lang.Object implements CongestionControl
| Constructor and Description |
|---|
StaticWindowCongestionControl(long registrationId,
UdpChannel udpChannel,
int streamId,
int sessionId,
int termLength,
int senderMtuLength,
org.agrona.concurrent.NanoClock clock,
MediaDriver.Context context,
org.agrona.concurrent.status.CountersManager countersManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
initialWindowLength()
Called by
DriverConductor to initialise window length for a new PublicationImage. |
void |
onRttMeasurement(long nowNs,
long rttNs,
java.net.InetSocketAddress srcAddress)
Called by
Receiver on reception of an RTT Measurement. |
void |
onRttMeasurementSent(long nowNs)
Called by
Receiver to record that a measurement request has been sent. |
long |
onTrackRebuild(long nowNs,
long newConsumptionPosition,
long lastSmPosition,
long hwmPosition,
long startingRebuildPosition,
long endingRebuildPosition,
boolean lossOccurred)
Called by
DriverConductor upon execution of PublicationImage.trackRebuild(long, long) to
pass on current status. |
boolean |
shouldMeasureRtt(long nowNs)
Polled by
Receiver to determine when to initiate an RTT measurement to a Sender. |
public StaticWindowCongestionControl(long registrationId,
UdpChannel udpChannel,
int streamId,
int sessionId,
int termLength,
int senderMtuLength,
org.agrona.concurrent.NanoClock clock,
MediaDriver.Context context,
org.agrona.concurrent.status.CountersManager countersManager)
public void close()
close in interface CongestionControlclose in interface java.lang.AutoCloseablepublic boolean shouldMeasureRtt(long nowNs)
CongestionControlReceiver to determine when to initiate an RTT measurement to a Sender.shouldMeasureRtt in interface CongestionControlnowNs - in nanosecondspublic void onRttMeasurementSent(long nowNs)
CongestionControlReceiver to record that a measurement request has been sent.onRttMeasurementSent in interface CongestionControlnowNs - in nanoseconds.public void onRttMeasurement(long nowNs,
long rttNs,
java.net.InetSocketAddress srcAddress)
CongestionControlReceiver on reception of an RTT Measurement.onRttMeasurement in interface CongestionControlnowNs - in nanosecondsrttNs - to the Sender in nanosecondssrcAddress - of the Senderpublic long onTrackRebuild(long nowNs,
long newConsumptionPosition,
long lastSmPosition,
long hwmPosition,
long startingRebuildPosition,
long endingRebuildPosition,
boolean lossOccurred)
CongestionControlDriverConductor upon execution of PublicationImage.trackRebuild(long, long) to
pass on current status.
The return value must be packed using CongestionControlUtil.packOutcome(int, boolean).
onTrackRebuild in interface CongestionControlnowNs - in nanosecondsnewConsumptionPosition - of the SubscriberslastSmPosition - of the imagehwmPosition - of the imagestartingRebuildPosition - of the rebuildendingRebuildPosition - of the rebuildlossOccurred - during rebuildpublic int initialWindowLength()
CongestionControlDriverConductor to initialise window length for a new PublicationImage.initialWindowLength in interface CongestionControlCopyright © 2014-2018 Real Logic Ltd. All Rights Reserved.