- NodeStatisticsAger ager = statisticsCache.get(nodeId);
- if (ager == null) {
- ager = new NodeStatisticsAger(this, new NodeKey(nodeId));
- statisticsCache.put(nodeId, ager);
- }
-
- return ager;
- }
-
- private List<Node> getAllConnectedNodes(){
- Nodes nodes = (Nodes) dps.readOperationalData(nodesIdentifier);
- if(nodes == null)
- return null;
-
- spLogger.debug("Number of connected nodes : {}",nodes.getNode().size());
- return nodes.getNode();
- }
-
- private List<Short> getTablesFromNode(NodeKey nodeKey){
- InstanceIdentifier<FlowCapableNode> nodesIdentifier = InstanceIdentifier.builder(Nodes.class).child(Node.class,nodeKey).augmentation(FlowCapableNode.class).toInstance();
-
- FlowCapableNode node = (FlowCapableNode)dps.readOperationalData(nodesIdentifier);
- List<Short> tablesId = new ArrayList<Short>();
- if(node != null && node.getTable()!=null){
- spLogger.debug("Number of tables {} supported by node {}",node.getTable().size(),nodeKey);
- for(Table table: node.getTable()){
- tablesId.add(table.getId());
- }
+ NodeStatisticsHandler handler = handlers.get(nodeId);
+ if (handler == null) {
+ spLogger.info("Attempted to get non-existing handler for {}", nodeId);