public abstract class AbstractMinMulticastFlowControl extends Object implements FlowControl
Tracking of receivers is done as long as they continue to send Status Messages. Once SMs stop, the receiver tracking for that receiver will timeout after a given number of nanoseconds.
Constructor and Description |
---|
AbstractMinMulticastFlowControl(boolean isGroupTagAware) |
Modifier and Type | Method and Description |
---|---|
protected int |
groupMinSize() |
protected long |
groupTag() |
protected boolean |
hasGroupTag() |
boolean |
hasRequiredReceivers()
Has the flow control strategy its required group of receivers to be considered connected? The
result of this feeds into the determination of if a publication is connected.
|
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.
|
protected long |
processStatusMessage(StatusMessageFlyweight flyweight,
long senderLimit,
int initialTermId,
int positionBitsToShift,
long timeNs,
boolean matchesTag) |
protected long |
receiverTimeoutNs() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onStatusMessage
public AbstractMinMulticastFlowControl(boolean isGroupTagAware)
public void initialize(MediaDriver.Context context, UdpChannel udpChannel, int initialTermId, int termBufferLength)
initialize
in interface FlowControl
context
- 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 FlowControl
timeNs
- current time in nanoseconds.senderLimit
- for the current sender position.senderPosition
- which has been sent.isEos
- is this end-of-stream for the sender.protected final long processStatusMessage(StatusMessageFlyweight flyweight, long senderLimit, int initialTermId, int positionBitsToShift, long timeNs, boolean matchesTag)
public boolean hasRequiredReceivers()
FlowControl
hasRequiredReceivers
in interface FlowControl
protected final long receiverTimeoutNs()
protected final boolean hasGroupTag()
protected final long groupTag()
protected final int groupMinSize()
Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.