Showing
2 changed files
with
12 additions
and
5 deletions
... | @@ -5,6 +5,12 @@ package org.onlab.onos.net.resource; | ... | @@ -5,6 +5,12 @@ package org.onlab.onos.net.resource; |
5 | */ | 5 | */ |
6 | public class BandwidthResourceAllocation extends BandwidthResourceRequest | 6 | public class BandwidthResourceAllocation extends BandwidthResourceRequest |
7 | implements ResourceAllocation { | 7 | implements ResourceAllocation { |
8 | + | ||
9 | + @Override | ||
10 | + public ResourceType type() { | ||
11 | + return ResourceType.BANDWIDTH; | ||
12 | + } | ||
13 | + | ||
8 | /** | 14 | /** |
9 | * Creates a new {@link BandwidthResourceAllocation} with {@link Bandwidth} | 15 | * Creates a new {@link BandwidthResourceAllocation} with {@link Bandwidth} |
10 | * object. | 16 | * object. |
... | @@ -14,9 +20,4 @@ public class BandwidthResourceAllocation extends BandwidthResourceRequest | ... | @@ -14,9 +20,4 @@ public class BandwidthResourceAllocation extends BandwidthResourceRequest |
14 | public BandwidthResourceAllocation(Bandwidth bandwidth) { | 20 | public BandwidthResourceAllocation(Bandwidth bandwidth) { |
15 | super(bandwidth); | 21 | super(bandwidth); |
16 | } | 22 | } |
17 | - | ||
18 | - @Override | ||
19 | - public ResourceType type() { | ||
20 | - return ResourceType.BANDWIDTH; | ||
21 | - } | ||
22 | } | 23 | } | ... | ... |
... | @@ -4,5 +4,11 @@ package org.onlab.onos.net.resource; | ... | @@ -4,5 +4,11 @@ package org.onlab.onos.net.resource; |
4 | * Abstraction of allocated resource. | 4 | * Abstraction of allocated resource. |
5 | */ | 5 | */ |
6 | public interface ResourceAllocation extends ResourceRequest { | 6 | public interface ResourceAllocation extends ResourceRequest { |
7 | + | ||
8 | + /** | ||
9 | + * Returns the type of the allocated resource. | ||
10 | + * | ||
11 | + * @return the type of the allocated resource | ||
12 | + */ | ||
7 | ResourceType type(); | 13 | ResourceType type(); |
8 | } | 14 | } | ... | ... |
-
Please register or login to post a comment