Package host.anzo.simon
Class RegistryStatistics
java.lang.Object
host.anzo.simon.RegistryStatistics
- All Implemented Interfaces:
SimonRegistryStatistics,SimonRemoteStatistics
A simple implementation of
SimonRegistryStatistics-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRegistryStatistics(org.apache.mina.core.service.IoServiceStatistics ioServiceStatistics) -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the cumulative number of sessions which were managed (or are being managed) by this service, which means 'currently managed session count + closed session count'.intReturns the maximum number of sessions which were being managed at the same time.doubleReturns the maximum of thereadBytesThroughput.doubleReturns the maximum of thereadMessagesThroughput.doubleReturns the maximum of thewrittenBytesThroughput.doubleReturns the maximum of thewrittenMessagesThroughput.longReturns the time in milliseconds when I/O occurred lastly.longReturns the time in milliseconds when read operation occurred lastly.longReturns the time in milliseconds when write operation occurred lastly.longReturns the number of bytes read by this servicedoubleReturns the number of read bytes per second.longReturns the number of messages this services has readdoubleReturns the number of read messages per second.longReturns the number of bytes that are scheduled for sendinglongReturns the number of messages that are scheduled for sendingintReturns the interval (seconds) between each throughput calculation.longReturns the interval (milliseconds) between each throughput calculation.longReturns the number of bytes written out by this servicedoubleReturns the number of written bytes per second.longReturns the number of messages this service has writtendoubleReturns the number of written messages per second.voidsetThroughputCalculationInterval(int throughputCalculationInterval) Sets the interval (seconds) between each throughput calculation.
-
Constructor Details
-
RegistryStatistics
protected RegistryStatistics(org.apache.mina.core.service.IoServiceStatistics ioServiceStatistics)
-
-
Method Details
-
getLargestManagedSessionCount
public int getLargestManagedSessionCount()Description copied from interface:SimonRegistryStatisticsReturns the maximum number of sessions which were being managed at the same time.- Specified by:
getLargestManagedSessionCountin interfaceSimonRegistryStatistics
-
getCumulativeManagedSessionCount
public long getCumulativeManagedSessionCount()Description copied from interface:SimonRegistryStatisticsReturns 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:
getCumulativeManagedSessionCountin interfaceSimonRegistryStatistics
-
getLastIoTime
public long getLastIoTime()Description copied from interface:SimonRemoteStatisticsReturns the time in milliseconds when I/O occurred lastly.- Specified by:
getLastIoTimein interfaceSimonRemoteStatistics
-
getLastReadTime
public long getLastReadTime()Description copied from interface:SimonRemoteStatisticsReturns the time in milliseconds when read operation occurred lastly.- Specified by:
getLastReadTimein interfaceSimonRemoteStatistics
-
getLastWriteTime
public long getLastWriteTime()Description copied from interface:SimonRemoteStatisticsReturns the time in milliseconds when write operation occurred lastly.- Specified by:
getLastWriteTimein interfaceSimonRemoteStatistics
-
getReadBytes
public long getReadBytes()Description copied from interface:SimonRemoteStatisticsReturns the number of bytes read by this service- Specified by:
getReadBytesin interfaceSimonRemoteStatistics- Returns:
- The number of bytes this service has read
-
getWrittenBytes
public long getWrittenBytes()Description copied from interface:SimonRemoteStatisticsReturns the number of bytes written out by this service- Specified by:
getWrittenBytesin interfaceSimonRemoteStatistics- Returns:
- The number of bytes this service has written
-
getReadMessages
public long getReadMessages()Description copied from interface:SimonRemoteStatisticsReturns the number of messages this services has read- Specified by:
getReadMessagesin interfaceSimonRemoteStatistics- Returns:
- The number of messages this services has read
-
getWrittenMessages
public long getWrittenMessages()Description copied from interface:SimonRemoteStatisticsReturns the number of messages this service has written- Specified by:
getWrittenMessagesin interfaceSimonRemoteStatistics- Returns:
- The number of messages this service has written
-
getReadBytesThroughput
public double getReadBytesThroughput()Description copied from interface:SimonRemoteStatisticsReturns the number of read bytes per second.- Specified by:
getReadBytesThroughputin interfaceSimonRemoteStatistics
-
getWrittenBytesThroughput
public double getWrittenBytesThroughput()Description copied from interface:SimonRemoteStatisticsReturns the number of written bytes per second.- Specified by:
getWrittenBytesThroughputin interfaceSimonRemoteStatistics
-
getReadMessagesThroughput
public double getReadMessagesThroughput()Description copied from interface:SimonRemoteStatisticsReturns the number of read messages per second.- Specified by:
getReadMessagesThroughputin interfaceSimonRemoteStatistics
-
getWrittenMessagesThroughput
public double getWrittenMessagesThroughput()Description copied from interface:SimonRemoteStatisticsReturns the number of written messages per second.- Specified by:
getWrittenMessagesThroughputin interfaceSimonRemoteStatistics
-
getLargestReadBytesThroughput
public double getLargestReadBytesThroughput()Description copied from interface:SimonRegistryStatisticsReturns the maximum of thereadBytesThroughput.- Specified by:
getLargestReadBytesThroughputin interfaceSimonRegistryStatistics
-
getLargestWrittenBytesThroughput
public double getLargestWrittenBytesThroughput()Description copied from interface:SimonRegistryStatisticsReturns the maximum of thewrittenBytesThroughput.- Specified by:
getLargestWrittenBytesThroughputin interfaceSimonRegistryStatistics
-
getLargestReadMessagesThroughput
public double getLargestReadMessagesThroughput()Description copied from interface:SimonRegistryStatisticsReturns the maximum of thereadMessagesThroughput.- Specified by:
getLargestReadMessagesThroughputin interfaceSimonRegistryStatistics
-
getLargestWrittenMessagesThroughput
public double getLargestWrittenMessagesThroughput()Description copied from interface:SimonRegistryStatisticsReturns the maximum of thewrittenMessagesThroughput.- Specified by:
getLargestWrittenMessagesThroughputin interfaceSimonRegistryStatistics
-
getThroughputCalculationInterval
public int getThroughputCalculationInterval()Returns the interval (seconds) between each throughput calculation. The default value is3seconds. -
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:SimonRemoteStatisticsReturns the number of bytes that are scheduled for sending- Specified by:
getScheduledWriteBytesin interfaceSimonRemoteStatistics- Returns:
- number of bytes scheduled
-
getScheduledWriteMessages
public long getScheduledWriteMessages()Description copied from interface:SimonRemoteStatisticsReturns the number of messages that are scheduled for sending- Specified by:
getScheduledWriteMessagesin interfaceSimonRemoteStatistics- Returns:
- number of messages scheduled
-