org.rhq.enterprise.server.measurement
Interface MeasurementDataManagerLocal

All Known Implementing Classes:
MeasurementDataManagerBean

public interface MeasurementDataManagerLocal

A manager for MeasurementDatas.


Method Summary
 void addNumericData(Set<org.rhq.core.domain.measurement.MeasurementDataNumeric> data)
           
 void addTraitData(Set<org.rhq.core.domain.measurement.MeasurementDataTrait> data)
           
 List<org.rhq.core.domain.measurement.MeasurementDataTrait> findCurrentTraitsForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, org.rhq.core.domain.measurement.DisplayType displayType)
           
 List<List<org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite>> findDataForCompatibleGroup(org.rhq.core.domain.auth.Subject subject, int groupId, int definitionId, long beginTime, long endTime, int numPoints)
          Returns a list of numeric data point lists for the given compatible group - one per specified measurement definition.
 List<List<org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite>> findDataForContext(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.common.EntityContext context, int definitionId, long beginTime, long endTime, int numDataPoints)
           
 List<List<org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite>> findDataForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, int[] definitionIds, long beginTime, long endTime, int numPoints)
           
 Set<org.rhq.core.domain.measurement.MeasurementData> findLiveData(org.rhq.core.domain.auth.Subject subject, int resourceId, int[] definitionIds)
          Get live metrics for a given MeasurementSchedule
 Map<Integer,List<org.rhq.core.domain.measurement.ui.MetricDisplaySummary>> findNarrowedMetricDisplaySummariesForCompatibleResources(org.rhq.core.domain.auth.Subject subject, Collection<org.rhq.core.domain.resource.Resource> resources, long beginTime, long endTime)
          Get the MetricDisplaySummarys for the resources passed in, that all need to be of the same ResourceType.
 Map<Integer,List<org.rhq.core.domain.measurement.ui.MetricDisplaySummary>> findNarrowedMetricDisplaySummariesForResourcesAndParent(org.rhq.core.domain.auth.Subject subject, int resourceTypeId, int parentId, List<Integer> resourceIds, long begin, long end)
          Return a map of <resource id, List<MetricDisplaySummary>>, where the list contains the MetricDisplaySummary for the (enabled) schedules of the resource
 Map<Integer,List<org.rhq.core.domain.measurement.ui.MetricDisplaySummary>> findNarrowedMetricsDisplaySummariesForAutoGroup(org.rhq.core.domain.auth.Subject subject, int parentId, int cType, long beginTime, long endTime)
           
 Map<Integer,List<org.rhq.core.domain.measurement.ui.MetricDisplaySummary>> findNarrowedMetricsDisplaySummariesForCompGroup(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.resource.group.ResourceGroup group, long beginTime, long endTime)
          Get metric display summaries for the resources of the passed compatible group, where the MetricDisplaySummary only contains the metric name and number of alerts.
 List<org.rhq.core.domain.measurement.MeasurementDataNumeric> findRawData(org.rhq.core.domain.auth.Subject subject, int scheduleId, long startTime, long endTime)
           
 List<org.rhq.core.domain.measurement.MeasurementDataTrait> findTraits(org.rhq.core.domain.auth.Subject subject, int resourceId, int definitionId)
          Return all known trait data for the passed schedule, defined by resourceId and definitionId
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.MeasurementDataTrait> findTraitsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.MeasurementDataTraitCriteria criteria)
          Finds traits that match the specified criteria.
 MeasurementAggregate getAggregate(org.rhq.core.domain.auth.Subject subject, int groupId, int definitionId, long startTime, long endTime)
           
 MeasurementAggregate getAggregate(org.rhq.core.domain.auth.Subject subject, int scheduleId, long startTime, long endTime)
          Get the aggregate values of the numerical values for a given schedule.
 org.rhq.core.domain.measurement.MeasurementDataNumeric getCurrentNumericForSchedule(int scheduleId)
          Return the current numeric value for the passed schedule
 org.rhq.core.domain.measurement.MeasurementDataTrait getCurrentTraitForSchedule(int scheduleId)
          Return the current trait value for the passed schedule
 void mergeMeasurementReport(org.rhq.core.domain.measurement.MeasurementReport report)
           
 int purgeTraits(long oldest)
           
 

Method Detail

purgeTraits

int purgeTraits(long oldest)

mergeMeasurementReport

void mergeMeasurementReport(org.rhq.core.domain.measurement.MeasurementReport report)

addNumericData

void addNumericData(Set<org.rhq.core.domain.measurement.MeasurementDataNumeric> data)

addTraitData

void addTraitData(Set<org.rhq.core.domain.measurement.MeasurementDataTrait> data)

getCurrentTraitForSchedule

org.rhq.core.domain.measurement.MeasurementDataTrait getCurrentTraitForSchedule(int scheduleId)
Return the current trait value for the passed schedule

Parameters:
scheduleId - id of a MeasurementSchedule that 'points' to a Trait
Returns:
One trait

getCurrentNumericForSchedule

org.rhq.core.domain.measurement.MeasurementDataNumeric getCurrentNumericForSchedule(int scheduleId)
Return the current numeric value for the passed schedule

Parameters:
scheduleId - id of a MeasurementSchedule that 'points' to a MeasurementDataNumeric record
Returns:
One MeasurementDataNumeric or null if nothing was found

findNarrowedMetricsDisplaySummariesForCompGroup

Map<Integer,List<org.rhq.core.domain.measurement.ui.MetricDisplaySummary>> findNarrowedMetricsDisplaySummariesForCompGroup(org.rhq.core.domain.auth.Subject subject,
                                                                                                                           org.rhq.core.domain.resource.group.ResourceGroup group,
                                                                                                                           long beginTime,
                                                                                                                           long endTime)
