aeron-driver/src/main/java/io/aeron/driver/MinMulticastFlowControl.java
public long onIdle(final long timeNs, final long senderLimit, final long senderPosition, final boolean isEos)
    {
        long minPosition = Long.MAX_VALUE;
        long minLimitPosition = Long.MAX_VALUE;
        final ArrayList<Receiver> receiverList = this.receiverList;

        for (int lastIndex = receiverList.size() - 1, i = lastIndex; i >= 0; i--)
        {
            final Receiver receiver = receiverList.get(i);
            if ((receiver.timeOfLastStatusMessageNs + RECEIVER_TIMEOUT) - timeNs < 0)
            {
                ArrayListUtil.fastUnorderedRemove(receiverList, i, lastIndex--);
            }
            else
            {
                minPosition = Math.min(minPosition, receiver.lastPosition);
                minLimitPosition = Math.min(minLimitPosition, receiver.lastPositionPlusWindow);
            }
        }

        if (isEos && shouldLinger)
        {
            if (0 == receiverList.size() || minPosition >= senderPosition)
            {
                shouldLinger = false;
            }
        }

        return receiverList.size() > 0 ? minLimitPosition : senderLimit;
    }
public long onIdle(final long timeNs, final long senderLimit, final long senderPosition, final boolean isEos)
    {
        long minPosition = Long.MAX_VALUE;
        long minLimitPosition = Long.MAX_VALUE;
        final ArrayList<Receiver> receiverList = this.receiverList;

        for (int lastIndex = receiverList.size() - 1, i = lastIndex; i >= 0; i--)
        {
            final Receiver receiver = receiverList.get(i);
            if ((receiver.timeOfLastStatusMessageNs + RECEIVER_TIMEOUT) - timeNs < 0)
            {
                ArrayListUtil.fastUnorderedRemove(receiverList, i, lastIndex--);
            }
            else
            {
                minPosition = Math.min(minPosition, receiver.lastPosition);
                minLimitPosition = Math.min(minLimitPosition, receiver.lastPositionPlusWindow);
            }
        }

        if (isEos && shouldLinger)
        {
            if (0 == receiverList.size() || minPosition >= senderPosition)
            {
                shouldLinger = false;
            }
        }

        return receiverList.size() > 0 ? minLimitPosition : senderLimit;
    }
public long onIdle ( final long timeNs , final long senderLimit , final long senderPosition , final boolean isEos ) { long minPosition = Long . MAX_VALUE ; long minLimitPosition = Long . MAX_VALUE ; final ArrayList < Receiver > receiverList = this . receiverList ; for ( int lastIndex = receiverList . size ( ) - 1 , i = lastIndex ; i >= 0 ; i -- ) { final Receiver receiver = receiverList . get ( i ) ; if ( ( receiver . timeOfLastStatusMessageNs + RECEIVER_TIMEOUT ) - timeNs < 0 ) { ArrayListUtil . fastUnorderedRemove ( receiverList , i , lastIndex -- ) ; } else { minPosition = Math . min ( minPosition , receiver . lastPosition ) ; minLimitPosition = Math . min ( minLimitPosition , receiver . lastPositionPlusWindow ) ; } } if ( isEos && shouldLinger ) { if ( 0 == receiverList . size ( ) || minPosition >= senderPosition ) { shouldLinger = false ; } } return receiverList . size ( ) > 0 ? minLimitPosition : senderLimit ; }
{@inheritDoc}
{