this.rebuildPosition.proposeMaxOrdered(newRebuildPosition); final long ccOutcome = congestionControl.onTrackRebuild( nowNs, minSubscriberPosition,
/** * {@inheritDoc} */ public void close() { hwmPosition.close(); rebuildPosition.close(); for (final ReadablePosition position : subscriberPositions) { position.close(); } congestionControl.close(); rawLog.close(); }
/** * Called from the {@link Receiver} upon receiving an RTT Measurement that is a reply. * * @param header of the measurement message. * @param transportIndex that the RTT Measurement came in on. * @param srcAddress from the sender requesting the measurement */ void onRttMeasurement( final RttMeasurementFlyweight header, @SuppressWarnings("unused") final int transportIndex, final InetSocketAddress srcAddress) { final long nowNs = nanoClock.nanoTime(); final long rttInNs = nowNs - header.echoTimestampNs() - header.receptionDelta(); congestionControl.onRttMeasurement(nowNs, rttInNs, srcAddress); }
/** * Called from the {@link Receiver} thread to check for initiating an RTT measurement. * * @param nowNs in nanoseconds * @return number of work items processed. */ int initiateAnyRttMeasurements(final long nowNs) { int workCount = 0; if (congestionControl.shouldMeasureRtt(nowNs)) { final long preciseTimeNs = nanoClock.nanoTime(); channelEndpoint.sendRttMeasurement(imageConnections, sessionId, streamId, preciseTimeNs, 0, true); congestionControl.onRttMeasurementSent(preciseTimeNs); workCount = 1; } return workCount; }
.thenReturn(computePosition(ACTIVE_TERM_ID, 0, POSITION_BITS_TO_SHIFT, ACTIVE_TERM_ID)); when(mockSystemCounters.get(any())).thenReturn(mock(AtomicCounter.class)); when(congestionControl.onTrackRebuild( anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyLong(), anyBoolean())) .thenReturn(CongestionControlUtil.packOutcome(INITIAL_WINDOW_LENGTH, false)); when(congestionControl.initialWindowLength()).thenReturn(INITIAL_WINDOW_LENGTH);
nextSmReceiverWindowLength = congestionControl.initialWindowLength(); lastSmPosition = position; lastSmWindowLimit = position + nextSmReceiverWindowLength;
/** * Called from the {@link Receiver} thread to check for initiating an RTT measurement. * * @param nowNs in nanoseconds * @return number of work items processed. */ int initiateAnyRttMeasurements(final long nowNs) { int workCount = 0; if (congestionControl.shouldMeasureRtt(nowNs)) { final long preciseTimeNs = nanoClock.nanoTime(); channelEndpoint.sendRttMeasurement(imageConnections, sessionId, streamId, preciseTimeNs, 0, true); congestionControl.onRttMeasurementSent(preciseTimeNs); workCount = 1; } return workCount; }
nextSmReceiverWindowLength = congestionControl.initialWindowLength(); lastSmPosition = position; lastSmWindowLimit = position + nextSmReceiverWindowLength;
/** * Called from the {@link Receiver} thread to check for initiating an RTT measurement. * * @param nowNs in nanoseconds * @return number of work items processed. */ int initiateAnyRttMeasurements(final long nowNs) { int workCount = 0; if (congestionControl.shouldMeasureRtt(nowNs)) { final long preciseTimeNs = nanoClock.nanoTime(); channelEndpoint.sendRttMeasurement(imageConnections, sessionId, streamId, preciseTimeNs, 0, true); congestionControl.onRttMeasurementSent(preciseTimeNs); workCount = 1; } return workCount; }
this.rebuildPosition.proposeMaxOrdered(newRebuildPosition); final long ccOutcome = congestionControl.onTrackRebuild( nowNs, minSubscriberPosition,
nextSmReceiverWindowLength = congestionControl.initialWindowLength(); lastSmPosition = position; lastSmWindowLimit = position + nextSmReceiverWindowLength;
/** * {@inheritDoc} */ public void close() { hwmPosition.close(); rebuildPosition.close(); for (final ReadablePosition position : subscriberPositions) { position.close(); } congestionControl.close(); rawLog.close(); }
/** * Called from the {@link Receiver} upon receiving an RTT Measurement that is a reply. * * @param header of the measurement message. * @param transportIndex that the RTT Measurement came in on. * @param srcAddress from the sender requesting the measurement */ void onRttMeasurement( final RttMeasurementFlyweight header, @SuppressWarnings("unused") final int transportIndex, final InetSocketAddress srcAddress) { final long nowNs = nanoClock.nanoTime(); final long rttInNs = nowNs - header.echoTimestampNs() - header.receptionDelta(); congestionControl.onRttMeasurement(nowNs, rttInNs, srcAddress); }
this.rebuildPosition.proposeMaxOrdered(newRebuildPosition); final long ccOutcome = congestionControl.onTrackRebuild( nowNs, minSubscriberPosition,
/** * {@inheritDoc} */ public void close() { hwmPosition.close(); rebuildPosition.close(); for (final ReadablePosition position : subscriberPositions) { position.close(); } congestionControl.close(); rawLog.close(); }
/** * Called from the {@link Receiver} upon receiving an RTT Measurement that is a reply. * * @param header of the measurement message. * @param transportIndex that the RTT Measurement came in on. * @param srcAddress from the sender requesting the measurement */ void onRttMeasurement( final RttMeasurementFlyweight header, @SuppressWarnings("unused") final int transportIndex, final InetSocketAddress srcAddress) { final long nowNs = nanoClock.nanoTime(); final long rttInNs = nowNs - header.echoTimestampNs() - header.receptionDelta(); congestionControl.onRttMeasurement(nowNs, rttInNs, srcAddress); }