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 | */ |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 16 | package org.onlab.onos.net.resource; |
| 17 | |
| 18 | import java.util.Collection; |
| 19 | import java.util.Set; |
| 20 | |
| 21 | import org.onlab.onos.net.Link; |
| 22 | import org.onlab.onos.net.intent.IntentId; |
| 23 | |
| 24 | /** |
| 25 | * Representation of a request for link resource. |
| 26 | */ |
Toshio Koide | 65e890f | 2014-10-23 12:02:25 -0700 | [diff] [blame] | 27 | public interface LinkResourceRequest extends ResourceRequest { |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 28 | |
| 29 | /** |
| 30 | * Returns the {@link IntentId} associated with the request. |
| 31 | * |
| 32 | * @return the {@link IntentId} associated with the request |
| 33 | */ |
Toshio Koide | 65e890f | 2014-10-23 12:02:25 -0700 | [diff] [blame] | 34 | IntentId intendId(); |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 35 | |
| 36 | /** |
| 37 | * Returns the set of target links. |
| 38 | * |
| 39 | * @return the set of target links |
| 40 | */ |
Toshio Koide | 65e890f | 2014-10-23 12:02:25 -0700 | [diff] [blame] | 41 | Collection<Link> links(); |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 42 | |
| 43 | /** |
| 44 | * Returns the set of resource requests. |
| 45 | * |
| 46 | * @return the set of resource requests |
| 47 | */ |
Toshio Koide | 65e890f | 2014-10-23 12:02:25 -0700 | [diff] [blame] | 48 | Set<ResourceRequest> resources(); |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 49 | |
| 50 | /** |
| 51 | * Builder of link resource request. |
| 52 | */ |
Toshio Koide | 65e890f | 2014-10-23 12:02:25 -0700 | [diff] [blame] | 53 | interface Builder { |
| 54 | /** |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 55 | * Adds lambda request. |
| 56 | * |
| 57 | * @return self |
| 58 | */ |
Toshio Koide | 65e890f | 2014-10-23 12:02:25 -0700 | [diff] [blame] | 59 | public Builder addLambdaRequest(); |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 60 | |
| 61 | /** |
| 62 | * Adds bandwidth request with bandwidth value. |
| 63 | * |
| 64 | * @param bandwidth bandwidth value to be requested |
| 65 | * @return self |
| 66 | */ |
Toshio Koide | 65e890f | 2014-10-23 12:02:25 -0700 | [diff] [blame] | 67 | public Builder addBandwidthRequest(double bandwidth); |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 68 | |
| 69 | /** |
| 70 | * Returns link resource request. |
| 71 | * |
| 72 | * @return link resource request |
| 73 | */ |
Toshio Koide | 65e890f | 2014-10-23 12:02:25 -0700 | [diff] [blame] | 74 | public LinkResourceRequest build(); |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 75 | } |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 76 | } |