blob: 71ea7e1a038556c8b9de79edf689903b8462a609 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -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 */
Brian O'Connor6de2e202015-05-21 14:30:41 -070016package org.onosproject.net.resource.link;
Toshio Koidec9051db2014-10-20 15:18:37 -070017
Thomas Vachuska42e8cce2015-07-29 19:25:18 -070018import org.onosproject.event.ListenerService;
Brian O'Connorabafb502014-12-02 22:26:20 -080019import org.onosproject.net.Link;
20import org.onosproject.net.intent.IntentId;
Brian O'Connor6de2e202015-05-21 14:30:41 -070021import org.onosproject.net.resource.ResourceRequest;
Toshio Koidec9051db2014-10-20 15:18:37 -070022
23/**
24 * Service for providing link resource allocation.
Sho SHIMIZU36163f92015-10-28 14:49:12 -070025 *
26 * @deprecated in Emu Release
Toshio Koidec9051db2014-10-20 15:18:37 -070027 */
Sho SHIMIZU36163f92015-10-28 14:49:12 -070028@Deprecated
Thomas Vachuska42e8cce2015-07-29 19:25:18 -070029public interface LinkResourceService
30 extends ListenerService<LinkResourceEvent, LinkResourceListener> {
Toshio Koidec9051db2014-10-20 15:18:37 -070031
32 /**
Toshio Koide485b4782014-10-20 19:34:21 -070033 * Requests resources.
Toshio Koidec9051db2014-10-20 15:18:37 -070034 *
Toshio Koide485b4782014-10-20 19:34:21 -070035 * @param req resources to be allocated
36 * @return allocated resources
Sho SHIMIZU36163f92015-10-28 14:49:12 -070037 * @deprecated in Emu Release
Toshio Koidec9051db2014-10-20 15:18:37 -070038 */
Sho SHIMIZU36163f92015-10-28 14:49:12 -070039 @Deprecated
Toshio Koide485b4782014-10-20 19:34:21 -070040 LinkResourceAllocations requestResources(LinkResourceRequest req);
Toshio Koidec9051db2014-10-20 15:18:37 -070041
42 /**
Toshio Koide485b4782014-10-20 19:34:21 -070043 * Releases resources.
Toshio Koidec9051db2014-10-20 15:18:37 -070044 *
Toshio Koide485b4782014-10-20 19:34:21 -070045 * @param allocations resources to be released
Sho SHIMIZU36163f92015-10-28 14:49:12 -070046 * @deprecated in Emu Release
Toshio Koidec9051db2014-10-20 15:18:37 -070047 */
Sho SHIMIZU36163f92015-10-28 14:49:12 -070048 @Deprecated
Toshio Koide485b4782014-10-20 19:34:21 -070049 void releaseResources(LinkResourceAllocations allocations);
Toshio Koidec9051db2014-10-20 15:18:37 -070050
51 /**
Thomas Vachuskaf9976952014-10-24 11:55:05 -070052 * Updates previously made allocations with a new resource request.
53 *
54 * @param req updated resource request
55 * @param oldAllocations old resource allocations
56 * @return new resource allocations
Sho SHIMIZU36163f92015-10-28 14:49:12 -070057 * @deprecated in Emu Release
Thomas Vachuskaf9976952014-10-24 11:55:05 -070058 */
Sho SHIMIZU36163f92015-10-28 14:49:12 -070059 @Deprecated
Thomas Vachuskaf9976952014-10-24 11:55:05 -070060 LinkResourceAllocations updateResources(LinkResourceRequest req,
61 LinkResourceAllocations oldAllocations);
62
63 /**
Toshio Koide485b4782014-10-20 19:34:21 -070064 * Returns all allocated resources.
Toshio Koidec9051db2014-10-20 15:18:37 -070065 *
Toshio Koide485b4782014-10-20 19:34:21 -070066 * @return allocated resources
Sho SHIMIZU36163f92015-10-28 14:49:12 -070067 * @deprecated in Emu Release
Toshio Koidec9051db2014-10-20 15:18:37 -070068 */
Sho SHIMIZU36163f92015-10-28 14:49:12 -070069 @Deprecated
Toshio Koide485b4782014-10-20 19:34:21 -070070 Iterable<LinkResourceAllocations> getAllocations();
Toshio Koidec9051db2014-10-20 15:18:37 -070071
Brian O'Connor55153ce2014-10-23 13:44:05 -070072 /**
Toshio Koidec9051db2014-10-20 15:18:37 -070073 * Returns all allocated resources to given link.
74 *
75 * @param link a target link
Toshio Koide485b4782014-10-20 19:34:21 -070076 * @return allocated resources
Sho SHIMIZU36163f92015-10-28 14:49:12 -070077 * @deprecated in Emu Release
Toshio Koidec9051db2014-10-20 15:18:37 -070078 */
Sho SHIMIZU36163f92015-10-28 14:49:12 -070079 @Deprecated
Toshio Koide485b4782014-10-20 19:34:21 -070080 Iterable<LinkResourceAllocations> getAllocations(Link link);
Toshio Koidec9051db2014-10-20 15:18:37 -070081
82 /**
Toshio Koide9be539e2014-10-23 18:43:30 -070083 * Returns the resources allocated for an Intent.
Toshio Koidec9051db2014-10-20 15:18:37 -070084 *
Toshio Koide9be539e2014-10-23 18:43:30 -070085 * @param intentId the target Intent's id
86 * @return allocated resources for Intent
Sho SHIMIZU36163f92015-10-28 14:49:12 -070087 * @deprecated in Emu Release
Toshio Koidec9051db2014-10-20 15:18:37 -070088 */
Sho SHIMIZU36163f92015-10-28 14:49:12 -070089 @Deprecated
Toshio Koide9be539e2014-10-23 18:43:30 -070090 LinkResourceAllocations getAllocations(IntentId intentId);
Toshio Koidec9051db2014-10-20 15:18:37 -070091
92 /**
93 * Returns available resources for given link.
Toshio Koide485b4782014-10-20 19:34:21 -070094 *
Toshio Koidec9051db2014-10-20 15:18:37 -070095 * @param link a target link
96 * @return available resources for the target link
Sho SHIMIZU36163f92015-10-28 14:49:12 -070097 * @deprecated in Emu Release
Toshio Koidec9051db2014-10-20 15:18:37 -070098 */
Sho SHIMIZU36163f92015-10-28 14:49:12 -070099 @Deprecated
Toshio Koide9be539e2014-10-23 18:43:30 -0700100 Iterable<ResourceRequest> getAvailableResources(Link link);
Thomas Vachuskaf9976952014-10-24 11:55:05 -0700101
102 /**
103 * Returns available resources for given link.
104 *
105 * @param link a target link
106 * @param allocations allocations to be included as available
107 * @return available resources for the target link
Sho SHIMIZU36163f92015-10-28 14:49:12 -0700108 * @deprecated in Emu Release
Thomas Vachuskaf9976952014-10-24 11:55:05 -0700109 */
Sho SHIMIZU36163f92015-10-28 14:49:12 -0700110 @Deprecated
weibit00c94f52014-11-16 07:09:05 -0800111 Iterable<ResourceRequest> getAvailableResources(Link link,
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700112 LinkResourceAllocations allocations);
Ray Milkeye97ede92014-11-20 10:43:12 -0800113
Toshio Koidec9051db2014-10-20 15:18:37 -0700114}