ssyoon90 | a98825a | 2015-08-26 00:48:15 +0900 | [diff] [blame] | 1 | /*
|
| 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 |
|
| 17 | package org.onosproject.net.statistic;
|
| 18 |
|
| 19 | import org.onosproject.net.ConnectPoint;
|
| 20 | import org.onosproject.net.flow.FlowEntry;
|
| 21 | import org.onosproject.net.flow.FlowRule;
|
| 22 |
|
| 23 | import java.util.Set;
|
| 24 |
|
| 25 | /**
|
| 26 | * Flow Store to house the computed statistics.
|
| 27 | */
|
| 28 | public 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 | }
|