blob: d0d625ccfefafdeda5af240f8e3bb5d2e41737b1 [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.flow.FlowEntry;
5import org.onlab.onos.net.flow.FlowRule;
6
7import java.util.Set;
8
9/**
10 * Store to house the computed statistics.
11 */
12public interface StatisticStore {
13
14 /**
15 * Lay the foundation for receiving flow stats for this rule.
16 * @param rule a {@link org.onlab.onos.net.flow.FlowRule}
17 */
18 void prepareForStatistics(FlowRule rule);
19
20 /**
21 * Remove entries associated with this rule.
22 a @param rule {@link org.onlab.onos.net.flow.FlowRule}
23 */
24 void removeFromStatistics(FlowRule rule);
25
26 /**
27 * Adds a stats observation for a flow rule.
28 * @param rule a {@link org.onlab.onos.net.flow.FlowEntry}
29 */
30 void addOrUpdateStatistic(FlowEntry rule);
31
32 /**
33 * Fetches the current observed stats values.
34 * @param connectPoint the port to fetch information for
35 * @return set of current flow rules
36 */
37 Set<FlowEntry> getCurrentStatistic(ConnectPoint connectPoint);
38
39 /**
40 * Fetches the current observed stats values.
41 * @param connectPoint the port to fetch information for
42 * @return set of current values
43 */
44 Set<FlowEntry> getPreviousStatistic(ConnectPoint connectPoint);
45}