2 * Copyright IBM Corporation, 2013. All rights reserved.
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
8 package org.opendaylight.controller.md.statistics.manager;
10 import java.util.HashMap;
11 import java.util.List;
13 import java.util.concurrent.ConcurrentHashMap;
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;
31 public class NodeStatistics {
33 private NodeRef targetNode;
35 private List<GroupStats> groupStatistics;
37 private List<MeterStats> meterStatistics;
39 private List<GroupDescStats> groupDescStats;
41 private List<MeterConfigStats> meterConfigStats;
43 private GroupFeatures groupFeatures;
45 private MeterFeatures meterFeatures;
47 private final Map<Short,Map<Flow,GenericStatistics>> flowAndStatsMap=
48 new HashMap<Short,Map<Flow,GenericStatistics>>();
50 private final Map<Short,AggregateFlowStatistics> tableAndAggregateFlowStatsMap =
51 new HashMap<Short,AggregateFlowStatistics>();
53 private final Map<NodeConnectorId,NodeConnectorStatistics> nodeConnectorStats =
54 new ConcurrentHashMap<NodeConnectorId,NodeConnectorStatistics>();
56 private final Map<Short,GenericTableStatistics> flowTableAndStatisticsMap =
57 new HashMap<Short,GenericTableStatistics>();
59 private final Map<NodeConnectorId,Map<QueueId,GenericQueueStatistics>> NodeConnectorAndQueuesStatsMap =
60 new HashMap<NodeConnectorId,Map<QueueId,GenericQueueStatistics>>();
62 public NodeStatistics(){
66 public NodeRef getTargetNode() {
70 public void setTargetNode(NodeRef targetNode) {
71 this.targetNode = targetNode;
74 public List<GroupStats> getGroupStatistics() {
75 return groupStatistics;
78 public void setGroupStatistics(List<GroupStats> groupStatistics) {
79 this.groupStatistics = groupStatistics;
82 public List<MeterStats> getMeterStatistics() {
83 return meterStatistics;
86 public void setMeterStatistics(List<MeterStats> meterStatistics) {
87 this.meterStatistics = meterStatistics;
90 public List<GroupDescStats> getGroupDescStats() {
91 return groupDescStats;
94 public void setGroupDescStats(List<GroupDescStats> groupDescStats) {
95 this.groupDescStats = groupDescStats;
98 public List<MeterConfigStats> getMeterConfigStats() {
99 return meterConfigStats;
102 public void setMeterConfigStats(List<MeterConfigStats> meterConfigStats) {
103 this.meterConfigStats = meterConfigStats;
106 public GroupFeatures getGroupFeatures() {
107 return groupFeatures;
110 public void setGroupFeatures(GroupFeatures groupFeatures) {
111 this.groupFeatures = groupFeatures;
114 public MeterFeatures getMeterFeatures() {
115 return meterFeatures;
118 public void setMeterFeatures(MeterFeatures meterFeatures) {
119 this.meterFeatures = meterFeatures;
122 public Map<Short,Map<Flow,GenericStatistics>> getFlowAndStatsMap() {
123 return flowAndStatsMap;
126 public Map<Short, GenericTableStatistics> getFlowTableAndStatisticsMap() {
127 return flowTableAndStatisticsMap;
130 public Map<Short, AggregateFlowStatistics> getTableAndAggregateFlowStatsMap() {
131 return tableAndAggregateFlowStatsMap;
133 public Map<NodeConnectorId, NodeConnectorStatistics> getNodeConnectorStats() {
134 return nodeConnectorStats;
137 public Map<NodeConnectorId, Map<QueueId, GenericQueueStatistics>> getNodeConnectorAndQueuesStatsMap() {
138 return NodeConnectorAndQueuesStatsMap;