a2ab07ac7b6bc7249f44ca1c66415c731faf738c
[controller.git] / opendaylight / statisticsmanager / api / src / main / java / org / opendaylight / controller / statisticsmanager / IStatisticsManager.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.controller.statisticsmanager;
11
12 import java.util.List;
13 import java.util.Map;
14
15 import org.opendaylight.controller.forwardingrulesmanager.FlowEntry;
16 import org.opendaylight.controller.sal.core.Node;
17 import org.opendaylight.controller.sal.core.NodeConnector;
18 import org.opendaylight.controller.sal.core.NodeTable;
19 import org.opendaylight.controller.sal.reader.FlowOnNode;
20 import org.opendaylight.controller.sal.reader.NodeConnectorStatistics;
21 import org.opendaylight.controller.sal.reader.NodeDescription;
22 import org.opendaylight.controller.sal.reader.NodeTableStatistics;
23
24 /**
25  * Interface which defines the available methods for retrieving
26  * the network nodes statistics.
27  */
28 public interface IStatisticsManager {
29     /**
30      * Return all the statistics for all the flows present on the specified node in the current container context.
31      * If the context is the default container, the returned statistics are for all the flows installed on the node,
32      * regardless of the container they belong to
33      *
34      * @param node  the network node
35      * @return the list of flows installed on the network node
36      */
37     List<FlowOnNode> getFlows(Node node);
38
39     /**
40      * Returns the statistics for the flows specified in the list
41      *
42      * @param flows
43      * @return  the list of flows installed on the network node
44      */
45     Map<Node, List<FlowOnNode>> getFlowStatisticsForFlowList(
46             List<FlowEntry> flows);
47
48     /**
49      * Returns the number of flows installed on the switch in the current container context
50      * If the context is the default container, the returned value is the number of all the
51      * flows installed on the switch regardless of the container they belong to
52      *
53      * @param switchId
54      * @return
55      */
56     int getFlowsNumber(Node node);
57
58     /**
59      * Returns the node description for the specified node retrieved and cached by the
60      * protocol plugin component which collects the node statistics
61      *
62      * @param node
63      * @return
64      */
65     NodeDescription getNodeDescription(Node node);
66
67     /**
68      * Returns the statistics for the specified node connector as it was retrieved
69      * and cached by the protocol plugin component which collects the node connector statistics
70      *
71      * @param node
72      * @return
73      */
74     NodeConnectorStatistics getNodeConnectorStatistics(
75             NodeConnector nodeConnector);
76
77     /**
78      * Returns the statistics for all the node connector present on the specified network node
79      *
80      * @param node
81      * @return
82      */
83     List<NodeConnectorStatistics> getNodeConnectorStatistics(Node node);
84
85     /**
86      * Returns the statistics for the specified table of the node
87      *
88      * @param nodeTable
89      * @return
90      */
91     NodeTableStatistics getNodeTableStatistics(NodeTable nodeTable);
92
93     /**
94      * Returns the statistics for all the tables of the node
95      *
96      * @param nodeTable
97      * @return
98      */
99     List <NodeTableStatistics> getNodeTableStatistics(Node node);
100 }