Thomas Vachuska

Sketched out changes to link resource service to support intent replacement mechanism.

......@@ -24,6 +24,16 @@ public interface LinkResourceService {
void releaseResources(LinkResourceAllocations allocations);
/**
* Updates previously made allocations with a new resource request.
*
* @param req updated resource request
* @param oldAllocations old resource allocations
* @return new resource allocations
*/
LinkResourceAllocations updateResources(LinkResourceRequest req,
LinkResourceAllocations oldAllocations);
/**
* Returns all allocated resources.
*
* @return allocated resources
......@@ -61,4 +71,15 @@ public interface LinkResourceService {
* @return available resources for the target link
*/
ResourceRequest getAvailableResources(Link link);
/**
* Returns available resources for given link.
*
* @param link a target link
* @param allocations allocations to be included as available
* @return available resources for the target link
*/
ResourceRequest getAvailableResources(Link link,
LinkResourceAllocations allocations);
}
......
......@@ -79,6 +79,12 @@ public class LinkResourceManager implements LinkResourceService {
}
@Override
public LinkResourceAllocations updateResources(LinkResourceRequest req,
LinkResourceAllocations oldAllocations) {
return null;
}
@Override
public Iterable<LinkResourceAllocations> getAllocations() {
// TODO Auto-generated method stub
return null;
......@@ -108,4 +114,10 @@ public class LinkResourceManager implements LinkResourceService {
return null;
}
@Override
public ResourceRequest getAvailableResources(Link link,
LinkResourceAllocations allocations) {
return null;
}
}
......