Srikanth Vavilapalli | 95810f5 | 2015-09-14 15:49:56 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
Srikanth Vavilapalli | 95810f5 | 2015-09-14 15:49:56 -0700 | [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 | package org.onosproject.net.flow; |
| 17 | |
| 18 | import org.onosproject.net.DeviceId; |
| 19 | |
| 20 | /** |
| 21 | * Interface for flow table statistics of a device. |
| 22 | */ |
| 23 | public interface TableStatisticsEntry { |
| 24 | |
| 25 | /** |
| 26 | * Returns the device Id. |
| 27 | * |
| 28 | * @return device id |
| 29 | */ |
| 30 | DeviceId deviceId(); |
| 31 | |
| 32 | /** |
hjtsao | 1a4333c | 2018-10-22 11:02:00 -0700 | [diff] [blame] | 33 | * Returns the integer table id. |
Srikanth Vavilapalli | 95810f5 | 2015-09-14 15:49:56 -0700 | [diff] [blame] | 34 | * |
hjtsao | 1a4333c | 2018-10-22 11:02:00 -0700 | [diff] [blame] | 35 | * @return integer table id |
Srikanth Vavilapalli | 95810f5 | 2015-09-14 15:49:56 -0700 | [diff] [blame] | 36 | */ |
hjtsao | 1a4333c | 2018-10-22 11:02:00 -0700 | [diff] [blame] | 37 | @Deprecated |
Srikanth Vavilapalli | 95810f5 | 2015-09-14 15:49:56 -0700 | [diff] [blame] | 38 | int tableId(); |
| 39 | |
| 40 | /** |
hjtsao | 1a4333c | 2018-10-22 11:02:00 -0700 | [diff] [blame] | 41 | * Returns the table id. |
| 42 | * |
| 43 | * @return table id |
| 44 | */ |
| 45 | TableId table(); |
| 46 | |
| 47 | /** |
Srikanth Vavilapalli | 95810f5 | 2015-09-14 15:49:56 -0700 | [diff] [blame] | 48 | * Returns the number of active flow entries in this table. |
| 49 | * |
| 50 | * @return the number of active flow entries |
| 51 | */ |
| 52 | long activeFlowEntries(); |
| 53 | |
| 54 | /** |
| 55 | * Returns the number of packets looked up in the table. |
| 56 | * |
| 57 | * @return the number of packets looked up in the table |
| 58 | */ |
| 59 | long packetsLookedup(); |
| 60 | |
| 61 | /** |
| 62 | * Returns the number of packets that successfully matched in the table. |
| 63 | * |
| 64 | * @return the number of packets that successfully matched in the table |
| 65 | */ |
| 66 | long packetsMatched(); |
hjtsao | 1a4333c | 2018-10-22 11:02:00 -0700 | [diff] [blame] | 67 | |
| 68 | /** |
| 69 | * Returns the maximum size of this table. |
| 70 | * |
| 71 | * @return the maximum size of this table |
| 72 | */ |
| 73 | long maxSize(); |
| 74 | |
| 75 | /** |
| 76 | * To check whether packetLookedUp is present in this TableStatisticsEntry. |
| 77 | * |
| 78 | * @return true if packetLookedUp is present, otherwise false; |
| 79 | */ |
| 80 | boolean hasPacketsLookedup(); |
| 81 | |
| 82 | /** |
| 83 | * To check whether maxSize is present in this TableStatisticsEntry. |
| 84 | * |
| 85 | * @return true if maxSize is present, otherwise false; |
| 86 | */ |
| 87 | boolean hasMaxSize(); |
| 88 | |
| 89 | } |