MD-SAL Statistics Manager: Added support for queue statistics collection
[controller.git] / opendaylight / md-sal / statistics-manager / src / main / java / org / opendaylight / controller / md / statistics / manager / NodeStatistics.java
1 /*
2  * Copyright IBM Corporation, 2013.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.md.statistics.manager;
9
10 import java.util.HashMap;
11 import java.util.List;
12 import java.util.Map;
13 import java.util.concurrent.ConcurrentHashMap;
14
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.aggregate.flow.statistics.AggregateFlowStatistics;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.queue.rev130925.QueueId;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.group.features.GroupFeatures;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.desc.stats.reply.GroupDescStats;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.statistics.reply.GroupStats;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.nodes.node.MeterFeatures;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.config.stats.reply.MeterConfigStats;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.statistics.reply.MeterStats;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.GenericQueueStatistics;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.GenericStatistics;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.GenericTableStatistics;
29 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.NodeConnectorStatistics;
30
31 public class NodeStatistics {
32
33     private NodeRef targetNode;
34     
35     private List<GroupStats> groupStatistics;
36     
37     private List<MeterStats> meterStatistics;
38     
39     private List<GroupDescStats> groupDescStats;
40     
41     private List<MeterConfigStats> meterConfigStats;
42     
43     private GroupFeatures groupFeatures;
44     
45     private MeterFeatures meterFeatures;
46     
47     private final Map<Short,Map<Flow,GenericStatistics>> flowAndStatsMap= 
48             new HashMap<Short,Map<Flow,GenericStatistics>>();
49     
50     private final Map<Short,AggregateFlowStatistics> tableAndAggregateFlowStatsMap = 
51             new HashMap<Short,AggregateFlowStatistics>();
52     
53     private final Map<NodeConnectorId,NodeConnectorStatistics> nodeConnectorStats = 
54             new ConcurrentHashMap<NodeConnectorId,NodeConnectorStatistics>();
55     
56     private final Map<Short,GenericTableStatistics> flowTableAndStatisticsMap = 
57             new HashMap<Short,GenericTableStatistics>();
58     
59     private final Map<NodeConnectorId,Map<QueueId,GenericQueueStatistics>> NodeConnectorAndQueuesStatsMap = 
60             new HashMap<NodeConnectorId,Map<QueueId,GenericQueueStatistics>>();
61     
62     public NodeStatistics(){
63         
64     }
65
66     public NodeRef getTargetNode() {
67         return targetNode;
68     }
69
70     public void setTargetNode(NodeRef targetNode) {
71         this.targetNode = targetNode;
72     }
73
74     public List<GroupStats> getGroupStatistics() {
75         return groupStatistics;
76     }
77
78     public void setGroupStatistics(List<GroupStats> groupStatistics) {
79         this.groupStatistics = groupStatistics;
80     }
81
82     public List<MeterStats> getMeterStatistics() {
83         return meterStatistics;
84     }
85
86     public void setMeterStatistics(List<MeterStats> meterStatistics) {
87         this.meterStatistics = meterStatistics;
88     }
89
90     public List<GroupDescStats> getGroupDescStats() {
91         return groupDescStats;
92     }
93
94     public void setGroupDescStats(List<GroupDescStats> groupDescStats) {
95         this.groupDescStats = groupDescStats;
96     }
97
98     public List<MeterConfigStats> getMeterConfigStats() {
99         return meterConfigStats;
100     }
101
102     public void setMeterConfigStats(List<MeterConfigStats> meterConfigStats) {
103         this.meterConfigStats = meterConfigStats;
104     }
105
106     public GroupFeatures getGroupFeatures() {
107         return groupFeatures;
108     }
109
110     public void setGroupFeatures(GroupFeatures groupFeatures) {
111         this.groupFeatures = groupFeatures;
112     }
113
114     public MeterFeatures getMeterFeatures() {
115         return meterFeatures;
116     }
117
118     public void setMeterFeatures(MeterFeatures meterFeatures) {
119         this.meterFeatures = meterFeatures;
120     }
121
122     public Map<Short,Map<Flow,GenericStatistics>> getFlowAndStatsMap() {
123         return flowAndStatsMap;
124     }
125
126     public Map<Short, GenericTableStatistics> getFlowTableAndStatisticsMap() {
127         return flowTableAndStatisticsMap;
128     }
129
130     public Map<Short, AggregateFlowStatistics> getTableAndAggregateFlowStatsMap() {
131         return tableAndAggregateFlowStatsMap;
132     }
133     public Map<NodeConnectorId, NodeConnectorStatistics> getNodeConnectorStats() {
134         return nodeConnectorStats;
135     }
136
137     public Map<NodeConnectorId, Map<QueueId, GenericQueueStatistics>> getNodeConnectorAndQueuesStatsMap() {
138         return NodeConnectorAndQueuesStatsMap;
139     }
140 }