alshabib | a43aa25 | 2014-10-21 21:36:41 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.statistic; |
| 2 | |
| 3 | import org.onlab.onos.net.ConnectPoint; |
| 4 | import org.onlab.onos.net.flow.FlowEntry; |
| 5 | import org.onlab.onos.net.flow.FlowRule; |
| 6 | |
| 7 | import java.util.Set; |
| 8 | |
| 9 | /** |
| 10 | * Store to house the computed statistics. |
| 11 | */ |
| 12 | public 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 | } |