MD-SAL Statistics Manager - Adding support for individual flow stats
[controller.git] / opendaylight / md-sal / statistics-manager / src / main / java / org / opendaylight / controller / md / statistics / manager / NodeStatistics.java
index c48ac311abb33dc0ffdfe5ee1ca4c3f26595111b..9c457f6df287ad7cb13d8866412e2ae1e9714964 100644 (file)
@@ -7,8 +7,12 @@
  */
 package org.opendaylight.controller.md.statistics.manager;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.aggregate.flow.statistics.AggregateFlowStatistics;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.group.features.GroupFeatures;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.desc.stats.reply.GroupDescStats;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.statistics.reply.GroupStats;
@@ -16,6 +20,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.nodes.node.MeterFeatures;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.config.stats.reply.MeterConfigStats;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.statistics.reply.MeterStats;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.GenericStatistics;
 
 public class NodeStatistics {
 
@@ -33,10 +38,14 @@ public class NodeStatistics {
     
     private MeterFeatures meterFeatures;
     
-    public NodeStatistics(){
-        
-    }
-
+    private final Map<Short,Map<Flow,GenericStatistics>> flowAndStatsMap= 
+            new HashMap<Short,Map<Flow,GenericStatistics>>();
+    
+    private final Map<Short,AggregateFlowStatistics> tableAndAggregateFlowStatsMap = 
+            new HashMap<Short,AggregateFlowStatistics>();
+    
+    public NodeStatistics(){}     
+    
     public NodeRef getTargetNode() {
         return targetNode;
     }
@@ -92,5 +101,13 @@ public class NodeStatistics {
     public void setMeterFeatures(MeterFeatures meterFeatures) {
         this.meterFeatures = meterFeatures;
     }
+
+    public Map<Short,Map<Flow,GenericStatistics>> getFlowAndStatsMap() {
+        return flowAndStatsMap;
+    }
+
+    public Map<Short, AggregateFlowStatistics> getTableAndAggregateFlowStatsMap() {
+        return tableAndAggregateFlowStatsMap;
+    }
     
 }