OpenDaylight Controller functional modules.
[controller.git] / opendaylight / statisticsmanager / 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.reader.FlowOnNode;
19 import org.opendaylight.controller.sal.reader.NodeConnectorStatistics;
20 import org.opendaylight.controller.sal.reader.NodeDescription;
21
22 /**
23  * Interface which defines the available methods for retrieving
24  * the network nodes statistics.
25  */
26 public interface IStatisticsManager {
27     /**
28      * Return all the statistics for all the flows present on the specified node in the current container context.
29      * If the context is the default container, the returned statistics are for all the flows installed on the node,
30      * regardless of the container they belong to
31      *
32      * @param node      the network node
33      * @return the list of flows installed on the network node
34      */
35     List<FlowOnNode> getFlows(Node node);
36
37     /**
38      * Returns the statistics for the flows specified in the list
39      *
40      * @param flows
41      * @return  the list of flows installed on the network node
42      */
43     Map<Node, List<FlowOnNode>> getFlowStatisticsForFlowList(
44             List<FlowEntry> flows);
45
46     /**
47      * Returns the number of flows installed on the switch in the current container context
48      * If the context is the default container, the returned value is the number of all the
49      * flows installed on the switch regardless of the container they belong to
50      *
51      * @param switchId
52      * @return
53      */
54     int getFlowsNumber(Node node);
55
56     /**
57      * Returns the node description for the specified node retrieved and cached by the
58      * protocol plugin component which collects the node statistics
59      *
60      * @param node
61      * @return
62      */
63     NodeDescription getNodeDescription(Node node);
64
65     /**
66      * Returns the statistics for the specified node connector as it was retrieved
67      * and cached by the protocol plugin component which collects the node connector statistics
68      *
69      * @param node
70      * @return
71      */
72     NodeConnectorStatistics getNodeConnectorStatistics(
73             NodeConnector nodeConnector);
74
75     /**
76      * Returns the statistics for all the node connector present on the specified network node
77      *
78      * @param node
79      * @return
80      */
81     List<NodeConnectorStatistics> getNodeConnectorStatistics(Node node);
82 }