@Override public void visitEntry(Entry entry) { String type = entry.getType(); String status = entry.getStatus(); status = m_aggregationManger.handle(AggregationConfigManager.PROBLEM_TYPE, m_domain, status); m_currentEntry = findOrCreatEntry(m_currentMachine, type, status); super.visitEntry(entry); }
protected Entry findOrCreatEntry(Machine machine, String type, String status) { List<Entry> entries = machine.getEntries(); for (Entry entry : entries) { if (entry.getType().equals(type) && entry.getStatus().equals(status)) { return entry; } } Entry entry = new Entry(); entry.setStatus(status); entry.setType(type); entries.add(entry); return entry; }
@Override public void visitThread(JavaThread thread) { m_currentThread = m_currentEntry.findOrCreateThread(thread.getId()); super.visitThread(thread); }
@Override public void visitDuration(Duration duration) { int value = duration.getValue(); Duration temp = m_currentEntry.findOrCreateDuration(value); mergeDuration(temp, duration); }