Move adsal into its own subdirectory.
[controller.git] / opendaylight / adsal / 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  * This interface defines methods for retrieving the network node's
21  * flow/port/queue hardware view
22  */
23 public interface IReadService {
24     /**
25      * Get the hardware view for the specified flow on the specified network
26      * node
27      *
28      * @param node
29      *            the network node
30      *            {@link org.opendaylight.controller.sal.core.Node}
31      * @param flow
32      *            the given flow
33      *            {@link org.opendaylight.controller.sal.flowprogrammer.Flow}
34      * @return the flow
35      *         {@link org.opendaylight.controller.sal.reader.FlowOnNode}
36      *         installed on the node
37      */
38     FlowOnNode readFlow(Node node, Flow flow);
39
40     /**
41      * Get the hardware view for the specified flow on the specified network node
42      * This call results in a direct polling of the information from the node
43      * Caller will be blocked until node replies or request times out
44      *
45      * @param node
46      *            the network node
47      *            {@link org.opendaylight.controller.sal.core.Node}
48      * @param flow
49      *            the given flow
50      *            {@link org.opendaylight.controller.sal.flowprogrammer.Flow}
51      * @return the flow
52      *         {@link org.opendaylight.controller.sal.reader.FlowOnNode}
53      *         installed on the node
54      */
55     FlowOnNode nonCachedReadFlow(Node node, Flow flow);
56
57     /**
58      * Get the hardware view for all the flows installed on the network node
59      *
60      * @param node
61      *            the network node
62      *            {@link org.opendaylight.controller.sal.core.Node}
63      * @return all the flows
64      *         {@link org.opendaylight.controller.sal.reader.FlowOnNode}
65      *         installed on the node
66      */
67     List<FlowOnNode> readAllFlows(Node node);
68
69     /**
70      * Get the hardware view for all the flows installed on 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      *            the network node
76      *            {@link org.opendaylight.controller.sal.core.Node}
77      * @return the hardware view of all the flows
78      *         {@link org.opendaylight.controller.sal.reader.FlowOnNode}
79      *         installed on the node
80      */
81     List<FlowOnNode> nonCachedReadAllFlows(Node node);
82
83     /**
84      * Get the description information for the network node
85      *
86      * @param node
87      *            the network node
88      *            {@link org.opendaylight.controller.sal.core.Node}
89      * @return the node description
90      *         {@link org.opendaylight.controller.sal.reader.NodeDescription}
91      */
92     NodeDescription readDescription(Node node);
93
94     /**
95      * Get the description information for the network node
96      * This call results in a direct polling of the information from the node
97      * Caller will be blocked until node replies or request times out
98      *
99      * @param node
100      *            the network node
101      *            {@link org.opendaylight.controller.sal.core.Node}
102      * @return the node description
103      *         {@link org.opendaylight.controller.sal.reader.NodeDescription}
104      */
105     NodeDescription nonCachedReadDescription(Node node);
106
107     /**
108      * Get the hardware view for the specified node connector
109      *
110      * @param connector
111      *            the given node connector
112      *            {@link org.opendaylight.controller.sal.core.NodeConnector}
113      * @return the node connector statistics
114      *         {@link org.opendaylight.controller.sal.reader.NodeConnectorStatistics}
115      */
116     NodeConnectorStatistics readNodeConnector(NodeConnector connector);
117
118     /**
119      * Get the hardware view for all the node connectors
120      * present on the specified network node
121      *
122      * @param node
123      *            the network node
124      *            {@link org.opendaylight.controller.sal.core.Node}
125      * @return the statistics for all the node connectors
126      *         {@link org.opendaylight.controller.sal.reader.NodeConnectorStatistics}
127      */
128     List<NodeConnectorStatistics> readNodeConnectors(Node node);
129
130     /**
131      * Read the Table statistics for the given node table
132      *
133      * @param table
134      *            the table
135      *            {@link org.opendaylight.controller.sal.core.NodeTable}
136      * @return the table statistics
137      *         {@link org.opendaylight.controller.sal.reader.NodeTableStatistics}
138      */
139     NodeTableStatistics readNodeTable(NodeTable table);
140
141     /**
142      * Read the Table statistics for the given node This is not used. Querying
143      * all tables on a node is not currently a feature.
144      *
145      * @param node
146      *            the network node
147      *            {@link org.opendaylight.controller.sal.core.Node}
148      * @return the table statistics
149      *         {@link org.opendaylight.controller.sal.reader.NodeTableStatistics}
150      *         for all tables in a given node
151      */
152     List<NodeTableStatistics> readNodeTable(Node node);
153
154     /**
155      * Get the table statistics for the given node table
156      * This call results in a direct polling of the information from the node
157      * Caller will be blocked until the node replies or request times out
158      *
159      * @param table
160      *            the table
161      *            {@link org.opendaylight.controller.sal.core.NodeTable}
162      * @return the table statistics
163      *         {@link org.opendaylight.controller.sal.reader.NodeTableStatistics}
164      */
165     NodeTableStatistics nonCachedReadNodeTable(NodeTable table);
166
167     /**
168      * Get the node connectors statistics information for the network node
169      * This call results in a direct polling of the information from the node
170      * Caller will be blocked until node replies or request times out
171      *
172      * @param node
173      *            the network node
174      *            {@link org.opendaylight.controller.sal.core.Node}
175      * @return the statistics
176      *         {@link org.opendaylight.controller.sal.reader.NodeConnectorStatistics}
177      *         for all node connectors in a given node
178      */
179     List<NodeConnectorStatistics> nonCachedReadNodeConnectors(Node node);
180
181     /**
182      * Get the node connectors statistics information for the network node
183      *
184      * @param connector
185      *            the given node connector
186      *            {@link org.opendaylight.controller.sal.core.NodeConnector}
187      * @return the node connector statistics
188      *         {@link org.opendaylight.controller.sal.reader.NodeConnectorStatistics}
189      */
190     NodeConnectorStatistics nonCachedReadNodeConnector(NodeConnector connector);
191
192     /**
193      * Get the transmit rate for the specified node connector
194      *
195      * @param connector
196      *            the given node connector
197      *            {@link org.opendaylight.controller.sal.core.NodeConnector}
198      * @return tx rate [bps]
199      */
200     long getTransmitRate(NodeConnector connector);
201
202 }