blob: 3c2aa89be9993ac26ab4c1da1b109fa2976b9a59 [file] [log] [blame]
ssyoon90a98825a2015-08-26 00:48:15 +09001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.net.statistic;
18
19import org.onosproject.net.ConnectPoint;
20import org.onosproject.net.flow.FlowEntry;
21import org.onosproject.net.flow.FlowRule;
22
23import java.util.Set;
24
25/**
26 * Flow Store to house the computed statistics.
27 */
28public interface FlowStatisticStore {
29 /**
30 * Remove entries associated with this rule.
31 *
32 * @param rule {@link org.onosproject.net.flow.FlowRule}
33 */
34 void removeFlowStatistic(FlowRule rule);
35
36 /**
37 * Adds a flow stats observation for a flow rule. The previous flow will be removed.
38 *
39 * @param rule a {@link org.onosproject.net.flow.FlowEntry}
40 */
41 void addFlowStatistic(FlowEntry rule);
42
43 /**
44 * Updates a stats observation for a flow rule. The old flow stats will be moved to previous stats.
45 *
46 * @param rule a {@link org.onosproject.net.flow.FlowEntry}
47 */
48 void updateFlowStatistic(FlowEntry rule);
49
50 /**
51 * Fetches the current observed flow stats values.
52 *
53 * @param connectPoint the port to fetch information for
54 * @return set of current flow rules
55 */
56 Set<FlowEntry> getCurrentFlowStatistic(ConnectPoint connectPoint);
57
58 /**
59 * Fetches the current observed flow stats values.
60 *
61 * @param connectPoint the port to fetch information for
62 * @return set of current values
63 */
64 Set<FlowEntry> getPreviousFlowStatistic(ConnectPoint connectPoint);
65}