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.Device;
|
| 21 | import org.onosproject.net.PortNumber;
|
| 22 | import org.onosproject.net.flow.TypedStoredFlowEntry;
|
| 23 | import org.onosproject.net.flow.instructions.Instruction;
|
| 24 |
|
| 25 | import java.util.List;
|
| 26 | import java.util.Map;
|
| 27 |
|
| 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 | */
|
| 59 | Map<ConnectPoint, List<TypedFlowEntryWithLoad>> loadAllByType(Device device,
|
| 60 | TypedStoredFlowEntry.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<TypedFlowEntryWithLoad> loadAllByType(Device device, PortNumber pNumber,
|
| 73 | TypedStoredFlowEntry.FlowLiveType liveType,
|
| 74 | Instruction.Type instType);
|
| 75 |
|
| 76 | /**
|
| 77 | * Obtain the set of the flow type and load topn list for the device with the given link.
|
| 78 | *
|
| 79 | * @param device the Device to query.
|
| 80 | * @param liveType the FlowLiveType to filter, null means no filtering .
|
| 81 | * @param instType the InstructionType to filter, null means no filtering.
|
| 82 | * @param topn the top number to filter, null means no filtering.
|
| 83 | * @return map of flow entry load
|
| 84 | */
|
| 85 | Map<ConnectPoint, List<TypedFlowEntryWithLoad>> loadTopnByType(Device device,
|
| 86 | TypedStoredFlowEntry.FlowLiveType liveType,
|
| 87 | Instruction.Type instType,
|
| 88 | int topn);
|
| 89 |
|
| 90 | /**
|
| 91 | * Obtain the flow type and load topn list for the device with the given link or port.
|
| 92 | *
|
| 93 | * @param device the Device to query.
|
| 94 | * @param pNumber the port number of the Device to query
|
| 95 | * @param liveType the FlowLiveType to filter, null means no filtering .
|
| 96 | * @param instType the InstructionType to filter, null means no filtering.
|
Brian O'Connor | 5251562 | 2015-10-09 17:03:44 -0700 | [diff] [blame] | 97 | * @param topn topn //FIXME what?
|
ssyoon90 | a98825a | 2015-08-26 00:48:15 +0900 | [diff] [blame] | 98 | * @return list of flow entry load
|
| 99 | */
|
| 100 | List<TypedFlowEntryWithLoad> loadTopnByType(Device device, PortNumber pNumber,
|
| 101 | TypedStoredFlowEntry.FlowLiveType liveType,
|
| 102 | Instruction.Type instType,
|
| 103 | int topn);
|
| 104 | }
|
| 105 |
|
| 106 |
|