Showing
1 changed file
with
33 additions
and
1 deletions
| ... | @@ -20,20 +20,52 @@ import java.util.Set; | ... | @@ -20,20 +20,52 @@ import java.util.Set; |
| 20 | import org.onlab.onos.net.Link; | 20 | import org.onlab.onos.net.Link; |
| 21 | import org.onlab.onos.net.intent.IntentId; | 21 | import org.onlab.onos.net.intent.IntentId; |
| 22 | 22 | ||
| 23 | - | ||
| 24 | /** | 23 | /** |
| 25 | * Manages link resources. | 24 | * Manages link resources. |
| 26 | */ | 25 | */ |
| 27 | public interface LinkResourceStore { | 26 | public interface LinkResourceStore { |
| 27 | + /** | ||
| 28 | + * Returns free resources for given link. | ||
| 29 | + * | ||
| 30 | + * @param link a target link | ||
| 31 | + * @return free resources for given link | ||
| 32 | + */ | ||
| 28 | Set<ResourceAllocation> getFreeResources(Link link); | 33 | Set<ResourceAllocation> getFreeResources(Link link); |
| 29 | 34 | ||
| 35 | + /** | ||
| 36 | + * Allocates resources. | ||
| 37 | + * | ||
| 38 | + * @param allocations resources to be allocated | ||
| 39 | + */ | ||
| 30 | void allocateResources(LinkResourceAllocations allocations); | 40 | void allocateResources(LinkResourceAllocations allocations); |
| 31 | 41 | ||
| 42 | + /** | ||
| 43 | + * Releases resources. | ||
| 44 | + * | ||
| 45 | + * @param allocations resources to be released | ||
| 46 | + */ | ||
| 32 | void releaseResources(LinkResourceAllocations allocations); | 47 | void releaseResources(LinkResourceAllocations allocations); |
| 33 | 48 | ||
| 49 | + /** | ||
| 50 | + * Returns resources allocated for an Intent. | ||
| 51 | + * | ||
| 52 | + * @param intentId the target Intent's ID | ||
| 53 | + * @return allocated resources | ||
| 54 | + */ | ||
| 34 | LinkResourceAllocations getAllocations(IntentId intentId); | 55 | LinkResourceAllocations getAllocations(IntentId intentId); |
| 35 | 56 | ||
| 57 | + /** | ||
| 58 | + * Returns resources allocated for a link. | ||
| 59 | + * | ||
| 60 | + * @param link the target link | ||
| 61 | + * @return allocated resources | ||
| 62 | + */ | ||
| 36 | Iterable<LinkResourceAllocations> getAllocations(Link link); | 63 | Iterable<LinkResourceAllocations> getAllocations(Link link); |
| 37 | 64 | ||
| 65 | + /** | ||
| 66 | + * Returns all allocated resources. | ||
| 67 | + * | ||
| 68 | + * @return allocated resources | ||
| 69 | + */ | ||
| 38 | Iterable<LinkResourceAllocations> getAllocations(); | 70 | Iterable<LinkResourceAllocations> getAllocations(); |
| 39 | } | 71 | } | ... | ... |
-
Please register or login to post a comment