org.rhq.enterprise.server.measurement
Class MeasurementOOBManagerBean

java.lang.Object
  extended by org.rhq.enterprise.server.measurement.MeasurementOOBManagerBean
All Implemented Interfaces:
MeasurementOOBManagerLocal

public class MeasurementOOBManagerBean
extends Object
implements MeasurementOOBManagerLocal

Manager bean for Out-of-Bound measurements.

Author:
Heiko W. Rupp

Constructor Summary
MeasurementOOBManagerBean()
           
 
Method Summary
 void computeOOBsFromHourBeginingAt(org.rhq.core.domain.auth.Subject subject, long begin)
          Compute oobs from the values in the 1h measurement table that just got added.
 void computeOOBsFromLastHour(org.rhq.core.domain.auth.Subject subject)
          Computes the OOBs for the last hour.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.composite.MeasurementOOBComposite> getHighestNOOBsForGroup(org.rhq.core.domain.auth.Subject subject, int groupId, int n)
          Returns the highest n OOBs for the passed group id
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.composite.MeasurementOOBComposite> getHighestNOOBsForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, int n)
          Returns the highest n OOBs for the passed resource id
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.composite.MeasurementOOBComposite> getSchedulesWithOOBs(org.rhq.core.domain.auth.Subject subject, String metricNameFilter, String resourceNameFilter, String parentNameFilter, org.rhq.core.domain.util.PageControl pc)
          Return OOB Composites that contain all information about the OOBs in a given time as aggregates.
 void removeOOBsForGroupAndDefinition(org.rhq.core.domain.auth.Subject subject, int resourceGroupId, int measurementDefinitionId)
           
 void removeOOBsForSchedule(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.measurement.MeasurementSchedule sched)
          Resets the OOB data for the passed schedule
 void removeOutdatedOOBs(org.rhq.core.domain.auth.Subject subject, long cutoffTime)
          Remove OOBs for schedules that had their baselines calculated after a certain cutoff point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeasurementOOBManagerBean

public MeasurementOOBManagerBean()
Method Detail

computeOOBsFromHourBeginingAt

public void computeOOBsFromHourBeginingAt(org.rhq.core.domain.auth.Subject subject,
                                          long begin)
Compute oobs from the values in the 1h measurement table that just got added. For the total result, this is an incremental computation. The idea is that it gets run *directly* after the 1h compression (and the baseline recalculation too). Algorithm is as follows:

Specified by:
computeOOBsFromHourBeginingAt in interface MeasurementOOBManagerLocal
Parameters:
subject - Subject of the caller
begin - Start time of the 1h entries to look at

computeOOBsFromLastHour

public void computeOOBsFromLastHour(org.rhq.core.domain.auth.Subject subject)
Computes the OOBs for the last hour. This is done by getting the latest timestamp of the 1h table and invoking #computeOOBsFromHourBeginingAt

Specified by:
computeOOBsFromLastHour in interface MeasurementOOBManagerLocal
Parameters:
subject - Caller

removeOutdatedOOBs

public void removeOutdatedOOBs(org.rhq.core.domain.auth.Subject subject,
                               long cutoffTime)
Remove OOBs for schedules that had their baselines calculated after a certain cutoff point. This is used to get rid of outdated OOB data for baselines that got recalculated, as the new baselines will be 'big' enough for what have been OOBs before and we don't have any baseline history.

Specified by:
removeOutdatedOOBs in interface MeasurementOOBManagerLocal
Parameters:
subject - The caller
cutoffTime - The reference time to determine new baselines

removeOOBsForSchedule

public void removeOOBsForSchedule(org.rhq.core.domain.auth.Subject subject,
                                  org.rhq.core.domain.measurement.MeasurementSchedule sched)
Resets the OOB data for the passed schedule

Specified by:
removeOOBsForSchedule in interface MeasurementOOBManagerLocal
Parameters:
subject - Caller
sched - the schedule for which we want to clean out the data

removeOOBsForGroupAndDefinition

public void removeOOBsForGroupAndDefinition(org.rhq.core.domain.auth.Subject subject,
                                            int resourceGroupId,
                                            int measurementDefinitionId)
Specified by:
removeOOBsForGroupAndDefinition in interface MeasurementOOBManagerLocal

getSchedulesWithOOBs

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.composite.MeasurementOOBComposite> getSchedulesWithOOBs(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                 String metricNameFilter,
                                                                                                                                 String resourceNameFilter,
                                                                                                                                 String parentNameFilter,
                                                                                                                                 org.rhq.core.domain.util.PageControl pc)
Return OOB Composites that contain all information about the OOBs in a given time as aggregates.

Specified by:
getSchedulesWithOOBs in interface MeasurementOOBManagerLocal
Parameters:
subject - The caller
metricNameFilter - a schedule name to filter for
resourceNameFilter - a resource name to filter for
parentNameFilter - a parent resource name to filter for @return List of schedules with the corresponing oob aggregates
pc - PageControl to do pagination

getHighestNOOBsForResource

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.composite.MeasurementOOBComposite> getHighestNOOBsForResource(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                       int resourceId,
                                                                                                                                       int n)
Returns the highest n OOBs for the passed resource id

Specified by:
getHighestNOOBsForResource in interface MeasurementOOBManagerLocal
Parameters:
subject - caller
resourceId - the resource we are interested in
n - max number of entries wanted
Returns:

getHighestNOOBsForGroup

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.composite.MeasurementOOBComposite> getHighestNOOBsForGroup(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                    int groupId,
                                                                                                                                    int n)
Returns the highest n OOBs for the passed group id

Specified by:
getHighestNOOBsForGroup in interface MeasurementOOBManagerLocal
Parameters:
subject - caller
groupId - the group we are interested in
n - max number of entries wanted
Returns:


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