Package org.rhq.enterprise.server.rest.domain

Examples of org.rhq.enterprise.server.rest.domain.MetricAggregate


        boolean isHtml = mediaType.equals(MediaType.TEXT_HTML_TYPE);

        MeasurementSchedule schedule = obtainSchedule(scheduleId, false, DataType.MEASUREMENT);

        MeasurementAggregate aggr = dataManager.getMeasurementAggregate(caller, scheduleId, startTime, endTime);
        MetricAggregate res = new MetricAggregate(scheduleId, aggr.getMin(),aggr.getAvg(),aggr.getMax());

        int definitionId = schedule.getDefinition().getId();
        List<List<MeasurementDataNumericHighLowComposite>> listList = dataManager.findDataForResource(caller,
                schedule.getResource().getId(), new int[]{definitionId}, startTime, endTime, dataPoints);
View Full Code Here


        if (definition==null) {
            throw new StuffNotFoundException("There is no definition with id " + definitionId);
        }

        MeasurementAggregate aggr = dataManager.getAggregate(caller, groupId, definitionId, startTime, endTime);
        MetricAggregate res = new MetricAggregate(definitionId, aggr.getMin(),aggr.getAvg(),aggr.getMax());
        res.setGroup(true);

        List<List<MeasurementDataNumericHighLowComposite>> listList = dataManager.findDataForCompatibleGroup(caller,
                groupId,definitionId,startTime,endTime,dataPoints);

        if (listList.isEmpty()) {
View Full Code Here

            List<List<MeasurementDataNumericHighLowComposite>> listList =
                dataManager.findDataForContext(caller, EntityContext.forResource(sched.getResource().getId()),definitionId,startTime,endTime,dataPoints);
            if (!listList.isEmpty()) {
                MeasurementAggregate measurementAggregate = dataManager.getMeasurementAggregate(caller,scheduleId,startTime,endTime);
                List<MeasurementDataNumericHighLowComposite> list = listList.get(0);
                MetricAggregate res = new MetricAggregate(scheduleId,measurementAggregate.getMin(),measurementAggregate.getAvg(),measurementAggregate.getMax());
                boolean isHtml = mediaType.equals(MediaType.TEXT_HTML_TYPE);
                res = fillInDatapoints(res, list, scheduleId, hideEmpty, isHtml);
                resList.add(res);
            }
            else
View Full Code Here

        }
        List<MetricAggregate> ret = new ArrayList<MetricAggregate>(schedules.size());

        for (MeasurementSchedule schedule: schedules) {
            MeasurementAggregate aggr = dataManager.getMeasurementAggregate(caller,schedule.getId(),startTime,endTime);
            MetricAggregate res = new MetricAggregate(schedule.getId(), aggr.getMin(),aggr.getAvg(),aggr.getMax());

            if (includeDataPoints) {
                int definitionId = schedule.getDefinition().getId();
                List<List<MeasurementDataNumericHighLowComposite>> listList = dataManager.findDataForResource(caller,
                        schedule.getResource().getId(), new int[]{definitionId}, startTime, endTime, dataPoints);
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.rest.domain.MetricAggregate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.