Map<String, AtomicLong> sizes = state.getMessageSizes();
for (Entry<String, AtomicLong> entry : totals.entrySet()) {
String domain = entry.getKey();
long value = entry.getValue().get();
ProcessDomain processDomain = machine.findOrCreateProcessDomain(domain);
Detail detail = processDomain.findOrCreateDetail(start);
processDomain.setTotal(value + processDomain.getTotal());
detail.setTotal(value + detail.getTotal());
}
for (Entry<String, AtomicLong> entry : totalLosses.entrySet()) {
String domain = entry.getKey();
long value = entry.getValue().get();
ProcessDomain processDomain = machine.findOrCreateProcessDomain(domain);
Detail detail = processDomain.findOrCreateDetail(start);
processDomain.setTotalLoss(value + processDomain.getTotalLoss());
detail.setTotalLoss(value + detail.getTotalLoss());
}
for (Entry<String, AtomicLong> entry : sizes.entrySet()) {
String domain = entry.getKey();
long value = entry.getValue().get();
ProcessDomain processDomain = machine.findOrCreateProcessDomain(domain);
Detail detail = processDomain.findOrCreateDetail(start);
processDomain.setSize(value + processDomain.getSize());
detail.setSize(value + detail.getSize());
}
long messageTotal = state.getMessageTotal();
long messageTotalLoss = state.getMessageTotalLoss();