private boolean isFlowControlUnderRun(final long packetPosition) { final boolean isFlowControlUnderRun = packetPosition < lastSmPosition; if (isFlowControlUnderRun) { flowControlUnderRuns.incrementOrdered(); } return isFlowControlUnderRun; }
private boolean isFlowControlOverRun(final long proposedPosition) { final boolean isFlowControlOverRun = proposedPosition > lastSmWindowLimit; if (isFlowControlOverRun) { flowControlOverRuns.incrementOrdered(); } return isFlowControlOverRun; }
public void possibleTtlAsymmetryEncountered() { possibleTtlAsymmetry.incrementOrdered(); }
private void offer(final Runnable cmd) { while (!commandQueue.offer(cmd)) { failCount.incrementOrdered(); Thread.yield(); } } }
private void offer(final Runnable cmd) { while (!commandQueue.offer(cmd)) { failCount.incrementOrdered(); Thread.yield(); } } }
public void onTimeEvent(final long timeNs, final long timeMs, final DriverConductor conductor) { if (timeMs > (timeOfLastKeepaliveMs + clientLivenessTimeoutMs)) { reachedEndOfLife = true; clientTimeouts.incrementOrdered(); conductor.clientTimeout(clientId); } }
private void checkForBlockedPublisher(final long producerPosition, final long senderPosition, final long nowNs) { if (senderPosition == lastSenderPosition && isPossiblyBlocked(producerPosition, senderPosition)) { if ((timeOfLastActivityNs + unblockTimeoutNs) - nowNs < 0) { if (LogBufferUnblocker.unblock(termBuffers, metaDataBuffer, senderPosition, termBufferLength)) { unblockedPublications.incrementOrdered(); } } } else { timeOfLastActivityNs = nowNs; lastSenderPosition = senderPosition; } }
private void checkForBlockedPublisher(final long producerPosition, final long timeNs) { final long consumerPosition = this.consumerPosition; if (consumerPosition == lastConsumerPosition && isPossiblyBlocked(producerPosition, consumerPosition)) { if ((timeOfLastConsumerPositionUpdateNs + unblockTimeoutNs) - timeNs < 0) { if (LogBufferUnblocker.unblock(termBuffers, metaDataBuffer, consumerPosition, termBufferLength)) { unblockedPublications.incrementOrdered(); } } } else { timeOfLastConsumerPositionUpdateNs = timeNs; lastConsumerPosition = consumerPosition; } }
nakMessagesSent.incrementOrdered(); if (tryFillGap(rawLog.metaData(), termBuffer, termId, termOffset, length)) lossGapFills.incrementOrdered();
imageConnections, sessionId, streamId, termId, termOffset, receiverWindowLength, (byte)0); statusMessagesSent.incrementOrdered();
private <T extends DriverManagedResource> void checkManagedResources( final ArrayList<T> list, final long nowNs, final long nowMs) { for (int lastIndex = list.size() - 1, i = lastIndex; i >= 0; i--) { final DriverManagedResource resource = list.get(i); resource.onTimeEvent(nowNs, nowMs, this); if (resource.hasReachedEndOfLife()) { if (resource.free()) { fastUnorderedRemove(list, i, lastIndex--); resource.close(); } else { ctx.systemCounters().get(FREE_FAILS).incrementOrdered(); } } } }
senderFlowControlLimits.incrementOrdered();
retransmitsSent.incrementOrdered();
private void checkForBlockedToDriverCommands(final long nowNs) { final long consumerPosition = toDriverCommands.consumerPosition(); if (consumerPosition == lastConsumerCommandPosition) { if (toDriverCommands.producerPosition() > consumerPosition && ((timeOfLastToDriverPositionChangeNs + clientLivenessTimeoutNs) - nowNs < 0)) { if (toDriverCommands.unblock()) { ctx.systemCounters().get(UNBLOCKED_COMMANDS).incrementOrdered(); } } } else { timeOfLastToDriverPositionChangeNs = nowNs; lastConsumerCommandPosition = consumerPosition; } }
statusMessagesReceived.incrementOrdered(); statusMessagesReceived.incrementOrdered();
private int heartbeatMessageCheck( final long nowNs, final int activeTermId, final int termOffset, final boolean isEndOfStream) { int bytesSent = 0; if ((timeOfLastSendOrHeartbeatNs + PUBLICATION_HEARTBEAT_TIMEOUT_NS) - nowNs < 0) { heartbeatBuffer.clear(); heartbeatDataHeader .sessionId(sessionId) .streamId(streamId) .termId(activeTermId) .termOffset(termOffset) .flags((byte)(isEndOfStream ? BEGIN_END_AND_EOS_FLAGS : BEGIN_AND_END_FLAGS)); bytesSent = channelEndpoint.send(heartbeatBuffer); if (DataHeaderFlyweight.HEADER_LENGTH != bytesSent) { shortSends.increment(); } timeOfLastSendOrHeartbeatNs = nowNs; heartbeatsSent.incrementOrdered(); } return bytesSent; }
public void onNakMessage( final NakFlyweight msg, final UnsafeBuffer buffer, final int length, final InetSocketAddress srcAddress) { final NetworkPublication publication = publicationBySessionAndStreamId.get(msg.sessionId(), msg.streamId()); if (null != publication) { publication.onNak(msg.termId(), msg.termOffset(), msg.length()); nakMessagesReceived.incrementOrdered(); } }
unblockedPublications.incrementOrdered();
verify(mockStatusMessagesReceivedCounter, times(1)).incrementOrdered();
heartbeatsReceived.incrementOrdered();