Add 'TableStatistics' to SAL and Northbound Statistics API.
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / reader / IReadService.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.sal.reader;
11
12 import java.util.List;
13
14 import org.opendaylight.controller.sal.core.Node;
15 import org.opendaylight.controller.sal.core.NodeConnector;
16 import org.opendaylight.controller.sal.core.NodeTable;
17 import org.opendaylight.controller.sal.flowprogrammer.Flow;
18
19 /**
20  * Interface for retrieving the network node's flow/port/queue hardware view
21  *
22  *
23  *
24  */
25 public interface IReadService {
26     /**
27      * Get the hardware view for the specified flow on the specified network node
28      *
29      * @param node
30      * @param flow
31      */
32     FlowOnNode readFlow(Node node, Flow flow);
33
34     /**
35      * Get the hardware view for the specified flow on the specified network node
36      * This call results in a direct polling of the information from the node
37      * Caller will be blocked until node replies or request times out
38      *
39      * @param node
40      * @param flow
41      */
42     FlowOnNode nonCachedReadFlow(Node node, Flow flow);
43
44     /**
45      * Get the hardware view for all the flows installed on the network node
46      *
47      * @param node
48      * @return
49      */
50     List<FlowOnNode> readAllFlows(Node node);
51
52     /**
53      * Get the hardware view for all the flows installed on the network node
54      * This call results in a direct polling of the information from the node
55      * Caller will be blocked until node replies or request times out
56      *
57      * @param node
58      * @param flow
59      */
60     List<FlowOnNode> nonCachedReadAllFlows(Node node);
61
62     /**
63      * Get the description information for the network node
64      * @param node
65      * @return
66      */
67     NodeDescription readDescription(Node node);
68
69     /**
70      * Get the description information for the network node
71      * This call results in a direct polling of the information from the node
72      * Caller will be blocked until node replies or request times out
73      *
74      * @param node
75      * @return
76      */
77     NodeDescription nonCachedReadDescription(Node node);
78
79     /**
80      * Get the hardware view for the specified node connector
81      * @param connector
82      */
83     NodeConnectorStatistics readNodeConnector(NodeConnector connector);
84
85     /**
86      * Get the hardware view for all the node connectors
87      * present on the specified network node
88      * @param connector
89      */
90     List<NodeConnectorStatistics> readNodeConnectors(Node node);
91
92     /**
93      * Read the Table statistics for the given node table
94      * @param table
95      */
96     NodeTableStatistics readNodeTable(NodeTable table);
97
98     /**
99      * Read the Table statistics for the given node
100      * This is not used. Querying all tables on a node is not currently a feature.
101      * @param table
102      */
103     List<NodeTableStatistics> readNodeTable(Node node);
104
105     /**
106      * Get the table statistics for the given node table
107      * This call results in a direct polling of the information from the node
108      * Caller will be blocked until the node replies or request times out
109      *
110      * @param table
111      */
112     NodeTableStatistics nonCachedReadNodeTable(NodeTable table);
113
114     /**
115      * Get the node connectors statistics information for the network node
116      * This call results in a direct polling of the information from the node
117      * Caller will be blocked until node replies or request times out
118      *
119      * @param node
120      * @return
121      */
122     List<NodeConnectorStatistics> nonCachedReadNodeConnectors(Node node);
123
124     /**
125      * Get the node connectors statistics information for the network node
126      *
127      * @param node
128      * @return
129      */
130     NodeConnectorStatistics nonCachedReadNodeConnector(NodeConnector connector);
131
132     /**
133      * Get the transmit rate for the specified node connector
134      *
135      * @param connector
136      * @return tx rate [bps]
137      */
138     long getTransmitRate(NodeConnector connector);
139
140 }