blob: 420b5f6435a524db92fd774e2519a36ce6e00adc [file] [log] [blame]
Carmelo Cascone1022a4e2017-05-25 00:16:18 -04001/*
2 * Copyright 2017-present Open Networking Laboratory
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
17package org.onosproject.net.pi.model;
18
19import com.google.common.annotations.Beta;
20
21import java.util.Collection;
22
23/**
24 * Model of a match+action table in a protocol-independent pipeline.
25 */
26@Beta
27public interface PiTableModel {
28
29 /**
30 * Returns the name of this table.
31 *
32 * @return a string value
33 */
34 String name();
35
36 /**
37 * Returns the maximum number of entries supported by this table.
38 *
39 * @return an integer value
40 */
41 int maxSize();
42
43 /**
44 * Returns true if this table has counters, false otherwise.
45 *
46 * @return a boolean value
47 */
48 boolean hasCounters();
49
50 /**
51 * Returns true if this table supports aging, false otherwise.
52 *
53 * @return a boolean value
54 */
55 boolean supportsAging();
56
57 /**
58 * Returns the collection of match fields supported by this table.
59 *
60 * @return a collection of match field models
61 */
62 Collection<PiTableMatchFieldModel> matchFields();
63
64 /**
65 * Returns the actions supported by this table.
66 *
67 * @return a collection of action models
68 */
69 Collection<PiActionModel> actions();
70}