try {
boolean retStatus;
if(oldLatch != null) {
- retStatus = oldLatch.await(this.latchTimeout, TimeUnit.SECONDS);
+ retStatus = oldLatch.await(StatisticsManager.latchTimeout, TimeUnit.SECONDS);
} else {
- retStatus = newLatch.await(this.latchTimeout, TimeUnit.SECONDS);
+ retStatus = newLatch.await(StatisticsManager.latchTimeout, TimeUnit.SECONDS);
}
// log the return code as it will give us, if
// the latch timed out.
@Override
public void nodeFlowStatisticsUpdated(Node node, List<FlowOnNode> flowStatsList) {
- List<FlowOnNode> currentStat = this.flowStatistics.get(node);
- // Update cache only if changed to avoid unnecessary cache sync operations
- if (! flowStatsList.equals(currentStat)){
- this.flowStatistics.put(node, flowStatsList);
- }
+ // No equality check because duration fields change constantly
+ this.flowStatistics.put(node, flowStatsList);
}
@Override