de.root1.simon
Class RegistryStatistics

java.lang.Object
  extended by de.root1.simon.RegistryStatistics
All Implemented Interfaces:
SimonRegistryStatistics, SimonRemoteStatistics

public class RegistryStatistics
extends java.lang.Object
implements SimonRegistryStatistics

A simple implementation of SimonRegistryStatistics

Author:
alexanderchristian

Constructor Summary
protected RegistryStatistics(org.apache.mina.core.service.IoServiceStatistics ioServiceStatistics)
           
 
Method Summary
 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 milliseconds when I/O occurred lastly.
 long getLastReadTime()
          Returns the time in milliseconds when read operation occurred lastly.
 long getLastWriteTime()
          Returns the time in milliseconds 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.
 long getScheduledWriteBytes()
          Returns the number of bytes that are scheduled for sending
 long getScheduledWriteMessages()
          Returns the number of messages that are scheduled for sending
 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 setThroughputCalculationInterval(int throughputCalculationInterval)
          Sets the interval (seconds) between each throughput calculation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryStatistics

protected RegistryStatistics(org.apache.mina.core.service.IoServiceStatistics ioServiceStatistics)
Method Detail

getLargestManagedSessionCount

public int getLargestManagedSessionCount()
Description copied from interface: SimonRegistryStatistics
Returns the maximum number of sessions which were being managed at the same time.

Specified by:
getLargestManagedSessionCount in interface SimonRegistryStatistics

getCumulativeManagedSessionCount

public long getCumulativeManagedSessionCount()
Description copied from interface: SimonRegistryStatistics
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'.

Specified by:
getCumulativeManagedSessionCount in interface SimonRegistryStatistics

getLastIoTime

public long getLastIoTime()
Description copied from interface: SimonRemoteStatistics
Returns the time in milliseconds when I/O occurred lastly.

Specified by:
getLastIoTime in interface SimonRemoteStatistics

getLastReadTime

public long getLastReadTime()
Description copied from interface: SimonRemoteStatistics
Returns the time in milliseconds when read operation occurred lastly.

Specified by:
getLastReadTime in interface SimonRemoteStatistics

getLastWriteTime

public long getLastWriteTime()
Description copied from interface: SimonRemoteStatistics
Returns the time in milliseconds when write operation occurred lastly.

Specified by:
getLastWriteTime in interface SimonRemoteStatistics

getReadBytes

public long getReadBytes()
Description copied from interface: SimonRemoteStatistics
Returns the number of bytes read by this service

Specified by:
getReadBytes in interface SimonRemoteStatistics
Returns:
The number of bytes this service has read

getWrittenBytes

public long getWrittenBytes()
Description copied from interface: SimonRemoteStatistics
Returns the number of bytes written out by this service

Specified by:
getWrittenBytes in interface SimonRemoteStatistics
Returns:
The number of bytes this service has written

getReadMessages

public long getReadMessages()
Description copied from interface: SimonRemoteStatistics
Returns the number of messages this services has read

Specified by:
getReadMessages in interface SimonRemoteStatistics
Returns:
The number of messages this services has read

getWrittenMessages

public long getWrittenMessages()
Description copied from interface: SimonRemoteStatistics
Returns the number of messages this service has written

Specified by:
getWrittenMessages in interface SimonRemoteStatistics
Returns:
The number of messages this service has written

getReadBytesThroughput

public double getReadBytesThroughput()
Description copied from interface: SimonRemoteStatistics
Returns the number of read bytes per second.

Specified by:
getReadBytesThroughput in interface SimonRemoteStatistics

getWrittenBytesThroughput

public double getWrittenBytesThroughput()
Description copied from interface: SimonRemoteStatistics
Returns the number of written bytes per second.

Specified by:
getWrittenBytesThroughput in interface SimonRemoteStatistics

getReadMessagesThroughput

public double getReadMessagesThroughput()
Description copied from interface: SimonRemoteStatistics
Returns the number of read messages per second.

Specified by:
getReadMessagesThroughput in interface SimonRemoteStatistics

getWrittenMessagesThroughput

public double getWrittenMessagesThroughput()
Description copied from interface: SimonRemoteStatistics
Returns the number of written messages per second.

Specified by:
getWrittenMessagesThroughput in interface SimonRemoteStatistics

getLargestReadBytesThroughput

public double getLargestReadBytesThroughput()
Description copied from interface: SimonRegistryStatistics
Returns the maximum of the readBytesThroughput.

Specified by:
getLargestReadBytesThroughput in interface SimonRegistryStatistics

getLargestWrittenBytesThroughput

public double getLargestWrittenBytesThroughput()
Description copied from interface: SimonRegistryStatistics
Returns the maximum of the writtenBytesThroughput.

Specified by:
getLargestWrittenBytesThroughput in interface SimonRegistryStatistics

getLargestReadMessagesThroughput

public double getLargestReadMessagesThroughput()
Description copied from interface: SimonRegistryStatistics
Returns the maximum of the readMessagesThroughput.

Specified by:
getLargestReadMessagesThroughput in interface SimonRegistryStatistics

getLargestWrittenMessagesThroughput

public double getLargestWrittenMessagesThroughput()
Description copied from interface: SimonRegistryStatistics
Returns the maximum of the writtenMessagesThroughput.

Specified by:
getLargestWrittenMessagesThroughput in interface SimonRegistryStatistics

getThroughputCalculationInterval

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


getThroughputCalculationIntervalInMillis

public long getThroughputCalculationIntervalInMillis()
Returns the interval (milliseconds) between each throughput calculation.


setThroughputCalculationInterval

public void setThroughputCalculationInterval(int throughputCalculationInterval)
Sets the interval (seconds) between each throughput calculation.


getScheduledWriteBytes

public long getScheduledWriteBytes()
Description copied from interface: SimonRemoteStatistics
Returns the number of bytes that are scheduled for sending

Specified by:
getScheduledWriteBytes in interface SimonRemoteStatistics
Returns:
number of bytes scheduled

getScheduledWriteMessages

public long getScheduledWriteMessages()
Description copied from interface: SimonRemoteStatistics
Returns the number of messages that are scheduled for sending

Specified by:
getScheduledWriteMessages in interface SimonRemoteStatistics
Returns:
number of messages scheduled


Copyright © 2011. All Rights Reserved.