Package org.serviceconnector.util
Class Statistics
java.lang.Object
org.serviceconnector.util.Statistics
The Class Statistics.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDecrement messages in cache.static StatisticsGets the single instance of Statistics.intGets the messages in cache.longGets the runtime since startup millis.Gets the startup date time.doubleGets the total bytes.doubleGets the total messages.voidIncrement messages in cache.voidincrementTotalMessages(long msgLength) Increment total messages.voidsetStartupDateTime(Timestamp startupDateTime) Sets the startup date time.
-
Method Details
-
getInstance
Gets the single instance of Statistics.- Returns:
- single instance of Statistics
-
incrementMessagesInCache
public void incrementMessagesInCache()Increment messages in cache. -
decrementMessagesInCache
public void decrementMessagesInCache()Decrement messages in cache. -
incrementTotalMessages
public void incrementTotalMessages(long msgLength) Increment total messages.- Parameters:
msgLength- the msg length
-
getTotalMessages
public double getTotalMessages()Gets the total messages.- Returns:
- the total messages
-
getTotalBytes
public double getTotalBytes()Gets the total bytes.- Returns:
- the total bytes
-
getStartupDateTime
Gets the startup date time.- Returns:
- the startup date time
-
getRuntimeSinceStartupSeconds
public long getRuntimeSinceStartupSeconds()Gets the runtime since startup millis.- Returns:
- the runtime since startup millis
-
setStartupDateTime
Sets the startup date time.- Parameters:
startupDateTime- the new startup date time
-
getMessagesInCache
public int getMessagesInCache()Gets the messages in cache.- Returns:
- the messages in cache
-