Package org.rhq.core.domain.alert.composite

Examples of org.rhq.core.domain.alert.composite.AlertConditionRangeCategoryComposite


                    + alertConditionOperator + ", driftDefNameRegex=" + driftDefNameRegexStr + ", driftPathNameRegex="
                    + driftPathNameRegexStr);
            }
            addTo("driftCache", driftCache, driftComposite.getResourceId(), cacheElement, alertConditionId, stats);
        } else if (alertConditionCategory == AlertConditionCategory.RANGE) {
            AlertConditionRangeCategoryComposite rangeComposite = (AlertConditionRangeCategoryComposite) composite;
            Double loValue = alertCondition.getThreshold();
            String hiValueStr = alertCondition.getOption();

            MeasurementNumericCacheElement cacheElement = null;
            try {
                if (hiValueStr == null) {
                    throw new NumberFormatException("The range alert condition is missing the high value");
                }
                Double hiValue = Double.valueOf(hiValueStr);
                cacheElement = new MeasurementRangeNumericCacheElement(alertConditionOperator, loValue, hiValue,
                    alertConditionId);
            } catch (InvalidCacheElementException icee) {
                log.info("Failed to create MeasurementRangeNumericCacheElement with parameters: "
                    + AlertConditionCacheUtils.getCacheElementErrorString(alertConditionId, alertConditionOperator,
                        hiValueStr, loValue, icee));
            } catch (NumberFormatException nfe) {
                log.info("Failed to create MeasurementRangeNumericCacheElement with parameters: "
                    + AlertConditionCacheUtils.getCacheElementErrorString(alertConditionId, alertConditionOperator,
                        hiValueStr, loValue, nfe));
            }

            if (cacheElement != null) {
                addTo("measurementDataCache", measurementDataCache, rangeComposite.getScheduleId(), cacheElement,
                    alertConditionId, stats);

            }
        }
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.alert.composite.AlertConditionRangeCategoryComposite

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.