Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
| 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'Connor | 6de2e20 | 2015-05-21 14:30:41 -0700 | [diff] [blame] | 16 | package org.onosproject.net.resource.link; |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 17 | |
Thomas Vachuska | 42e8cce | 2015-07-29 19:25:18 -0700 | [diff] [blame] | 18 | import org.onosproject.event.ListenerService; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 19 | import org.onosproject.net.Link; |
| 20 | import org.onosproject.net.intent.IntentId; |
Brian O'Connor | 6de2e20 | 2015-05-21 14:30:41 -0700 | [diff] [blame] | 21 | import org.onosproject.net.resource.ResourceRequest; |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * Service for providing link resource allocation. |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 25 | * |
| 26 | * @deprecated in Emu Release |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 27 | */ |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 28 | @Deprecated |
Thomas Vachuska | 42e8cce | 2015-07-29 19:25:18 -0700 | [diff] [blame] | 29 | public interface LinkResourceService |
| 30 | extends ListenerService<LinkResourceEvent, LinkResourceListener> { |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 31 | |
| 32 | /** |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 33 | * Requests resources. |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 34 | * |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 35 | * @param req resources to be allocated |
| 36 | * @return allocated resources |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 37 | * @deprecated in Emu Release |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 38 | */ |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 39 | @Deprecated |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 40 | LinkResourceAllocations requestResources(LinkResourceRequest req); |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 41 | |
| 42 | /** |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 43 | * Releases resources. |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 44 | * |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 45 | * @param allocations resources to be released |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 46 | * @deprecated in Emu Release |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 47 | */ |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 48 | @Deprecated |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 49 | void releaseResources(LinkResourceAllocations allocations); |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 50 | |
| 51 | /** |
Thomas Vachuska | f997695 | 2014-10-24 11:55:05 -0700 | [diff] [blame] | 52 | * 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 SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 57 | * @deprecated in Emu Release |
Thomas Vachuska | f997695 | 2014-10-24 11:55:05 -0700 | [diff] [blame] | 58 | */ |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 59 | @Deprecated |
Thomas Vachuska | f997695 | 2014-10-24 11:55:05 -0700 | [diff] [blame] | 60 | LinkResourceAllocations updateResources(LinkResourceRequest req, |
| 61 | LinkResourceAllocations oldAllocations); |
| 62 | |
| 63 | /** |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 64 | * Returns all allocated resources. |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 65 | * |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 66 | * @return allocated resources |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 67 | * @deprecated in Emu Release |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 68 | */ |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 69 | @Deprecated |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 70 | Iterable<LinkResourceAllocations> getAllocations(); |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 71 | |
Brian O'Connor | 55153ce | 2014-10-23 13:44:05 -0700 | [diff] [blame] | 72 | /** |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 73 | * Returns all allocated resources to given link. |
| 74 | * |
| 75 | * @param link a target link |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 76 | * @return allocated resources |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 77 | * @deprecated in Emu Release |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 78 | */ |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 79 | @Deprecated |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 80 | Iterable<LinkResourceAllocations> getAllocations(Link link); |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 81 | |
| 82 | /** |
Toshio Koide | 9be539e | 2014-10-23 18:43:30 -0700 | [diff] [blame] | 83 | * Returns the resources allocated for an Intent. |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 84 | * |
Toshio Koide | 9be539e | 2014-10-23 18:43:30 -0700 | [diff] [blame] | 85 | * @param intentId the target Intent's id |
| 86 | * @return allocated resources for Intent |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 87 | * @deprecated in Emu Release |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 88 | */ |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 89 | @Deprecated |
Toshio Koide | 9be539e | 2014-10-23 18:43:30 -0700 | [diff] [blame] | 90 | LinkResourceAllocations getAllocations(IntentId intentId); |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 91 | |
| 92 | /** |
| 93 | * Returns available resources for given link. |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 94 | * |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 95 | * @param link a target link |
| 96 | * @return available resources for the target link |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 97 | * @deprecated in Emu Release |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 98 | */ |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 99 | @Deprecated |
Toshio Koide | 9be539e | 2014-10-23 18:43:30 -0700 | [diff] [blame] | 100 | Iterable<ResourceRequest> getAvailableResources(Link link); |
Thomas Vachuska | f997695 | 2014-10-24 11:55:05 -0700 | [diff] [blame] | 101 | |
| 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 SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 108 | * @deprecated in Emu Release |
Thomas Vachuska | f997695 | 2014-10-24 11:55:05 -0700 | [diff] [blame] | 109 | */ |
Sho SHIMIZU | 36163f9 | 2015-10-28 14:49:12 -0700 | [diff] [blame] | 110 | @Deprecated |
weibit | 00c94f5 | 2014-11-16 07:09:05 -0800 | [diff] [blame] | 111 | Iterable<ResourceRequest> getAvailableResources(Link link, |
Thomas Vachuska | 42e8cce | 2015-07-29 19:25:18 -0700 | [diff] [blame] | 112 | LinkResourceAllocations allocations); |
Ray Milkey | e97ede9 | 2014-11-20 10:43:12 -0800 | [diff] [blame] | 113 | |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 114 | } |