Sketched out changes to link resource service to support intent replacement mechanism.
Showing
2 changed files
with
33 additions
and
0 deletions
... | @@ -24,6 +24,16 @@ public interface LinkResourceService { | ... | @@ -24,6 +24,16 @@ public interface LinkResourceService { |
24 | void releaseResources(LinkResourceAllocations allocations); | 24 | void releaseResources(LinkResourceAllocations allocations); |
25 | 25 | ||
26 | /** | 26 | /** |
27 | + * Updates previously made allocations with a new resource request. | ||
28 | + * | ||
29 | + * @param req updated resource request | ||
30 | + * @param oldAllocations old resource allocations | ||
31 | + * @return new resource allocations | ||
32 | + */ | ||
33 | + LinkResourceAllocations updateResources(LinkResourceRequest req, | ||
34 | + LinkResourceAllocations oldAllocations); | ||
35 | + | ||
36 | + /** | ||
27 | * Returns all allocated resources. | 37 | * Returns all allocated resources. |
28 | * | 38 | * |
29 | * @return allocated resources | 39 | * @return allocated resources |
... | @@ -61,4 +71,15 @@ public interface LinkResourceService { | ... | @@ -61,4 +71,15 @@ public interface LinkResourceService { |
61 | * @return available resources for the target link | 71 | * @return available resources for the target link |
62 | */ | 72 | */ |
63 | ResourceRequest getAvailableResources(Link link); | 73 | ResourceRequest getAvailableResources(Link link); |
74 | + | ||
75 | + /** | ||
76 | + * Returns available resources for given link. | ||
77 | + * | ||
78 | + * @param link a target link | ||
79 | + * @param allocations allocations to be included as available | ||
80 | + * @return available resources for the target link | ||
81 | + */ | ||
82 | + ResourceRequest getAvailableResources(Link link, | ||
83 | + LinkResourceAllocations allocations); | ||
84 | + | ||
64 | } | 85 | } | ... | ... |
... | @@ -79,6 +79,12 @@ public class LinkResourceManager implements LinkResourceService { | ... | @@ -79,6 +79,12 @@ public class LinkResourceManager implements LinkResourceService { |
79 | } | 79 | } |
80 | 80 | ||
81 | @Override | 81 | @Override |
82 | + public LinkResourceAllocations updateResources(LinkResourceRequest req, | ||
83 | + LinkResourceAllocations oldAllocations) { | ||
84 | + return null; | ||
85 | + } | ||
86 | + | ||
87 | + @Override | ||
82 | public Iterable<LinkResourceAllocations> getAllocations() { | 88 | public Iterable<LinkResourceAllocations> getAllocations() { |
83 | // TODO Auto-generated method stub | 89 | // TODO Auto-generated method stub |
84 | return null; | 90 | return null; |
... | @@ -108,4 +114,10 @@ public class LinkResourceManager implements LinkResourceService { | ... | @@ -108,4 +114,10 @@ public class LinkResourceManager implements LinkResourceService { |
108 | return null; | 114 | return null; |
109 | } | 115 | } |
110 | 116 | ||
117 | + @Override | ||
118 | + public ResourceRequest getAvailableResources(Link link, | ||
119 | + LinkResourceAllocations allocations) { | ||
120 | + return null; | ||
121 | + } | ||
122 | + | ||
111 | } | 123 | } | ... | ... |
-
Please register or login to post a comment