blob: e55237e793173bd261132e394ccdabcf5bc1fed6 [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;
22import org.onosproject.net.flow.TypedStoredFlowEntry;
23import org.onosproject.net.flow.instructions.Instruction;
24
25import java.util.List;
26import 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 */
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 */
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.
97 * @param topn topn //FIXME what?
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