blob: 4645042791270b19f12151a285ed6b897b769945 [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
18import java.util.Set;
19
20/**
21 * Abstraction of a resources of a link.
Sho SHIMIZU364cbac2015-10-29 15:47:35 -070022 *
23 * @deprecated in Emu Release
Toshio Koidec9051db2014-10-20 15:18:37 -070024 */
Sho SHIMIZU364cbac2015-10-29 15:47:35 -070025@Deprecated
Toshio Koidec9051db2014-10-20 15:18:37 -070026public 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 SHIMIZU364cbac2015-10-29 15:47:35 -070037 *
38 * @deprecated in Emu Release
Toshio Koidec9051db2014-10-20 15:18:37 -070039 */
Sho SHIMIZU364cbac2015-10-29 15:47:35 -070040 @Deprecated
Sho SHIMIZU3310a342015-05-13 12:14:05 -070041 interface Builder {
Toshio Koidec9051db2014-10-20 15:18:37 -070042
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 SHIMIZU3310a342015-05-13 12:14:05 -070052 Builder addBandwidth(double bandwidth);
Toshio Koidec9051db2014-10-20 15:18:37 -070053
54 /**
55 * Adds lambda resource.
56 *
57 * @param lambda lambda value to be added
58 * @return self
59 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070060 Builder addLambda(int lambda);
Toshio Koidec9051db2014-10-20 15:18:37 -070061
62 /**
63 * Builds an immutable link resources.
64 *
65 * @return link resources
66 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070067 LinkResources build();
Toshio Koidec9051db2014-10-20 15:18:37 -070068 }
69}