3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
10 package org.opendaylight.controller.statisticsmanager;
12 import java.util.List;
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;
25 * Interface which defines the available methods for retrieving
26 * the network nodes statistics.
28 public interface IStatisticsManager {
30 * Return all the statistics for all the flows present on the specified node
31 * in the current container context. If the context is the default
32 * container, the returned statistics are for all the flows installed on the
33 * node, regardless of the container they belong to
37 * @return List of flows installed on the network node. Null if specified
38 * node is null. Empty list if node/stat is not present.
40 List<FlowOnNode> getFlows(Node node);
43 * Same as the getFlows method.
44 * The only difference is that this method does not return cached flows.
45 * It will always make a request to the node to get all the flows for that node.
46 * If the request times out or gets an error, we revert to getting the cached flows.
47 * @see IStatisticsManager#getFlows
49 * @return List of flows installed on the network node.
51 List<FlowOnNode> getFlowsNoCache(Node node);
54 * Returns the statistics for the flows specified in the list
57 * @return A map of flows per node installed on that node, empty map if
58 * flows is null/empty.
60 Map<Node, List<FlowOnNode>> getFlowStatisticsForFlowList(List<FlowEntry> flows);
63 * Returns the number of flows installed on the switch in the current
64 * container context If the context is the default container, the returned
65 * value is the number of all the flows installed on the switch regardless
66 * of the container they belong to
69 * @return number of flows on specified node or (-1) if node was not found
71 int getFlowsNumber(Node node);
74 * Returns the node description for the specified node retrieved by the
75 * protocol plugin component and cached by statistics manager.
76 * Null if node not found.
79 * @return node description
81 NodeDescription getNodeDescription(Node node);
84 * Returns the statistics for the specified node connector as it was
85 * retrieved by the protocol plugin component and cached by statistics
89 * @return Node connector statistics or null if requested stats was not
92 NodeConnectorStatistics getNodeConnectorStatistics(NodeConnector nodeConnector);
95 * Returns the statistics for all the node connector present on the
96 * specified network node
99 * @return List of node connector statistics. Null if node is null. Empty
100 * list if node/stats is not present.
102 List<NodeConnectorStatistics> getNodeConnectorStatistics(Node node);
105 * Returns the statistics for the specified table of the node
108 * @return Table statistics. Null if node table is null or stats not found.
110 NodeTableStatistics getNodeTableStatistics(NodeTable nodeTable);
113 * Returns the statistics for all the tables of the node
116 * @return List of table stats. Null if node is null. Empty list if
117 * node/stats not found.
119 List <NodeTableStatistics> getNodeTableStatistics(Node node);