Sangsik Yoon | f0b3ad8 | 2016-08-19 18:47:59 +0900 | [diff] [blame] | 1 | /* |
Thomas Vachuska | 52f2cd1 | 2018-11-08 21:20:04 -0800 | [diff] [blame] | 2 | * Copyright 2018-present Open Networking Foundation |
Sangsik Yoon | f0b3ad8 | 2016-08-19 18:47:59 +0900 | [diff] [blame] | 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.incubator.net.dpi; |
| 18 | |
| 19 | import java.util.List; |
| 20 | |
| 21 | /** |
| 22 | * Service for DPI Statistics Service Manager. |
| 23 | */ |
| 24 | public 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 Milkey | ef79434 | 2016-11-09 16:20:29 -0800 | [diff] [blame] | 45 | * @param lastN maximum number to fetch |
Sangsik Yoon | f0b3ad8 | 2016-08-19 18:47:59 +0900 | [diff] [blame] | 46 | * @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 Milkey | ef79434 | 2016-11-09 16:20:29 -0800 | [diff] [blame] | 81 | * @param ds statistics to add |
Sangsik Yoon | f0b3ad8 | 2016-08-19 18:47:59 +0900 | [diff] [blame] | 82 | * @return the added DpiStatistics object class |
| 83 | */ |
| 84 | DpiStatistics addDpiStatistics(DpiStatistics ds); |
| 85 | |
| 86 | } |