Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 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 | |
Ray Milkey | a695719 | 2017-06-01 13:04:16 -0700 | [diff] [blame] | 19 | import java.util.List; |
| 20 | import java.util.Map; |
| 21 | |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 22 | import org.onosproject.net.ConnectPoint; |
| 23 | import org.onosproject.net.Device; |
| 24 | import org.onosproject.net.PortNumber; |
Sangsik Yoon | b1b823f | 2016-05-16 18:55:39 +0900 | [diff] [blame] | 25 | import org.onosproject.net.flow.FlowEntry; |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 26 | import org.onosproject.net.flow.instructions.Instruction; |
| 27 | |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 28 | /** |
| 29 | * Service for obtaining individual flow statistic information about device and link in the system. |
| 30 | * Basic statistics are obtained from the StatisticService |
| 31 | */ |
| 32 | public interface FlowStatisticService { |
| 33 | |
| 34 | /** |
| 35 | * Obtain the summary load list for the device with the given link. |
| 36 | * |
| 37 | * @param device the Device to query. |
| 38 | * @return map of summary flow entry load |
| 39 | */ |
| 40 | Map<ConnectPoint, SummaryFlowEntryWithLoad> loadSummary(Device device); |
| 41 | |
| 42 | /** |
| 43 | * Obtain the summary load for the device with the given link or port. |
| 44 | * |
| 45 | * @param device the Device to query. |
| 46 | * @param pNumber the port number to query. |
| 47 | * @return summary flow entry load |
| 48 | */ |
| 49 | SummaryFlowEntryWithLoad loadSummary(Device device, PortNumber pNumber); |
| 50 | |
| 51 | /** |
| 52 | * Obtain the set of the flow type and load list for the device with the given link. |
| 53 | * |
| 54 | * @param device the Device to query. |
| 55 | * @param liveType the FlowLiveType to filter, null means no filtering . |
| 56 | * @param instType the InstructionType to filter, null means no filtering. |
| 57 | * @return map of flow entry load |
| 58 | */ |
Sangsik Yoon | b1b823f | 2016-05-16 18:55:39 +0900 | [diff] [blame] | 59 | Map<ConnectPoint, List<FlowEntryWithLoad>> loadAllByType(Device device, |
| 60 | FlowEntry.FlowLiveType liveType, |
| 61 | Instruction.Type instType); |
| 62 | |
| 63 | /** |
| 64 | * Obtain the flow type and load list for the device with the given link or port. |
| 65 | * |
| 66 | * @param device the Device to query. |
| 67 | * @param pNumber the port number of the Device to query |
| 68 | * @param liveType the FlowLiveType to filter, null means no filtering . |
| 69 | * @param instType the InstructionType to filter, null means no filtering. |
| 70 | * @return list of flow entry load |
| 71 | */ |
| 72 | List<FlowEntryWithLoad> loadAllByType(Device device, |
| 73 | PortNumber pNumber, |
| 74 | FlowEntry.FlowLiveType liveType, |
| 75 | Instruction.Type instType); |
| 76 | |
| 77 | /** |
| 78 | * Obtain the set of the flow type and load topn list for the device with the given link. |
| 79 | * |
| 80 | * @param device the Device to query. |
| 81 | * @param liveType the FlowLiveType to filter, null means no filtering . |
| 82 | * @param instType the InstructionType to filter, null means no filtering. |
| 83 | * @param topn the top number to filter, null means no filtering. |
| 84 | * @return map of flow entry load |
| 85 | */ |
| 86 | Map<ConnectPoint, List<FlowEntryWithLoad>> loadTopnByType(Device device, |
| 87 | FlowEntry.FlowLiveType liveType, |
| 88 | Instruction.Type instType, |
| 89 | int topn); |
| 90 | |
| 91 | /** |
| 92 | * Obtain the flow type and load topn list for the device with the given link or port. |
| 93 | * |
| 94 | * @param device the Device to query. |
| 95 | * @param pNumber the port number of the Device to query |
| 96 | * @param liveType the FlowLiveType to filter, null means no filtering . |
| 97 | * @param instType the InstructionType to filter, null means no filtering. |
| 98 | * @param topn the top n list entry |
| 99 | * @return list of flow entry load |
| 100 | */ |
| 101 | List<FlowEntryWithLoad> loadTopnByType(Device device, |
| 102 | PortNumber pNumber, |
| 103 | FlowEntry.FlowLiveType liveType, |
| 104 | Instruction.Type instType, |
| 105 | int topn); |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 106 | } |
| 107 | |
| 108 | |