blob: 1b3914672dc2417cd11fa20644339711d27b6320 [file] [log] [blame]
Srikanth Vavilapalli95810f52015-09-14 15:49:56 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Srikanth Vavilapalli95810f52015-09-14 15:49:56 -07003 *
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 */
16package org.onosproject.net.flow;
17
18import org.onosproject.net.DeviceId;
19
20/**
21 * Interface for flow table statistics of a device.
22 */
23public interface TableStatisticsEntry {
24
25 /**
26 * Returns the device Id.
27 *
28 * @return device id
29 */
30 DeviceId deviceId();
31
32 /**
hjtsao1a4333c2018-10-22 11:02:00 -070033 * Returns the integer table id.
Srikanth Vavilapalli95810f52015-09-14 15:49:56 -070034 *
hjtsao1a4333c2018-10-22 11:02:00 -070035 * @return integer table id
Srikanth Vavilapalli95810f52015-09-14 15:49:56 -070036 */
hjtsao1a4333c2018-10-22 11:02:00 -070037 @Deprecated
Srikanth Vavilapalli95810f52015-09-14 15:49:56 -070038 int tableId();
39
40 /**
hjtsao1a4333c2018-10-22 11:02:00 -070041 * Returns the table id.
42 *
43 * @return table id
44 */
45 TableId table();
46
47 /**
Srikanth Vavilapalli95810f52015-09-14 15:49:56 -070048 * 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();
hjtsao1a4333c2018-10-22 11:02:00 -070067
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}