blob: 0a66ee973c1742c39695044908e95fb3c04ee371 [file] [log] [blame]
Carmelo Cascone87892e22017-11-13 16:01:29 -08001/*
2 * Copyright 2017-present Open Networking Foundation
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 an action profile in a protocol-independent pipeline.
25 */
26@Beta
27public interface PiActionProfileModel {
28
29 /**
30 * Returns the ID of this action profile.
31 *
32 * @return action profile ID
33 */
34 PiActionProfileId id();
35
36 /**
37 * Returns the collection of table IDs that use this action profile.
38 *
39 * @return collection of table models
40 */
41 Collection<PiTableId> tables();
42
43 /**
Carmelo Cascone99c59db2019-01-17 15:39:35 -080044 * Returns true if this action profile implements dynamic selection, false
45 * otherwise.
Carmelo Cascone87892e22017-11-13 16:01:29 -080046 *
Carmelo Cascone99c59db2019-01-17 15:39:35 -080047 * @return true if action profile implements dynamic selection, false
48 * otherwise
Carmelo Cascone87892e22017-11-13 16:01:29 -080049 */
50 boolean hasSelector();
51
52 /**
Carmelo Cascone99c59db2019-01-17 15:39:35 -080053 * Returns the maximum number of member entries that this action profile can
54 * hold.
Carmelo Cascone87892e22017-11-13 16:01:29 -080055 *
56 * @return maximum number of member entries
57 */
Carmelo Cascone99c59db2019-01-17 15:39:35 -080058 long size();
59
60 /**
61 * Returns the maximum number of members a group of this action profile can
62 * hold. This method is meaningful only if the action profile implements
63 * dynamic selection. 0 signifies that an explicit limit is not set.
64 *
65 * @return maximum number of members a group can hold
66 */
67 int maxGroupSize();
Carmelo Cascone87892e22017-11-13 16:01:29 -080068}