Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
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 | |
| 19 | import org.onosproject.net.ConnectPoint; |
| 20 | import org.onosproject.net.Device; |
| 21 | import org.onosproject.net.PortNumber; |
Sangsik Yoon | b1b823f | 2016-05-16 18:55:39 +0900 | [diff] [blame] | 22 | import org.onosproject.net.flow.FlowEntry; |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 23 | import org.onosproject.net.flow.TypedStoredFlowEntry; |
| 24 | import org.onosproject.net.flow.instructions.Instruction; |
| 25 | |
| 26 | import java.util.List; |
| 27 | import java.util.Map; |
| 28 | |
| 29 | /** |
| 30 | * Service for obtaining individual flow statistic information about device and link in the system. |
| 31 | * Basic statistics are obtained from the StatisticService |
| 32 | */ |
| 33 | public interface FlowStatisticService { |
| 34 | |
| 35 | /** |
| 36 | * Obtain the summary load list for the device with the given link. |
| 37 | * |
| 38 | * @param device the Device to query. |
| 39 | * @return map of summary flow entry load |
| 40 | */ |
| 41 | Map<ConnectPoint, SummaryFlowEntryWithLoad> loadSummary(Device device); |
| 42 | |
| 43 | /** |
| 44 | * Obtain the summary load for the device with the given link or port. |
| 45 | * |
| 46 | * @param device the Device to query. |
| 47 | * @param pNumber the port number to query. |
| 48 | * @return summary flow entry load |
| 49 | */ |
| 50 | SummaryFlowEntryWithLoad loadSummary(Device device, PortNumber pNumber); |
| 51 | |
| 52 | /** |
| 53 | * Obtain the set of the flow type and load list for the device with the given link. |
| 54 | * |
| 55 | * @param device the Device to query. |
| 56 | * @param liveType the FlowLiveType to filter, null means no filtering . |
| 57 | * @param instType the InstructionType to filter, null means no filtering. |
| 58 | * @return map of flow entry load |
| 59 | */ |
Sangsik Yoon | b1b823f | 2016-05-16 18:55:39 +0900 | [diff] [blame] | 60 | Map<ConnectPoint, List<FlowEntryWithLoad>> loadAllByType(Device device, |
| 61 | FlowEntry.FlowLiveType liveType, |
| 62 | Instruction.Type instType); |
| 63 | |
| 64 | /** |
| 65 | * Obtain the flow type and load list for the device with the given link or port. |
| 66 | * |
| 67 | * @param device the Device to query. |
| 68 | * @param pNumber the port number of the Device to query |
| 69 | * @param liveType the FlowLiveType to filter, null means no filtering . |
| 70 | * @param instType the InstructionType to filter, null means no filtering. |
| 71 | * @return list of flow entry load |
| 72 | */ |
| 73 | List<FlowEntryWithLoad> loadAllByType(Device device, |
| 74 | PortNumber pNumber, |
| 75 | FlowEntry.FlowLiveType liveType, |
| 76 | Instruction.Type instType); |
| 77 | |
| 78 | /** |
| 79 | * Obtain the set of the flow type and load topn list for the device with the given link. |
| 80 | * |
| 81 | * @param device the Device to query. |
| 82 | * @param liveType the FlowLiveType to filter, null means no filtering . |
| 83 | * @param instType the InstructionType to filter, null means no filtering. |
| 84 | * @param topn the top number to filter, null means no filtering. |
| 85 | * @return map of flow entry load |
| 86 | */ |
| 87 | Map<ConnectPoint, List<FlowEntryWithLoad>> loadTopnByType(Device device, |
| 88 | FlowEntry.FlowLiveType liveType, |
| 89 | Instruction.Type instType, |
| 90 | int topn); |
| 91 | |
| 92 | /** |
| 93 | * Obtain the flow type and load topn list for the device with the given link or port. |
| 94 | * |
| 95 | * @param device the Device to query. |
| 96 | * @param pNumber the port number of the Device to query |
| 97 | * @param liveType the FlowLiveType to filter, null means no filtering . |
| 98 | * @param instType the InstructionType to filter, null means no filtering. |
| 99 | * @param topn the top n list entry |
| 100 | * @return list of flow entry load |
| 101 | */ |
| 102 | List<FlowEntryWithLoad> loadTopnByType(Device device, |
| 103 | PortNumber pNumber, |
| 104 | FlowEntry.FlowLiveType liveType, |
| 105 | Instruction.Type instType, |
| 106 | int topn); |
| 107 | |
| 108 | // The belows are deprecated interfaces... |
| 109 | |
| 110 | /** |
| 111 | * Obtain the set of the flow type and load list for the device with the given link. |
| 112 | * |
| 113 | * @param device the Device to query. |
| 114 | * @param liveType the FlowLiveType to filter, null means no filtering . |
| 115 | * @param instType the InstructionType to filter, null means no filtering. |
| 116 | * @return map of flow entry load |
| 117 | * @deprecated in Ibis(1.8.1) release |
| 118 | */ |
| 119 | @Deprecated |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 120 | Map<ConnectPoint, List<TypedFlowEntryWithLoad>> loadAllByType(Device device, |
| 121 | TypedStoredFlowEntry.FlowLiveType liveType, |
| 122 | Instruction.Type instType); |
| 123 | |
| 124 | /** |
| 125 | * Obtain the flow type and load list for the device with the given link or port. |
| 126 | * |
| 127 | * @param device the Device to query. |
| 128 | * @param pNumber the port number of the Device to query |
| 129 | * @param liveType the FlowLiveType to filter, null means no filtering . |
| 130 | * @param instType the InstructionType to filter, null means no filtering. |
| 131 | * @return list of flow entry load |
Sangsik Yoon | b1b823f | 2016-05-16 18:55:39 +0900 | [diff] [blame] | 132 | * @deprecated in Ibis(1.8.1) release |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 133 | */ |
Sangsik Yoon | b1b823f | 2016-05-16 18:55:39 +0900 | [diff] [blame] | 134 | @Deprecated |
| 135 | List<TypedFlowEntryWithLoad> loadAllByType(Device device, |
| 136 | PortNumber pNumber, |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 137 | TypedStoredFlowEntry.FlowLiveType liveType, |
| 138 | Instruction.Type instType); |
| 139 | |
| 140 | /** |
| 141 | * Obtain the set of the flow type and load topn list for the device with the given link. |
| 142 | * |
| 143 | * @param device the Device to query. |
| 144 | * @param liveType the FlowLiveType to filter, null means no filtering . |
| 145 | * @param instType the InstructionType to filter, null means no filtering. |
| 146 | * @param topn the top number to filter, null means no filtering. |
| 147 | * @return map of flow entry load |
Sangsik Yoon | b1b823f | 2016-05-16 18:55:39 +0900 | [diff] [blame] | 148 | * @deprecated in Ibis(1.8.1) release |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 149 | */ |
Sangsik Yoon | b1b823f | 2016-05-16 18:55:39 +0900 | [diff] [blame] | 150 | @Deprecated |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 151 | Map<ConnectPoint, List<TypedFlowEntryWithLoad>> loadTopnByType(Device device, |
| 152 | TypedStoredFlowEntry.FlowLiveType liveType, |
| 153 | Instruction.Type instType, |
| 154 | int topn); |
| 155 | |
| 156 | /** |
| 157 | * Obtain the flow type and load topn list for the device with the given link or port. |
| 158 | * |
| 159 | * @param device the Device to query. |
| 160 | * @param pNumber the port number of the Device to query |
| 161 | * @param liveType the FlowLiveType to filter, null means no filtering . |
| 162 | * @param instType the InstructionType to filter, null means no filtering. |
| 163 | * @param topn topn //FIXME what? |
| 164 | * @return list of flow entry load |
Sangsik Yoon | b1b823f | 2016-05-16 18:55:39 +0900 | [diff] [blame] | 165 | * @deprecated in Ibis(1.8.1) release |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 166 | */ |
Sangsik Yoon | b1b823f | 2016-05-16 18:55:39 +0900 | [diff] [blame] | 167 | @Deprecated |
| 168 | List<TypedFlowEntryWithLoad> loadTopnByType(Device device, |
| 169 | PortNumber pNumber, |
Madan Jampani | c27b6b2 | 2016-02-05 11:36:31 -0800 | [diff] [blame] | 170 | TypedStoredFlowEntry.FlowLiveType liveType, |
| 171 | Instruction.Type instType, |
| 172 | int topn); |
| 173 | } |
| 174 | |
| 175 | |