Package org.rhq.core.domain.measurement

Examples of org.rhq.core.domain.measurement.MeasurementScheduleRequest


                    try {
                        DataType dataType = metricDefinition.getDataType();
                        if (dataType == DataType.MEASUREMENT || metricDefinition.getDataType() == DataType.TRAIT) {
                            MeasurementReport report = new MeasurementReport();
                            Set<MeasurementScheduleRequest> requests = new HashSet<MeasurementScheduleRequest>();
                            MeasurementScheduleRequest request = new MeasurementScheduleRequest(1, metricDefinition
                                .getName(), 0, true, metricDefinition.getDataType());
                            requests.add(request);
                            measurementFacet.getValues(report, requests);
                            if (dataType == DataType.MEASUREMENT) {
                                assert report.getNumericData().isEmpty() || report.getNumericData().size() == 1;
View Full Code Here


            return asConnection;
        }
    }

    private static MeasurementScheduleRequest newMeasurementRequest(String requestName) {
        return new MeasurementScheduleRequest(-1, requestName, -1, true, MEASUREMENT);
    }
View Full Code Here

    private static MeasurementScheduleRequest newMeasurementRequest(String requestName) {
        return new MeasurementScheduleRequest(-1, requestName, -1, true, MEASUREMENT);
    }

    private static MeasurementScheduleRequest newTraitRequest(String requestName) {
        return new MeasurementScheduleRequest(-1, requestName, -1, true, TRAIT);
    }
View Full Code Here

            for (Resource service : services) {
                ResourceComponent serviceComponent =
                    PluginContainer.getInstance().getInventoryManager().getResourceComponent(service);
                if (serviceComponent instanceof MeasurementFacet) {
                    Set<MeasurementScheduleRequest> metricList = new HashSet<MeasurementScheduleRequest>();
                    metricList.add(new MeasurementScheduleRequest(1, "wwwSummaryInRequests", 1000, true,
                        DataType.MEASUREMENT));
                    metricList.add(new MeasurementScheduleRequest(2, "wwwRequestInRequests.GET", 1000, true,
                        DataType.MEASUREMENT));
                    MeasurementReport report = new MeasurementReport();
                    ((MeasurementFacet) serviceComponent).getValues(report, metricList);
                    for (MeasurementData data : report.getNumericData()) {
                        System.out.println(data.getValue() + ":" + service.getName());
View Full Code Here

      if (resourceComponent instanceof MeasurementFacet)
      {
         for (MeasurementDefinition def : resource.getResourceType().getMetricDefinitions())
         {
            Set<MeasurementScheduleRequest> metricList = new HashSet<MeasurementScheduleRequest>();
            metricList.add(new MeasurementScheduleRequest(1, def.getName(), 1000, true, def.getDataType(), null));
            MeasurementReport report = new MeasurementReport();
            ((MeasurementFacet) resourceComponent).getValues(report, metricList);

            assert report.getNumericData().size() > 0 : "Measurement " + def.getName() + " not collected from " + resource;
            MeasurementData data = report.getNumericData().iterator().next();
View Full Code Here

    if (dataType == DataType.MEASUREMENT || dataType == DataType.TRAIT) {

      MeasurementReport report = new MeasurementReport();
      Set<MeasurementScheduleRequest> requests = new HashSet<MeasurementScheduleRequest>();

      MeasurementScheduleRequest request = new MeasurementScheduleRequest(
          1, name, 0, true, dataType);
      requests.add(request);

      measurementFacet.getValues(report, requests);
      if (dataType == DataType.MEASUREMENT) {
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.measurement.MeasurementScheduleRequest

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.