org.apache.mina.core.service
Class IoServiceStatistics

java.lang.Object
  extended by org.apache.mina.core.service.IoServiceStatistics

public class IoServiceStatistics
extends Object

Provides usage statistics for an AbstractIoService instance.

Since:
2.0.0-M3
Version:
$Rev$, $Date$
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
IoServiceStatistics(AbstractIoService service)
           
 
Method Summary
 void decreaseScheduledWriteMessages()
          TODO add documentation
 long getCumulativeManagedSessionCount()
          Returns the cumulative number of sessions which were managed (or are being managed) by this service, which means 'currently managed session count + closed session count'.
 int getLargestManagedSessionCount()
          Returns the maximum number of sessions which were being managed at the same time.
 double getLargestReadBytesThroughput()
          Returns the maximum of the readBytesThroughput.
 double getLargestReadMessagesThroughput()
          Returns the maximum of the readMessagesThroughput.
 double getLargestWrittenBytesThroughput()
          Returns the maximum of the writtenBytesThroughput.
 double getLargestWrittenMessagesThroughput()
          Returns the maximum of the writtenMessagesThroughput.
 long getLastIoTime()
          Returns the time in millis when I/O occurred lastly.
 long getLastReadTime()
          Returns the time in millis when read operation occurred lastly.
 long getLastWriteTime()
          Returns the time in millis when write operation occurred lastly.
 long getReadBytes()
          Returns the number of bytes read by this service
 double getReadBytesThroughput()
          Returns the number of read bytes per second.
 long getReadMessages()
          Returns the number of messages this services has read
 double getReadMessagesThroughput()
          Returns the number of read messages per second.
 int getScheduledWriteBytes()
          TODO add documentation
 int getScheduledWriteMessages()
          TODO add documentation
 int getThroughputCalculationInterval()
          Returns the interval (seconds) between each throughput calculation.
 long getThroughputCalculationIntervalInMillis()
          Returns the interval (milliseconds) between each throughput calculation.
 long getWrittenBytes()
          Returns the number of bytes written out by this service
 double getWrittenBytesThroughput()
          Returns the number of written bytes per second.
 long getWrittenMessages()
          Returns the number of messages this service has written
 double getWrittenMessagesThroughput()
          Returns the number of written messages per second.
 void increaseReadBytes(long increment, long currentTime)
          TODO add documentation
 void increaseReadMessages(long currentTime)
          TODO add documentation
 void increaseScheduledWriteBytes(int increment)
          TODO add documentation
 void increaseScheduledWriteMessages()
          TODO add documentation
 void increaseWrittenBytes(int increment, long currentTime)
          TODO add documentation
 void increaseWrittenMessages(long currentTime)
          TODO add documentation
protected  void setLastReadTime(long lastReadTime)
          TODO add documentation
protected  void setLastThroughputCalculationTime(long lastThroughputCalculationTime)
          TODO add documentation
protected  void setLastWriteTime(long lastWriteTime)
          TODO add documentation
 void setThroughputCalculationInterval(int throughputCalculationInterval)
          Sets the interval (seconds) between each throughput calculation.
 void updateThroughput(long currentTime)
          TODO add documentation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IoServiceStatistics

public IoServiceStatistics(AbstractIoService service)
Method Detail

getLargestManagedSessionCount

public final int getLargestManagedSessionCount()
Returns the maximum number of sessions which were being managed at the same time.


getCumulativeManagedSessionCount

public final long getCumulativeManagedSessionCount()
Returns the cumulative number of sessions which were managed (or are being managed) by this service, which means 'currently managed session count + closed session count'.


getLastIoTime

public final long getLastIoTime()
Returns the time in millis when I/O occurred lastly.


getLastReadTime

public final long getLastReadTime()
Returns the time in millis when read operation occurred lastly.


getLastWriteTime

public final long getLastWriteTime()
Returns the time in millis when write operation occurred lastly.


getReadBytes

public final long getReadBytes()
Returns the number of bytes read by this service

Returns:
The number of bytes this service has read

getWrittenBytes

public final long getWrittenBytes()
Returns the number of bytes written out by this service

Returns:
The number of bytes this service has written

getReadMessages

public final long getReadMessages()
Returns the number of messages this services has read

Returns:
The number of messages this services has read

getWrittenMessages

public final long getWrittenMessages()
Returns the number of messages this service has written

Returns:
The number of messages this service has written

getReadBytesThroughput

public final double getReadBytesThroughput()
Returns the number of read bytes per second.


getWrittenBytesThroughput

public final double getWrittenBytesThroughput()
Returns the number of written bytes per second.


getReadMessagesThroughput

public final double getReadMessagesThroughput()
Returns the number of read messages per second.


getWrittenMessagesThroughput

public final double getWrittenMessagesThroughput()
Returns the number of written messages per second.


getLargestReadBytesThroughput

public final double getLargestReadBytesThroughput()
Returns the maximum of the readBytesThroughput.


getLargestWrittenBytesThroughput

public final double getLargestWrittenBytesThroughput()
Returns the maximum of the writtenBytesThroughput.


getLargestReadMessagesThroughput

public final double getLargestReadMessagesThroughput()
Returns the maximum of the readMessagesThroughput.


getLargestWrittenMessagesThroughput

public final double getLargestWrittenMessagesThroughput()
Returns the maximum of the writtenMessagesThroughput.


getThroughputCalculationInterval

public final int getThroughputCalculationInterval()
Returns the interval (seconds) between each throughput calculation. The default value is 3 seconds.


getThroughputCalculationIntervalInMillis

public final long getThroughputCalculationIntervalInMillis()
Returns the interval (milliseconds) between each throughput calculation. The default value is 3 seconds.


setThroughputCalculationInterval

public final void setThroughputCalculationInterval(int throughputCalculationInterval)
Sets the interval (seconds) between each throughput calculation. The default value is 3 seconds.


setLastReadTime

protected final void setLastReadTime(long lastReadTime)
TODO add documentation


setLastWriteTime

protected final void setLastWriteTime(long lastWriteTime)
TODO add documentation


updateThroughput

public void updateThroughput(long currentTime)
TODO add documentation


increaseReadBytes

public final void increaseReadBytes(long increment,
                                    long currentTime)
TODO add documentation


increaseReadMessages

public final void increaseReadMessages(long currentTime)
TODO add documentation


increaseWrittenBytes

public final void increaseWrittenBytes(int increment,
                                       long currentTime)
TODO add documentation


increaseWrittenMessages

public final void increaseWrittenMessages(long currentTime)
TODO add documentation


getScheduledWriteBytes

public final int getScheduledWriteBytes()
TODO add documentation


increaseScheduledWriteBytes

public final void increaseScheduledWriteBytes(int increment)
TODO add documentation


getScheduledWriteMessages

public final int getScheduledWriteMessages()
TODO add documentation


increaseScheduledWriteMessages

public final void increaseScheduledWriteMessages()
TODO add documentation


decreaseScheduledWriteMessages

public final void decreaseScheduledWriteMessages()
TODO add documentation


setLastThroughputCalculationTime

protected void setLastThroughputCalculationTime(long lastThroughputCalculationTime)
TODO add documentation



Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.