infoservice
Class StatusStatisticsEntry

java.lang.Object
  extended by infoservice.StatusStatisticsEntry

public class StatusStatisticsEntry
extends java.lang.Object

Holds the status statistics of a mixcascade.


Field Summary
private  int m_maxNrOfActiveUsers
          This is the maximum number of active users in the current statistics period.
private  int m_minNrOfActiveUsers
          This is the minimum number of active users in the current statistics period.
private  java.lang.String m_mixCascadeId
          This is the ID of the mixcascade to which this status statistics belongs.
private  long m_mixedPackets
          This is the number of mixed packets.
private  int m_nrOfActiveUsersSum
          This is the sum of active users in the current statistics period.
private  long m_timeInLastStatisticsMessage
          This is the creation time of the last received statistics message -> only newer messages are accepted for updating the statistics.
private  int m_userStatisticsUpdates
          This is the number of updates of the statistics in this statistics period.
 
Constructor Summary
StatusStatisticsEntry(StatusInfo a_currentStatus)
          This creates a new StatusStatisticsDBEntry.
 
Method Summary
 java.lang.String getFileName()
          Returns the filename of the corresponding log-file.
 java.lang.String getId()
          Returns a unique ID for this StatusStatisticsDBEntry.
 java.lang.String getLogString()
          Returns a String with all information needed for the write out of the statistics.
 void updateStatistics(StatusInfo a_currentStatus)
          This updates the statistics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_mixCascadeId

private java.lang.String m_mixCascadeId
This is the ID of the mixcascade to which this status statistics belongs.


m_minNrOfActiveUsers

private int m_minNrOfActiveUsers
This is the minimum number of active users in the current statistics period.


m_maxNrOfActiveUsers

private int m_maxNrOfActiveUsers
This is the maximum number of active users in the current statistics period.


m_nrOfActiveUsersSum

private int m_nrOfActiveUsersSum
This is the sum of active users in the current statistics period.


m_mixedPackets

private long m_mixedPackets
This is the number of mixed packets.


m_userStatisticsUpdates

private int m_userStatisticsUpdates
This is the number of updates of the statistics in this statistics period. We need it for calculting the average number of users. So we count only updates, where the number of active users is not -1.


m_timeInLastStatisticsMessage

private long m_timeInLastStatisticsMessage
This is the creation time of the last received statistics message -> only newer messages are accepted for updating the statistics.

Constructor Detail

StatusStatisticsEntry

public StatusStatisticsEntry(StatusInfo a_currentStatus)
This creates a new StatusStatisticsDBEntry. The values of the first status are added to the statistics immediately.

Parameters:
a_currentStatus - The first status for the statistics.
Method Detail

updateStatistics

public void updateStatistics(StatusInfo a_currentStatus)
This updates the statistics. The update is only be done, if the status message is a really new one, which we don't know already.

Parameters:
a_currentStatus - A new status which is added to the statistics.

getId

public java.lang.String getId()
Returns a unique ID for this StatusStatisticsDBEntry. It's the same as the ID of the corresponding mixcascade.

Returns:
The ID of this StatusStatisticsDBEntry.

getLogString

public java.lang.String getLogString()
Returns a String with all information needed for the write out of the statistics.

Returns:
A String for the statistics log.

getFileName

public java.lang.String getFileName()
Returns the filename of the corresponding log-file. The name is logStatusMIXCASCADEID.log. MIXCASCADEID is replaced by the ID of the mixcascade this statistics belongs to. If there are characters in MIXCASCADEID which are not a letter or a digit, they are replaced by "_".

Returns:
The filename (without path) of the log file.