/** * TODO Add method documentation */ public final void increaseReadMessages(long currentTime) { readMessages++; lastReadTime = currentTime; idleCountForBoth.set(0); idleCountForRead.set(0); if (getService() instanceof AbstractIoService) { getService().getStatistics().increaseReadMessages(currentTime); } }
/** * TODO Add method documentation */ public final void increaseScheduledWriteBytes(int increment) { scheduledWriteBytes.addAndGet(increment); if (getService() instanceof AbstractIoService) { getService().getStatistics().increaseScheduledWriteBytes(increment); } }
/** * TODO Add method documentation */ private void decreaseScheduledWriteMessages() { scheduledWriteMessages.decrementAndGet(); if (getService() instanceof AbstractIoService) { getService().getStatistics().decreaseScheduledWriteMessages(); } }
/** * TODO Add method documentation */ public final void increaseScheduledWriteMessages() { scheduledWriteMessages.incrementAndGet(); if (getService() instanceof AbstractIoService) { getService().getStatistics().increaseScheduledWriteMessages(); } }
/** * TODO Add method documentation */ public final void increaseReadBytes(long increment, long currentTime) { if (increment <= 0) { return; } readBytes += increment; lastReadTime = currentTime; idleCountForBoth.set(0); idleCountForRead.set(0); if (getService() instanceof AbstractIoService) { getService().getStatistics().increaseReadBytes(increment, currentTime); } }
/** * TODO Add method documentation */ public final void increaseWrittenBytes(int increment, long currentTime) { if (increment <= 0) { return; } writtenBytes += increment; lastWriteTime = currentTime; idleCountForBoth.set(0); idleCountForWrite.set(0); if (getService() instanceof AbstractIoService) { getService().getStatistics().increaseWrittenBytes(increment, currentTime); } increaseScheduledWriteBytes(-increment); }
/** * {@inheritDoc} */ @Override public void serviceActivated(IoService service) { // Update lastIoTime. serviceStats = service.getStatistics(); serviceStats.setLastReadTime(service.getActivationTime()); serviceStats.setLastWriteTime(service.getActivationTime()); serviceStats.setLastThroughputCalculationTime(service.getActivationTime()); }
/** * {@inheritDoc} */ @Override public void serviceActivated(IoService service) { // Update lastIoTime. serviceStats = service.getStatistics(); serviceStats.setLastReadTime(service.getActivationTime()); serviceStats.setLastWriteTime(service.getActivationTime()); serviceStats.setLastThroughputCalculationTime(service.getActivationTime()); }
/** * TODO Add method documentation */ public final void increaseWrittenMessages( WriteRequest request, long currentTime) { Object message = request.getMessage(); if (message instanceof IoBuffer) { IoBuffer b = (IoBuffer) message; if (b.hasRemaining()) { return; } } writtenMessages++; lastWriteTime = currentTime; if (getService() instanceof AbstractIoService) { getService().getStatistics().increaseWrittenMessages(currentTime); } decreaseScheduledWriteMessages(); }