net.sf.infrared.agent
Class StatisticsMgr

java.lang.Object
  extended bynet.sf.infrared.agent.StatisticsMgr

public class StatisticsMgr
extends Object

This class is responsible for managing the global statistics Incremental statistics updates are merged with the global instance StatisticsMgr ensures that there is a single Statistics object for each application instance. This statistics object represents the performance data for that application instance.


Field Summary
static String ALL_VALUE
           
 
Constructor Summary
StatisticsMgr()
           
 
Method Summary
static Set getListOfApplications()
          Return the list of application names for which the statistics is available
static Set getListOfInstances(Set applicationNames)
          Return the list of instances of a set of applications for which the statistics is available.
static Set getListOfInstances(String applicationName)
          Return the list of instances of an application for which the statistics is available.
static PerformanceDataSnapShot getPerformanceData()
          Copy the statistics data and return a snap shot.
static PerformanceDataSnapShot getPerformanceData(Set applicationNames, Set instanceNames)
          Merges statistics for a set of applications & instances
static PerformanceDataSnapShot getPerformanceData(String applicationName, String instanceName)
          Retrieve Snap shot for a given application instance.
static void merge(Statistics stats)
          Merge statistics of one request with the global statistics
static List reset()
          Reset the statistics and return the snap shot of the current state
static List reset(Set applications, Set instances)
           
static PerformanceDataSnapShot reset(String applicationName, String instanceName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_VALUE

public static final String ALL_VALUE
See Also:
Constant Field Values
Constructor Detail

StatisticsMgr

public StatisticsMgr()
Method Detail

getPerformanceData

public static PerformanceDataSnapShot getPerformanceData()
Copy the statistics data and return a snap shot.

Returns:

getPerformanceData

public static PerformanceDataSnapShot getPerformanceData(String applicationName,
                                                         String instanceName)
Retrieve Snap shot for a given application instance. If either the application name is or the instance name is the matching statistics objects are merged

Parameters:
applicationName -
instanceName -
Returns:

getPerformanceData

public static PerformanceDataSnapShot getPerformanceData(Set applicationNames,
                                                         Set instanceNames)
Merges statistics for a set of applications & instances

Parameters:
applicationNames -
instanceNames -
Returns:

reset

public static List reset()
Reset the statistics and return the snap shot of the current state

Returns:

reset

public static List reset(Set applications,
                         Set instances)

reset

public static PerformanceDataSnapShot reset(String applicationName,
                                            String instanceName)

merge

public static void merge(Statistics stats)
Merge statistics of one request with the global statistics

Parameters:
stats -

getListOfApplications

public static Set getListOfApplications()
Return the list of application names for which the statistics is available

Returns:

getListOfInstances

public static Set getListOfInstances(String applicationName)
Return the list of instances of an application for which the statistics is available.

Parameters:
applicationName -
Returns:

getListOfInstances

public static Set getListOfInstances(Set applicationNames)
Return the list of instances of a set of applications for which the statistics is available.

Parameters:
applicationNames -
Returns: