public class StaticWindowCongestionControl extends Object implements CongestionControl
MediaDriver.Context.initialWindowLength()
or half a term
length as a static window.Modifier and Type | Field and Description |
---|---|
static String |
CC_PARAM_VALUE
URI param value to identify this
CongestionControl strategy. |
FORCE_STATUS_MESSAGE_BIT
Constructor and Description |
---|
StaticWindowCongestionControl(long registrationId,
UdpChannel udpChannel,
int streamId,
int sessionId,
int termLength,
int senderMtuLength,
InetSocketAddress controlAddress,
InetSocketAddress sourceAddress,
NanoClock clock,
MediaDriver.Context context,
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,
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
packOutcome, receiverWindowLength, shouldForceStatusMessage, threshold
public static final String CC_PARAM_VALUE
CongestionControl
strategy.public StaticWindowCongestionControl(long registrationId, UdpChannel udpChannel, int streamId, int sessionId, int termLength, int senderMtuLength, InetSocketAddress controlAddress, InetSocketAddress sourceAddress, NanoClock clock, MediaDriver.Context context, CountersManager countersManager)
public void close()
close
in interface CongestionControl
close
in interface AutoCloseable
public boolean shouldMeasureRtt(long nowNs)
CongestionControl
Receiver
to determine when to initiate an RTT measurement to a Sender.shouldMeasureRtt
in interface CongestionControl
nowNs
- in nanosecondspublic void onRttMeasurementSent(long nowNs)
CongestionControl
Receiver
to record that a measurement request has been sent.onRttMeasurementSent
in interface CongestionControl
nowNs
- in nanoseconds.public void onRttMeasurement(long nowNs, long rttNs, InetSocketAddress srcAddress)
CongestionControl
Receiver
on reception of an RTT Measurement.onRttMeasurement
in interface CongestionControl
nowNs
- 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)
CongestionControl
DriverConductor
upon execution of PublicationImage.trackRebuild(long, long)
to
pass on current status.
The return value must be packed using CongestionControl.packOutcome(int, boolean)
.
onTrackRebuild
in interface CongestionControl
nowNs
- current timenewConsumptionPosition
- of the subscriberslastSmPosition
- of the imagehwmPosition
- of the imagestartingRebuildPosition
- of the rebuildendingRebuildPosition
- of the rebuildlossOccurred
- during rebuildpublic int initialWindowLength()
CongestionControl
DriverConductor
to initialise window length for a new PublicationImage
.initialWindowLength
in interface CongestionControl
Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.