blob: 2d2ff161a17adc268d72c98064124114cdf8b58c [file] [log] [blame]
Marc De Leenheer1afa2a02015-05-13 09:18:07 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Marc De Leenheer1afa2a02015-05-13 09:18:07 -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 */
Sho SHIMIZU739873b2016-02-23 17:02:12 -080016package org.onosproject.net.intent;
Marc De Leenheer1afa2a02015-05-13 09:18:07 -070017
Sho SHIMIZUcfe707a2015-10-12 17:45:42 -070018import com.google.common.annotations.Beta;
Marc De Leenheer1afa2a02015-05-13 09:18:07 -070019
20import java.util.Set;
21
Sho SHIMIZUcfe707a2015-10-12 17:45:42 -070022@Beta
Sho SHIMIZU7d20af12015-10-01 16:03:51 -070023public interface IntentSetMultimap {
Marc De Leenheer8c2caac2015-05-28 16:37:33 -070024
25 /**
26 * Allocates the mapping between the given intents.
27 *
28 * @param keyIntentId key intent ID
29 * @param valIntentId value intent ID
30 * @return true if mapping was successful, false otherwise
31 */
32 boolean allocateMapping(IntentId keyIntentId, IntentId valIntentId);
33
34 /**
35 * Returns the set of intents mapped to a lower intent.
36 *
37 * @param intentId intent ID
38 * @return set of intent IDs
39 */
40 Set<IntentId> getMapping(IntentId intentId);
41
42 /**
Marc De Leenheer9f7d1892015-05-30 13:22:24 -070043 * Releases the mapping of the given intent.
Marc De Leenheer8c2caac2015-05-28 16:37:33 -070044 *
Marc De Leenheer9f7d1892015-05-30 13:22:24 -070045 * @param intentId intent ID
Marc De Leenheer8c2caac2015-05-28 16:37:33 -070046 */
Marc De Leenheer9f7d1892015-05-30 13:22:24 -070047 void releaseMapping(IntentId intentId);
Marc De Leenheer1afa2a02015-05-13 09:18:07 -070048}