private ConcurrentMap<Long, Boolean> switchSupportsVendorExtStats;
// Per port sampled (every portStatsPeriod) transmit rate
private Map<Long, Map<Short, TxRates>> txRates;
- private Set<IOFStatisticsListener> statisticsListeners;
+ private Set<IOFStatisticsListener> statisticsListeners = new CopyOnWriteArraySet<IOFStatisticsListener>();
/**
* The object containing the latest factoredSamples tx rate samples for a
switchPortStatsUpdated = new LinkedBlockingQueue<Long>(INITIAL_SIZE);
switchSupportsVendorExtStats = new ConcurrentHashMap<Long, Boolean>(INITIAL_SIZE);
txRates = new HashMap<Long, Map<Short, TxRates>>(INITIAL_SIZE);
- statisticsListeners = new CopyOnWriteArraySet<IOFStatisticsListener>();
configStatsPollIntervals();
// Initialize managed timers
- statisticsTimer = new Timer();
+ statisticsTimer = new Timer("Statistics Timer Ticks");
statisticsTimerTask = new TimerTask() {
@Override
public void run() {
} catch (InterruptedException e) {
log.warn("Flow Statistics Collector thread "
+ "interrupted", e);
+ return;
}
}
}
updatePortsTxRate(switchId);
} catch (InterruptedException e) {
log.warn("TX Rate Updater thread interrupted", e);
+ return;
}
}
}
*
*/
void destroy() {
+ statisticsListeners.clear();
}
/**