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 | |
| 18 | import java.util.Set; |
| 19 | |
| 20 | /** |
| 21 | * Abstraction of a resources of a link. |
Sho SHIMIZU | 364cbac | 2015-10-29 15:47:35 -0700 | [diff] [blame] | 22 | * |
| 23 | * @deprecated in Emu Release |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 24 | */ |
Sho SHIMIZU | 364cbac | 2015-10-29 15:47:35 -0700 | [diff] [blame] | 25 | @Deprecated |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 26 | public interface LinkResources { |
| 27 | |
| 28 | /** |
| 29 | * Returns resources as a set of {@link LinkResource}s. |
| 30 | * |
| 31 | * @return a set of {@link LinkResource}s |
| 32 | */ |
| 33 | Set<LinkResource> resources(); |
| 34 | |
| 35 | /** |
| 36 | * Builder of {@link LinkResources}. |
Sho SHIMIZU | 364cbac | 2015-10-29 15:47:35 -0700 | [diff] [blame] | 37 | * |
| 38 | * @deprecated in Emu Release |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 39 | */ |
Sho SHIMIZU | 364cbac | 2015-10-29 15:47:35 -0700 | [diff] [blame] | 40 | @Deprecated |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 41 | interface Builder { |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 42 | |
| 43 | /** |
| 44 | * Adds bandwidth resource. |
| 45 | * <p> |
| 46 | * This operation adds given bandwidth to previous bandwidth and |
| 47 | * generates single bandwidth resource. |
| 48 | * |
| 49 | * @param bandwidth bandwidth value to be added |
| 50 | * @return self |
| 51 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 52 | Builder addBandwidth(double bandwidth); |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 53 | |
| 54 | /** |
| 55 | * Adds lambda resource. |
| 56 | * |
| 57 | * @param lambda lambda value to be added |
| 58 | * @return self |
| 59 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 60 | Builder addLambda(int lambda); |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 61 | |
| 62 | /** |
| 63 | * Builds an immutable link resources. |
| 64 | * |
| 65 | * @return link resources |
| 66 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 67 | LinkResources build(); |
Toshio Koide | c9051db | 2014-10-20 15:18:37 -0700 | [diff] [blame] | 68 | } |
| 69 | } |