use of com.navercorp.pinpoint.web.alarm.DataCollectorFactory.DataCollectorCategory in project pinpoint by naver.
the class AlarmReader method addChecker.
private void addChecker(Application application) {
List<Rule> rules = alarmService.selectRuleByApplicationId(application.getName());
long timeSlotEndTime = System.currentTimeMillis();
Map<DataCollectorCategory, DataCollector> collectorMap = new HashMap<>();
for (Rule rule : rules) {
CheckerCategory checkerCategory = CheckerCategory.getValue(rule.getCheckerName());
DataCollector collector = collectorMap.get(checkerCategory.getDataCollectorCategory());
if (collector == null) {
collector = dataCollectorFactory.createDataCollector(checkerCategory, application, timeSlotEndTime);
collectorMap.put(collector.getDataCollectorCategory(), collector);
}
AlarmChecker checker = checkerCategory.createChecker(collector, rule);
checkers.add(checker);
}
}
Aggregations