blob: 30ea79c93c3c7229fa73710fdd4faf5a7549b9f9 [file] [log] [blame]
Toshio Koide106d4492014-10-28 11:22:02 -07001/*
2 * Copyright 2014 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 */
16package org.onlab.onos.net.resource;
17
18import java.util.Set;
19
20import org.onlab.onos.net.Link;
21import org.onlab.onos.net.intent.IntentId;
22
23
24/**
25 * Manages link resources.
26 */
27public interface LinkResourceStore {
28 Set<ResourceAllocation> getFreeResources(Link link);
29
30 void allocateResources(LinkResourceAllocations allocations);
31
32 void releaseResources(LinkResourceAllocations allocations);
33
34 LinkResourceAllocations getAllocations(IntentId intentId);
35
36 Iterable<LinkResourceAllocations> getAllocations(Link link);
37
38 Iterable<LinkResourceAllocations> getAllocations();
39}