blob: b1809d77f07ce81193abb57e7181868074e238b7 [file] [log] [blame]
alshabiba43aa252014-10-21 21:36:41 -07001package org.onlab.onos.net.statistic;
2
3import org.onlab.onos.net.ConnectPoint;
4import org.onlab.onos.net.Link;
5import org.onlab.onos.net.Path;
6import org.onlab.onos.net.flow.FlowRule;
7
8/**
9 * Service for obtaining statistic information about link in the system.
10 * Statistics are obtained from the FlowRuleService in order to minimize the
11 * amount of hammering occuring at the dataplane.
12 */
13public interface StatisticService {
14
15 /**
16 * Obtain the load for a the ingress to the given link.
17 * @param link the link to query.
18 * @return a {@link org.onlab.onos.net.statistic.Load Load}
19 */
20 Load load(Link link);
21
22 /**
23 * Obtain the load for the given port.
24 * @param connectPoint the port to query
25 * @return a {@link org.onlab.onos.net.statistic.Load}
26 */
27 Load load(ConnectPoint connectPoint);
28
29 /**
30 * Find the most loaded link along a path.
31 * @param path the path to search in
32 * @return the most loaded {@link org.onlab.onos.net.Link}.
33 */
34 Link max(Path path);
35
36 /**
37 * Find the least loaded link along a path.
38 * @param path the path to search in
39 * @return the least loaded {@link org.onlab.onos.net.Link}.
40 */
41 Link min(Path path);
42
43 /**
44 * Returns the highest hitter (a flow rule) of for a given port, ie. the
45 * flow rule which is generating the most load.
46 * @param connectPoint the port
47 * @return the flow rule
48 */
49 FlowRule highestHitter(ConnectPoint connectPoint);
50
51}