org.rhq.enterprise.server.resource.group.definition.mbean
Interface GroupDefinitionRecalculationThreadMonitorMBean

All Known Implementing Classes:
GroupDefinitionRecalculationThreadMonitor

public interface GroupDefinitionRecalculationThreadMonitorMBean

An MBean that exposes call-time metrics for the cost of recalculating DynaGroups from their owning GroupDefinitions

Author:
Joseph Marques

Method Summary
 void clear()
          Clears the metrics data, starting all values back to 0 as if starting fresh.
 long getAutoRecalculatingGroupDefinitionCount()
          Returns the count of the number of group definitions currently set for auto-recalculation, this can never be greater than getGroupDefinitionCount()
 long getAutoRecalculationThreadTime()
          Returns the time (in millis) that it took to recalculate all of the DynaGroups in the system whose owning GroupDefinition was set to automatically recalculate on a periodic basis (this metric only reflects the last known / collected time for the recalculation thread)
 long getDynaGroupCount()
          Returns the count of the number of ResourceGroups in the system current managed by some GroupDefinition
 long getGroupDefinitionCount()
          Returns the count of the total number of group definitions currently managed by the system
 Map<String,Map<String,Object>> getStatistics()
          Returns a map of statistics broken down by group definition.
 void updateAutoRecalculationThreadTime(long timeInMillis)
          Sets the time (in millis) that it took to recalculate all of the DynaGroups in the system whose owning GroupDefinition was set to automatically recalculate on a periodic basis (this metric only reflects the last known / collected time for the recalculation thread)
 void updateStatistic(String groupDefinitionName, int newDynaGroupCount, boolean success, long executionTime)
          Updates the internal GroupDefinitionRecalculationThreadMonitor.GroupDefinitionRecalculationStatistic for the GroupDefinition with the given name.
 

Method Detail

clear

void clear()
Clears the metrics data, starting all values back to 0 as if starting fresh.


getGroupDefinitionCount

long getGroupDefinitionCount()
Returns the count of the total number of group definitions currently managed by the system

Returns:
count of the total number of group definitions currently managed by the system

getAutoRecalculatingGroupDefinitionCount

long getAutoRecalculatingGroupDefinitionCount()
Returns the count of the number of group definitions currently set for auto-recalculation, this can never be greater than getGroupDefinitionCount()

Returns:
count of the number of group definitions currently set for auto-recalculation, this can never be greater than getGroupDefinitionCount()

getDynaGroupCount

long getDynaGroupCount()
Returns the count of the number of ResourceGroups in the system current managed by some GroupDefinition

Returns:
count of the number of ResourceGroups in the system current managed by some GroupDefinition

getAutoRecalculationThreadTime

long getAutoRecalculationThreadTime()
Returns the time (in millis) that it took to recalculate all of the DynaGroups in the system whose owning GroupDefinition was set to automatically recalculate on a periodic basis (this metric only reflects the last known / collected time for the recalculation thread)

Returns:
the time (in millis) that it took to recalculate all of the DynaGroups in the system whose owning GroupDefinition was set to automatically recalculate on a periodic basis (this metric only reflects the last known / collected time for the recalculation thread)

updateAutoRecalculationThreadTime

void updateAutoRecalculationThreadTime(long timeInMillis)
Sets the time (in millis) that it took to recalculate all of the DynaGroups in the system whose owning GroupDefinition was set to automatically recalculate on a periodic basis (this metric only reflects the last known / collected time for the recalculation thread)

Parameters:
timeInMillis - the time (in millis) that it took to recalculate all of the DynaGroups in the system whose owning GroupDefinition was set to automatically recalculate on a periodic basis (this metric only reflects the last known / collected time for the recalculation thread)

getStatistics

Map<String,Map<String,Object>> getStatistics()
Returns a map of statistics broken down by group definition.

Returns:
complex data

updateStatistic

void updateStatistic(String groupDefinitionName,
                     int newDynaGroupCount,
                     boolean success,
                     long executionTime)
Updates the internal GroupDefinitionRecalculationThreadMonitor.GroupDefinitionRecalculationStatistic for the GroupDefinition with the given name.

Parameters:
groupDefinitionName - the name of the GroupDefinition whose internal statistics will be updated
newDynaGroupCount - the count of the number of DynaGroups managed by this GroupDefinition
success - whether or not the last recalculation was successful; if successful, newDynaGroupCount will reflect the count after recalculation, otherwise it will reflect the last known count
executionTime - the time (in millis) that it took to recalculate this GroupDefinition


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.