blob: 50efce4851e4fac0769363f183f0f0098e324553 [file] [log] [blame]
Madan Jampanic27b6b22016-02-05 11:36:31 -08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Madan Jampanic27b6b22016-02-05 11:36:31 -08003 *
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
Ray Milkeya6957192017-06-01 13:04:16 -070019import java.util.List;
20import java.util.Map;
21
Madan Jampanic27b6b22016-02-05 11:36:31 -080022import org.onosproject.net.ConnectPoint;
23import org.onosproject.net.Device;
24import org.onosproject.net.PortNumber;
Sangsik Yoonb1b823f2016-05-16 18:55:39 +090025import org.onosproject.net.flow.FlowEntry;
Madan Jampanic27b6b22016-02-05 11:36:31 -080026import org.onosproject.net.flow.instructions.Instruction;
27
Madan Jampanic27b6b22016-02-05 11:36:31 -080028/**
29 * Service for obtaining individual flow statistic information about device and link in the system.
30 * Basic statistics are obtained from the StatisticService
31 */
32public 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 Yoonb1b823f2016-05-16 18:55:39 +090059 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 Jampanic27b6b22016-02-05 11:36:31 -0800106}
107
108