public class MeasurementDataManagerBean extends Object implements MeasurementDataManagerLocal, MeasurementDataManagerRemote
MeasurementDatas.| Constructor and Description |
|---|
MeasurementDataManagerBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNumericData(Set<org.rhq.core.domain.measurement.MeasurementDataNumeric> data)
Add metrics data to the database.
|
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)
Return the Traits for the passed resource.
|
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 (only one).
|
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 numDataPoints)
Returns a list of numeric data point lists for the given resource - one list per specified measurement
definition.
|
Set<org.rhq.core.domain.measurement.MeasurementData> |
findLiveData(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] definitionIds) |
Set<org.rhq.core.domain.measurement.MeasurementData> |
findLiveData(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] definitionIds,
Long timeout)
Get live metrics from the agent for a given MeasurementSchedule
|
Set<org.rhq.core.domain.measurement.MeasurementData> |
findLiveDataForGroup(org.rhq.core.domain.auth.Subject subject,
int groupId,
int[] resourceIds,
int[] definitionIds) |
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. |
org.rhq.core.domain.measurement.MeasurementAggregate |
getAggregate(org.rhq.core.domain.auth.Subject subject,
int groupId,
int definitionId,
long startTime,
long endTime)
Get the aggregate values of the numerical values for a given group and metric
definition.
|
MeasurementAggregate |
getAggregate(org.rhq.core.domain.auth.Subject subject,
int scheduleId,
long startTime,
long endTime)
Deprecated.
|
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
|
org.rhq.core.domain.measurement.MeasurementAggregate |
getMeasurementAggregate(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.
|
void |
mergeMeasurementReport(org.rhq.core.domain.measurement.MeasurementReport report) |
void |
updateAlertConditionCache(String callingMethod,
org.rhq.core.domain.measurement.MeasurementData[] data) |
public void mergeMeasurementReport(org.rhq.core.domain.measurement.MeasurementReport report)
mergeMeasurementReport in interface MeasurementDataManagerLocalpublic void addNumericData(Set<org.rhq.core.domain.measurement.MeasurementDataNumeric> data)
addNumericData in interface MeasurementDataManagerLocaldata - the actual data pointspublic void addTraitData(Set<org.rhq.core.domain.measurement.MeasurementDataTrait> data)
addTraitData in interface MeasurementDataManagerLocalpublic 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)
MetricDisplaySummary for the (enabled) schedules of the resourcefindNarrowedMetricDisplaySummariesForResourcesAndParent in interface MeasurementDataManagerLocalsubject - Subject of the callerresourceTypeId - ResourceTypeId of the child resourcesparentId - ID of the common parent resourceresourceIds - List of primary keys of the resources we are interested inbegin - begin timeend - end timepublic 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)
MeasurementDataManagerLocalMetricDisplaySummary only contains the metric name and number of alerts. All other fields
are not set.findNarrowedMetricsDisplaySummariesForCompGroup in interface MeasurementDataManagerLocalsubject - subject of the callergroup - compatible grouppublic 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)
findNarrowedMetricsDisplaySummariesForAutoGroup in interface MeasurementDataManagerLocalpublic 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)
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.findNarrowedMetricDisplaySummariesForCompatibleResources in interface MeasurementDataManagerLocal@Nullable public org.rhq.core.domain.measurement.MeasurementDataTrait getCurrentTraitForSchedule(int scheduleId)
getCurrentTraitForSchedule in interface MeasurementDataManagerLocalscheduleId - id of a MeasurementSchedule that 'points' to a Trait@Nullable public org.rhq.core.domain.measurement.MeasurementDataNumeric getCurrentNumericForSchedule(int scheduleId)
MeasurementDataManagerLocalgetCurrentNumericForSchedule in interface MeasurementDataManagerLocalscheduleId - id of a MeasurementSchedule that 'points' to a MeasurementDataNumeric recordpublic void updateAlertConditionCache(String callingMethod, org.rhq.core.domain.measurement.MeasurementData[] data)
updateAlertConditionCache in interface MeasurementDataManagerLocal@Deprecated public MeasurementAggregate getAggregate(org.rhq.core.domain.auth.Subject subject, int scheduleId, long startTime, long endTime)
MeasurementDataManagerRemotegetAggregate in interface MeasurementDataManagerRemotesubject - the user requesting the aggregatescheduleId - the id of the MeasurementSchedule for which this aggregate is being requestedpublic org.rhq.core.domain.measurement.MeasurementAggregate getMeasurementAggregate(org.rhq.core.domain.auth.Subject subject,
int scheduleId,
long startTime,
long endTime)
MeasurementDataManagerRemotegetMeasurementAggregate in interface MeasurementDataManagerRemotesubject - the user requesting the aggregatescheduleId - the id of the MeasurementSchedule for which this aggregate is being requestedstartTime - in millisendTime - in millispublic org.rhq.core.domain.measurement.MeasurementAggregate getAggregate(org.rhq.core.domain.auth.Subject subject,
int groupId,
int definitionId,
long startTime,
long endTime)
MeasurementDataManagerRemotegetAggregate in interface MeasurementDataManagerRemotesubject - the user requesting the aggregategroupId - the id of the ResourceGroup for which this aggregate is being requesteddefinitionId - the id of the MeasurementDefinition for the metricstartTime - in millisendTime - in millispublic List<org.rhq.core.domain.measurement.MeasurementDataTrait> findCurrentTraitsForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, org.rhq.core.domain.measurement.DisplayType displayType)
findCurrentTraitsForResource in interface MeasurementDataManagerRemoteresourceId - Id of the resource we are interested indisplayType - A display type for filtering or null for all traits.public 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)
MeasurementDataManagerRemotefindDataForCompatibleGroup in interface MeasurementDataManagerRemotedefinitionId - measurement definition id for numeric metric associated with the given compatible grouppublic 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)
findDataForContext in interface MeasurementDataManagerLocalpublic 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 numDataPoints)
MeasurementDataManagerRemotefindDataForResource in interface MeasurementDataManagerRemotedefinitionIds - measurement definition id for numeric metric associated with the given resourcepublic Set<org.rhq.core.domain.measurement.MeasurementData> findLiveData(org.rhq.core.domain.auth.Subject subject, int resourceId, int[] definitionIds)
findLiveData in interface MeasurementDataManagerRemotepublic Set<org.rhq.core.domain.measurement.MeasurementData> findLiveData(org.rhq.core.domain.auth.Subject subject, int resourceId, int[] definitionIds, Long timeout)
MeasurementDataManagerLocalfindLiveData in interface MeasurementDataManagerLocalsubject - the user that is requesting the dataresourceId - the id of the resourcedefinitionIds - the array of ids of schedule definitionstimeout - the amount of time in milliseconds before timing out the request. Should be > 0. If null then default
is applied. Default agent connection failures can be long.public Set<org.rhq.core.domain.measurement.MeasurementData> findLiveDataForGroup(org.rhq.core.domain.auth.Subject subject, int groupId, int[] resourceIds, int[] definitionIds)
findLiveDataForGroup in interface MeasurementDataManagerRemotepublic List<org.rhq.core.domain.measurement.MeasurementDataNumeric> findRawData(org.rhq.core.domain.auth.Subject subject, int scheduleId, long startTime, long endTime)
findRawData in interface MeasurementDataManagerLocalpublic List<org.rhq.core.domain.measurement.MeasurementDataTrait> findTraits(org.rhq.core.domain.auth.Subject subject, int resourceId, int definitionId)
findTraits in interface MeasurementDataManagerRemoteresourceId - PK of a ResourcedefinitionId - PK of a MeasurementDefinitionMeasurementDataTrait objects.public 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)
MeasurementDataManagerRemotecriteria.findTraitsByCriteria in interface MeasurementDataManagerRemotesubject - the user that is requesting the traitscriteria - the criteria by which to filter the traitscriteria; never nullCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.