package org.opendaylight.controller.protocol_plugin.openflow.internal;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ConcurrentSkipListSet;
import org.opendaylight.controller.protocol_plugin.openflow.IOFStatisticsListener;
import org.opendaylight.controller.protocol_plugin.openflow.IOFStatisticsManager;
switch (type) {
case ADDED:
if (!containerToNc.containsKey(containerName)) {
- containerToNc.put(containerName, new ConcurrentSkipListSet<NodeConnector>());
+ containerToNc.put(containerName,
+ Collections.newSetFromMap(new ConcurrentHashMap<NodeConnector,Boolean>()));
}
containerToNc.get(containerName).add(p);
if (!containerToNode.containsKey(containerName)) {
nodeSet.remove(node);
}
}
-
}
break;
case CHANGED:
flowOnNodeList = filterFlowListPerContainer(container, node, flowOnNodeList);
// notify listeners
- if (!flowOnNodeList.isEmpty()) {
- l.getValue().nodeFlowStatisticsUpdated(node, flowOnNodeList);
- }
+ l.getValue().nodeFlowStatisticsUpdated(node, flowOnNodeList);
}
}
.getNodeConnectorStatsList();
// notify listeners
- if (!ncStatsList.isEmpty()) {
- l.getValue().nodeConnectorStatisticsUpdated(node, ncStatsList);
- }
+ l.getValue().nodeConnectorStatisticsUpdated(node, ncStatsList);
+
}
}
.getNodeTableStatsList();
// notify listeners
- if (!tableStatsList.isEmpty()) {
- l.getValue().nodeTableStatisticsUpdated(node, tableStatsList);
- }
+ l.getValue().nodeTableStatisticsUpdated(node, tableStatsList);
}
}
}