@Override public void handleNotification(StatisticsNotification notification) { decreasePrevValues(statsMap); for (StatisticId statId : notification) { StatisticDescriptor descriptor = statId.getStatisticDescriptor(); String name = descriptor.getName(); Number value; try { value = notification.getValue(statId); } catch (StatisticNotFoundException e) { value = 0; } log(name,value); increaseStats(name, value); statsMap.put(name, value); } }
@Override public void handleNotification(StatisticsNotification notification) { decreasePrevValues(statsMap); for (StatisticId statId : notification) { StatisticDescriptor descriptor = statId.getStatisticDescriptor(); String name = descriptor.getName(); Number value; try { value = notification.getValue(statId); } catch (StatisticNotFoundException e) { value = 0; } log(name,value); increaseStats(name, value); statsMap.put(name, value); } }