Package com.codeforces.graygoose.model

Examples of com.codeforces.graygoose.model.Alert


            List<RuleAlertRelation> ruleAlertRelations = ruleAlertRelationDao.findAllByRule(ruleId);

            for (RuleAlertRelation ruleAlertRelation : ruleAlertRelations) {
                if (ruleAlertRelation.getMaxConsecutiveFailCount() <= currentConsecutiveFailCount) {
                    Alert alert = alertDao.find(ruleAlertRelation.getAlertId());

                    if (alert != null) {
                        List<AlertTriggerEvent> alertTriggersForLastHour =
                                alertTriggerEventDao.findAllByAlertForPeriod(
                                        alert.getId(), currentTimeMillis - TimeConstants.MILLIS_PER_HOUR, currentTimeMillis);
                        if (alertTriggersForLastHour.size() < alert.getMaxAlertCountPerHour()) {
                            neededAlerts.add(alert);
                        }
                    }
                }
            }
View Full Code Here


                for (Rule rule : rules) {
                    List<RuleAlertRelation> ruleAlertRelations = ruleAlertRelationDao.findAllByRule(rule.getId());
                    List<Alert> alerts = new ArrayList<>(ruleAlertRelations.size());

                    for (RuleAlertRelation ruleAlertRelation : ruleAlertRelations) {
                        Alert alert = alertDao.find(ruleAlertRelation.getAlertId());
                        alerts.add(alert);
                        failCountByAlertIdAndRuleIdConcatenation.put(
                                String.valueOf(alert.getId()) + '#' + rule.getId(),
                                String.valueOf(ruleAlertRelation.getMaxConsecutiveFailCount()));
                    }

                    alertsByRuleId.put(String.valueOf(rule.getId()), alerts);
                }
View Full Code Here

TOP

Related Classes of com.codeforces.graygoose.model.Alert

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.