blob: 909563325ddc8542f4cbe482775895216ff4edda [file] [log] [blame]
Toshio Koide485b4782014-10-20 19:34:21 -07001package org.onlab.onos.net.resource;
2
3/**
4 * Representation of allocated lambda resource.
5 */
Toshio Koided707d7a2014-10-23 12:37:51 -07006public class LambdaResourceAllocation extends LambdaResourceRequest
7 implements ResourceAllocation {
Toshio Koidefa0dff62014-10-23 11:46:44 -07008 private final Lambda lambda;
9
Toshio Koided1865a42014-10-23 12:44:55 -070010 @Override
11 public ResourceType type() {
12 return ResourceType.LAMBDA;
13 }
14
Toshio Koidefa0dff62014-10-23 11:46:44 -070015 /**
16 * Creates a new {@link LambdaResourceAllocation} with {@link Lambda}
17 * object.
18 *
19 * @param lambda allocated lambda
20 */
21 public LambdaResourceAllocation(Lambda lambda) {
22 this.lambda = lambda;
23 }
24
Toshio Koide485b4782014-10-20 19:34:21 -070025 /**
26 * Returns the lambda resource.
27 *
28 * @return the lambda resource
29 */
Toshio Koided1865a42014-10-23 12:44:55 -070030 public Lambda lambda() {
Toshio Koidefa0dff62014-10-23 11:46:44 -070031 return lambda;
32 }
Toshio Koide485b4782014-10-20 19:34:21 -070033}