blob: 926b29192b0039f4dd37626329cfd4f247831488 [file] [log] [blame]
Madan Jampanic27b6b22016-02-05 11:36:31 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
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
19import org.onosproject.net.ConnectPoint;
20import org.onosproject.net.Device;
21import org.onosproject.net.PortNumber;
Sangsik Yoonb1b823f2016-05-16 18:55:39 +090022import org.onosproject.net.flow.FlowEntry;
Madan Jampanic27b6b22016-02-05 11:36:31 -080023import org.onosproject.net.flow.TypedStoredFlowEntry;
24import org.onosproject.net.flow.instructions.Instruction;
25
26import java.util.List;
27import 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 */
33public 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 Yoonb1b823f2016-05-16 18:55:39 +090060 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 Jampanic27b6b22016-02-05 11:36:31 -0800120 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 Yoonb1b823f2016-05-16 18:55:39 +0900132 * @deprecated in Ibis(1.8.1) release
Madan Jampanic27b6b22016-02-05 11:36:31 -0800133 */
Sangsik Yoonb1b823f2016-05-16 18:55:39 +0900134 @Deprecated
135 List<TypedFlowEntryWithLoad> loadAllByType(Device device,
136 PortNumber pNumber,
Madan Jampanic27b6b22016-02-05 11:36:31 -0800137 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 Yoonb1b823f2016-05-16 18:55:39 +0900148 * @deprecated in Ibis(1.8.1) release
Madan Jampanic27b6b22016-02-05 11:36:31 -0800149 */
Sangsik Yoonb1b823f2016-05-16 18:55:39 +0900150 @Deprecated
Madan Jampanic27b6b22016-02-05 11:36:31 -0800151 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 Yoonb1b823f2016-05-16 18:55:39 +0900165 * @deprecated in Ibis(1.8.1) release
Madan Jampanic27b6b22016-02-05 11:36:31 -0800166 */
Sangsik Yoonb1b823f2016-05-16 18:55:39 +0900167 @Deprecated
168 List<TypedFlowEntryWithLoad> loadTopnByType(Device device,
169 PortNumber pNumber,
Madan Jampanic27b6b22016-02-05 11:36:31 -0800170 TypedStoredFlowEntry.FlowLiveType liveType,
171 Instruction.Type instType,
172 int topn);
173}
174
175