if (alertConditionCategory == AlertConditionCategory.CHANGE) {
AlertConditionChangesCategoryComposite changesComposite = (AlertConditionChangesCategoryComposite) composite;
int scheduleId = changesComposite.getScheduleId();
try {
CallTimeDataCacheElement cacheElement = new CallTimeDataCacheElement(alertConditionOperator,
CallTimeElementValue.valueOf(alertCondition.getOption()), alertCondition.getComparator(),
alertCondition.getThreshold(), alertConditionId, alertCondition.getName());
addTo("callTimeDataCache", callTimeCache, scheduleId, cacheElement, alertConditionId, stats);
} catch (InvalidCacheElementException icee) {
log.info("Failed to create CallTimeDataCacheElement with parameters: "
+ AlertConditionCacheUtils.getCacheElementErrorString(alertConditionId, alertConditionOperator,
null, alertCondition.getThreshold(), icee));
}
} else if (alertConditionCategory == AlertConditionCategory.THRESHOLD) {
AlertConditionScheduleCategoryComposite thresholdComposite = (AlertConditionScheduleCategoryComposite) composite;
try {
CallTimeDataCacheElement cacheElement = new CallTimeDataCacheElement(alertConditionOperator,
CallTimeElementValue.valueOf(alertCondition.getOption()), null, alertCondition.getThreshold(),
alertConditionId, alertCondition.getName());
addTo("measurementDataCache", callTimeCache, thresholdComposite.getScheduleId(), cacheElement,
alertConditionId, stats);