infoservice
Class StatusStatistics

java.lang.Object
  extended by infoservice.StatusStatistics
All Implemented Interfaces:
java.lang.Runnable

public class StatusStatistics
extends java.lang.Object
implements java.lang.Runnable

This class is the implementation for the status statistics. It is used to get some statistics for every mixcascade. This class is a singleton.


Field Summary
private  java.util.Hashtable m_statisticsDatabase
          Stores the statistics.
private static StatusStatistics ms_statusStatisticsInstance
          Stores the instance of StatusStatistics (Singleton).
 
Constructor Summary
private StatusStatistics()
          Creates a new instance of StatusStatistics.
 
Method Summary
static StatusStatistics getInstance()
          Returns the instance of StatusStatistics (Singleton).
 void run()
          This does the periodically write out of the statistics.
 void update(StatusInfo a_statusEntry)
          Updates the statistics for one mixcascade.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ms_statusStatisticsInstance

private static StatusStatistics ms_statusStatisticsInstance
Stores the instance of StatusStatistics (Singleton).


m_statisticsDatabase

private java.util.Hashtable m_statisticsDatabase
Stores the statistics.

Constructor Detail

StatusStatistics

private StatusStatistics()
Creates a new instance of StatusStatistics.

Method Detail

getInstance

public static StatusStatistics getInstance()
Returns the instance of StatusStatistics (Singleton). If there is no instance, there is a new one created. Also the included thread is been started (only if isStatusStatisticsEnabled() in Configuration.java returns true).

Returns:
The StatusStatistics instance.

run

public void run()
This does the periodically write out of the statistics. This method is called by the thread started in getInstance().

Specified by:
run in interface java.lang.Runnable

update

public void update(StatusInfo a_statusEntry)
Updates the statistics for one mixcascade. If there are no statistics for the mixcascade the status belongs to in this statistics period, there is a new statistics created. This method does nothing, if isStatusStatisticsEnabled() in Configuration.java returns false.

Parameters:
a_statusEntry - The status for updating the statistics.