public class UnicastFlowControl extends Object implements FlowControl
Max of right edges. No tracking of receivers.
| Modifier and Type | Field and Description |
|---|---|
static UnicastFlowControl |
INSTANCE
Singleton instance which can be used to avoid allocation.
|
| Constructor and Description |
|---|
UnicastFlowControl() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(MediaDriver.Context context,
UdpChannel udpChannel,
int initialTermId,
int termBufferLength)
Initialize the flow control strategy for a stream.
|
long |
onIdle(long timeNs,
long senderLimit,
long senderPosition,
boolean isEos)
Perform any maintenance needed by the flow control strategy and return current sender limit position.
|
long |
onStatusMessage(StatusMessageFlyweight flyweight,
InetSocketAddress receiverAddress,
long senderLimit,
int initialTermId,
int positionBitsToShift,
long timeNs)
Update the sender flow control strategy based on a status message from the receiver.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasRequiredReceiverspublic static final UnicastFlowControl INSTANCE
public long onStatusMessage(StatusMessageFlyweight flyweight, InetSocketAddress receiverAddress, long senderLimit, int initialTermId, int positionBitsToShift, long timeNs)
onStatusMessage in interface FlowControlflyweight - over the status message received.receiverAddress - of the receiver.senderLimit - the current sender position limit.initialTermId - for the term buffers.positionBitsToShift - in use for the length of each term buffer.timeNs - current time (in nanoseconds).public void initialize(MediaDriver.Context context, UdpChannel udpChannel, int initialTermId, int termBufferLength)
initialize in interface FlowControlcontext - to allow access to media driver configurationudpChannel - for the stream.initialTermId - at which the stream started.termBufferLength - to use as the length of each term buffer.public long onIdle(long timeNs,
long senderLimit,
long senderPosition,
boolean isEos)
onIdle in interface FlowControltimeNs - current time in nanoseconds.senderLimit - for the current sender position.senderPosition - which has been sent.isEos - is this end-of-stream for the sender.Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.