Package org.rhq.core.domain.measurement

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


    public static List<MeasurementDefinition> parseMetricsMetadata(MetricDescriptor metricDescriptor,
        ResourceType resourceType) {
        MeasurementDefinition definition;

        DataType dataType = DataType.valueOf(metricDescriptor.getDataType().toUpperCase());
        DisplayType displayType = DisplayType.valueOf(metricDescriptor.getDisplayType().toUpperCase());

        long collectionInterval = MINUTE_30;
        MeasurementUnits units = getMeasurementUnits(metricDescriptor.getUnits(), dataType);
View Full Code Here


                    AlertCondition condition = log.getCondition();
                    String displayText = AlertDefUtil.formatAlertConditionForDisplay(condition, request);

                    String firedValue = log.getValue();
                    if (condition.getMeasurementDefinition() != null) {
                        DataType type = condition.getMeasurementDefinition().getDataType();
                        if (type == DataType.CALLTIME || type == DataType.TRAIT)
                            firedValue = log.getValue();
                        else
                            firedValue = MeasurementConverter.format(Double.valueOf(log.getValue()), condition
                                .getMeasurementDefinition().getUnits(), true);
View Full Code Here

                    i = 0;
                    int schedId = (Integer) row[i++];
                    long existingInterval = (Long) row[i++];
                    int resourceId = (Integer) row[i++];
                    String name = (String) row[i++];
                    DataType dataType = (DataType) row[i++];
                    NumericType numericType = (NumericType) row[i++];

                    ResourceMeasurementScheduleRequest req = reqMap.get(resourceId);
                    if (null == req) {
                        req = new ResourceMeasurementScheduleRequest(resourceId);
View Full Code Here

                    Integer resourceId = results.getInt(1);
                    Integer scheduleId = results.getInt(2);
                    String definitionName = results.getString(3);
                    Long interval = results.getLong(4);
                    Boolean enabled = results.getBoolean(5);
                    DataType dataType = DataType.values()[results.getInt(6)];
                    NumericType rawNumericType = NumericType.values()[results.getInt(7)];
                    if (results.wasNull()) {
                        rawNumericType = null;
                    }
View Full Code Here

        if (tokens.length < 3) {
            System.err.println("measure needs at least two parameters");
            return;
        }

        DataType dataType = getDataType(tokens[1]);
        if (dataType == null) {
            System.err.println("Unknown DataType " + tokens[1]);
            System.err.println("Valid ones are measurement, trait, calltime, complex");
        }
View Full Code Here

        for (MeasurementDefinition metric : metrics) {
            int id = this.metricScheduleCounter.getAndIncrement();
            String name = metric.getName();
            long interval = metric.getDefaultInterval();
            boolean enabled = metric.isDefaultOn() || metric.getDisplayType() == DisplayType.SUMMARY;
            DataType dataType = metric.getDataType();
            NumericType nDataType = metric.getNumericType();
            MeasurementScheduleRequest schedule = new MeasurementScheduleRequest(id, name, interval, enabled, dataType,
                nDataType);
            resourceSchedules.addMeasurementScheduleRequest(schedule);
        }
View Full Code Here

    public static void importProperties(Subject subject, AlertCondition fromCondition, ConditionBean toBean) {
        AlertConditionCategory category = fromCondition.getCategory();

        if ((category == AlertConditionCategory.THRESHOLD) || (category == AlertConditionCategory.BASELINE)
            || (category == AlertConditionCategory.CHANGE)) {
            DataType measDataType = null;
            if (fromCondition.getMeasurementDefinition() != null)
                measDataType = fromCondition.getMeasurementDefinition().getDataType();
            if (DataType.CALLTIME == measDataType)
                calltimeConverter.importProperties(subject, fromCondition, toBean);
            else
View Full Code Here

        if (!(columnValue instanceof MeasurementDefinition)) {
            throw new IllegalArgumentException("Input needs to be of type 'MeasurementDefinition'");
        }

        MeasurementDefinition def = (MeasurementDefinition) columnValue;
        DataType dataType = def.getDataType();

        if (null != dataType) {
            switch (dataType) {
            case TRAIT:
                return "Trait";
View Full Code Here

        if (value == null) {
            return;
        }
        String stringValue = toString(value);

        DataType dataType = request.getDataType();
        switch (dataType) {
        case MEASUREMENT:
            try {
                MeasurementDataNumeric dataNumeric = new MeasurementDataNumeric(request, Double.valueOf(stringValue));
                report.addData(dataNumeric);
View Full Code Here

    private final Log LOG = LogFactory.getLog(SimpleMetaValueMeasurementAdapter.class);

    public void setMeasurementData(MeasurementReport report, MetaValue metaValue, MeasurementScheduleRequest request,
        MeasurementDefinition measurementDefinition) {
        SimpleValueSupport simpleValue = (SimpleValueSupport) metaValue;
        DataType dataType = measurementDefinition.getDataType();
        switch (dataType) {
        case MEASUREMENT:
            try {
                MeasurementDataNumeric dataNumeric = new MeasurementDataNumeric(request, new Double(simpleValue
                    .getValue().toString()));
View Full Code Here

TOP

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

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.