blob: 5d035368e3415da9f8d6e7d525a06d4aa03f9ae9 [file] [log] [blame]
Sangsik Yoonf0b3ad82016-08-19 18:47:59 +09001/*
Thomas Vachuska52f2cd12018-11-08 21:20:04 -08002 * Copyright 2018-present Open Networking Foundation
Sangsik Yoonf0b3ad82016-08-19 18:47:59 +09003 *
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.incubator.net.dpi;
18
19import java.util.List;
20
21/**
22 * Service for DPI Statistics Service Manager.
23 */
24public interface DpiStatisticsManagerService {
25 /**
26 * Get the latest DpiStatistics in the Store list.
27 *
28 * @return the DpiStatistics object class or null if not exist
29 */
30 DpiStatistics getDpiStatisticsLatest();
31
32 /**
33 * Get the latest DpiStatistics in the Store list.
34 *
35 * @param topnProtocols detected topn protocols, default = 100
36 * @param topnFlows detected topn known and unknown flows , default = 100
37 *
38 * @return the DpiStatistics object class or null if not exist
39 */
40 DpiStatistics getDpiStatisticsLatest(int topnProtocols, int topnFlows);
41
42 /**
43 * Gets the last N(Max = 100) DpiStatistics in the Store list.
44 *
Ray Milkeyef794342016-11-09 16:20:29 -080045 * @param lastN maximum number to fetch
Sangsik Yoonf0b3ad82016-08-19 18:47:59 +090046 * @return the List of DpiStatistics object class
47 */
48 List<DpiStatistics> getDpiStatistics(int lastN);
49
50 /**
51 * Gets the last N(Max = 100) DpiStatistics in the Store list.
52 *
53 * @param lastN latest N entries
54 * @param topnProtocols detected topn protocols, default = 100
55 * @param topnFlows detected topn known and unknown flows , default = 100
56 * @return the List of DpiStatistics object class
57 */
58 List<DpiStatistics> getDpiStatistics(int lastN, int topnProtocols, int topnFlows);
59
60 /**
61 * Get the specified receivedTime DpiStatistics in the Store list.
62 *
63 * @param receivedTime receivedTime string with format "yyyy-MM-dd HH:mm:ss"
64 * @return the DpiStatistics object class or null if not exist
65 */
66 DpiStatistics getDpiStatistics(String receivedTime);
67
68 /**
69 * Get the specified receivedTime DpiStatistics in the Store list.
70 *
71 * @param receivedTime receivedTime string with format "yyyy-MM-dd HH:mm:ss"
72 * @param topnProtocols detected topn protocols, default = 100
73 * @param topnFlows detected topn known and unknown flows , default = 100
74 * @return the DpiStatistics object class or null if not exist
75 */
76 DpiStatistics getDpiStatistics(String receivedTime, int topnProtocols, int topnFlows);
77
78 /**
79 * Adds DpiStatistics at the end of the Store list.
80 *
Ray Milkeyef794342016-11-09 16:20:29 -080081 * @param ds statistics to add
Sangsik Yoonf0b3ad82016-08-19 18:47:59 +090082 * @return the added DpiStatistics object class
83 */
84 DpiStatistics addDpiStatistics(DpiStatistics ds);
85
86}