Get metric display summaries for the resources of the passed compatible group, where the MetricDisplaySummary only contains the metric name and number of alerts. All other fields are not set.

Parameters:
subject - subject of the caller
group - compatible group
Returns:
a Map of resource id, List of summaries for this resource

findNarrowedMetricDisplaySummariesForCompatibleResources

Map<Integer,List<org.rhq.core.domain.measurement.ui.MetricDisplaySummary>> findNarrowedMetricDisplaySummariesForCompatibleResources(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                    Collection<org.rhq.core.domain.resource.Resource> resources,
                                                                                                                                    long beginTime,
                                                                                                                                    long endTime)
Get the MetricDisplaySummarys for the resources passed in, that all need to be of the same ResourceType. Summaries only contain a basic selection of fields for the purpose of filling the Child resource popups.


findNarrowedMetricsDisplaySummariesForAutoGroup

Map<Integer,List<org.rhq.core.domain.measurement.ui.MetricDisplaySummary>> findNarrowedMetricsDisplaySummariesForAutoGroup(org.rhq.core.domain.auth.Subject subject,
                                                                                                                           int parentId,
                                                                                                                           int cType,
                                                                                                                           long beginTime,
                                                                                                                           long endTime)

findNarrowedMetricDisplaySummariesForResourcesAndParent

Map<Integer,List<org.rhq.core.domain.measurement.ui.MetricDisplaySummary>> findNarrowedMetricDisplaySummariesForResourcesAndParent(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                   int resourceTypeId,
                                                                                                                                   int parentId,
                                                                                                                                   List<Integer> resourceIds,
                                                                                                                                   long begin,
                                                                                                                                   long end)
Return a map of <resource id, List<MetricDisplaySummary>>, where the list contains the MetricDisplaySummary for the (enabled) schedules of the resource

Parameters:
subject - Subject of the caller
resourceTypeId - ResourceTypeId of the child resources
parentId - ID of the common parent resource
resourceIds - List of primary keys of the resources we are interested in
begin - begin time
end - end time

findDataForContext

List<List<org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite>> findDataForContext(org.rhq.core.domain.auth.Subject subject,
                                                                                                                org.rhq.core.domain.common.EntityContext context,
                                                                                                                int definitionId,
                                                                                                                long beginTime,
                                                                                                                long endTime,
                                                                                                                int numDataPoints)

getAggregate

MeasurementAggregate getAggregate(org.rhq.core.domain.auth.Subject subject,
                                  int scheduleId,
                                  long startTime,
                                  long endTime)
Get the aggregate values of the numerical values for a given schedule. This can only provide aggregates for data in the "live" table

Parameters:
subject - the user requesting the aggregate
scheduleId - the id of the MeasurementSchedule for which this aggregate is being requested
start - the start time
end - the end time
Returns:
MeasurementAggregate bean with the data
Throws:
FetchException - if the schedule does not reference numerical data or if the user is not allowed to view the Resource corresponding to this scheduleId

getAggregate

MeasurementAggregate getAggregate(org.rhq.core.domain.auth.Subject subject,
                                  int groupId,
                                  int definitionId,
                                  long startTime,
                                  long endTime)

findTraits

List<org.rhq.core.domain.measurement.MeasurementDataTrait> findTraits(org.rhq.core.domain.auth.Subject subject,
                                                                      int resourceId,
                                                                      int definitionId)
Return all known trait data for the passed schedule, defined by resourceId and definitionId

Parameters:
resourceId - PK of a Resource
definitionId - PK of a MeasurementDefinition
Returns:
a List of MeasurementDataTrait objects.

findCurrentTraitsForResource

List<org.rhq.core.domain.measurement.MeasurementDataTrait> findCurrentTraitsForResource(org.rhq.core.domain.auth.Subject subject,
                                                                                        int resourceId,
                                                                                        org.rhq.core.domain.measurement.DisplayType displayType)

findTraitsByCriteria

org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.MeasurementDataTrait> findTraitsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                             org.rhq.core.domain.criteria.MeasurementDataTraitCriteria criteria)
Finds traits that match the specified criteria.

Parameters:
subject - the user that is requesting the traits
criteria - the criteria by which to filter the traits
Returns:
the traits that match the specified criteria; never null

findLiveData

Set<org.rhq.core.domain.measurement.MeasurementData> findLiveData(org.rhq.core.domain.auth.Subject subject,
                                                                  int resourceId,
                                                                  int[] definitionIds)
Get live metrics for a given MeasurementSchedule

Parameters:
sched - MeasurementSchedule to obtain the data for
Returns:
MeasurementData for this Schedule

findDataForCompatibleGroup

List<List<org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite>> findDataForCompatibleGroup(org.rhq.core.domain.auth.Subject subject,
                                                                                                                        int groupId,
                                                                                                                        int definitionId,
                                                                                                                        long beginTime,
                                                                                                                        long endTime,
                                                                                                                        int numPoints)
Returns a list of numeric data point lists for the given compatible group - one per specified measurement definition. The data points represent the average min/avg/max values of the members of the group.

Parameters:
subject -
compatibleGroupId -
measurementDefinitionId - measurement definition id for numeric metric associated with the given compatible group
beginTime -
endTime -
numberOfDataPoints -
Returns:

findDataForResource

List<List<org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite>> findDataForResource(org.rhq.core.domain.auth.Subject subject,
                                                                                                                 int resourceId,
                                                                                                                 int[] definitionIds,
                                                                                                                 long beginTime,
                                                                                                                 long endTime,
                                                                                                                 int numPoints)

findRawData

List<org.rhq.core.domain.measurement.MeasurementDataNumeric> findRawData(org.rhq.core.domain.auth.Subject subject,
                                                                         int scheduleId,
                                                                         long startTime,
                                                                         long endTime)


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