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

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


                log.info("Failed to create MeasurementNumericCacheElement with parameters: "
                    + AlertConditionCacheUtils.getCacheElementErrorString(alertConditionId, alertConditionOperator,
                        null, numeric, icee));
            }
        } else if (alertConditionCategory == AlertConditionCategory.TRAIT) {
            AlertConditionTraitCategoryComposite traitsComposite = (AlertConditionTraitCategoryComposite) composite;
            String value = null;

            switch (alertConditionOperator) {
            case CHANGES:
                value = traitsComposite.getValue();
                break;
            case REGEX:
                value = traitsComposite.getCondition().getOption();
                break;
            default:
                log.error("Invalid operator for Trait condition: " + alertConditionOperator);
            }

            try {
                /*
                 * don't forget special defensive handling to allow for null trait calculation;
                 * this might happen if a newly committed resource has some alert template applied to
                 * it for some trait that it has not yet gotten from the agent
                 */
                MeasurementTraitCacheElement cacheElement = new MeasurementTraitCacheElement(alertConditionOperator,
                    value, alertConditionId);

                addTo("measurementTraitCache", measurementTraitCache, traitsComposite.getScheduleId(), cacheElement,
                    alertConditionId, stats);
            } catch (InvalidCacheElementException icee) {
                log.info("Failed to create MeasurementTraitCacheElement with parameters: "
                    + AlertConditionCacheUtils.getCacheElementErrorString(alertConditionId, alertConditionOperator,
                        null, value, icee));
View Full Code Here

TOP

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

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.