Package org.rhq.server.metrics

Examples of org.rhq.server.metrics.StorageResultSetFuture


        List<StorageResultSetFuture> futureResults = new ArrayList<StorageResultSetFuture>();
        for (MeasurementDataPK pk : pks) {
            // technically we could get more than 1 row but in practice this is not going to be the case.
            // there are never going to be 2 measurements for a single schedule persisted within 1 millisecond.
            StorageResultSetFuture f = metricsDAO
                .findAggregateMetricsAsync(pk.getScheduleId(), Bucket.ONE_HOUR, pk.getTimestamp(), pk.getTimestamp() + 1);
            futureResults.add(f);
        }

        AggregateNumericMetricMapper mapper = new AggregateNumericMetricMapper();

        List<AggregateNumericMetric> result = new ArrayList<AggregateNumericMetric>(pks.size());
        for (StorageResultSetFuture f : futureResults) {
            ResultSet r = f.get();

            // this should always get exactly 1 row
            if (!r.isExhausted()) {
                AggregateNumericMetric aggregate = mapper.mapOne(r);
                result.add(aggregate);
View Full Code Here

TOP

Related Classes of org.rhq.server.metrics.StorageResultSetFuture

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.