source: xssim/trunk/src/test/rewolucja/scheduling/plan/AllocationNew.java @ 194

Revision 194, 1.3 KB checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package test.rewolucja.scheduling.plan;
2
3import java.util.Map;
4
5import schedframe.resources.units.ResourceUnit;
6import schedframe.scheduling.plan.impl.Allocation;
7import schedframe.scheduling.utils.ResourceParameterName;
8import test.rewolucja.resources.ProcessingElements;
9import test.rewolucja.resources.manager.utils.ResourceManagerUtils;
10
11public class AllocationNew extends Allocation implements AllocationInterfaceNew {
12
13        protected Map<ResourceParameterName, ResourceUnit> requestedResources;
14        protected boolean isProcessing = false;
15        protected String providerName;
16
17        @Override
18        public void setSpecificResources(
19                        Map<ResourceParameterName, ResourceUnit> choosenResources) {
20                requestedResources = choosenResources;
21                ResourceManagerUtils.setPendingResources(choosenResources);
22                ProcessingElements processingElements = (ProcessingElements)requestedResources.get(ResourceParameterName.PROCESSINGELEMENTS);
23                if(processingElements != null){
24                        isProcessing = true;
25                }       
26        }
27
28        @Override
29        public Map<ResourceParameterName, ResourceUnit> getRequestedResources() {
30                return this.requestedResources;
31        }
32
33        public boolean isProcessing(){
34                return isProcessing;
35        }
36
37        @Override
38        public void setProviderName(String providerName) {
39                this.providerName = providerName;       
40        }
41
42        @Override
43        public String getProviderName() {
44                return providerName;
45        }
46}
Note: See TracBrowser for help on using the repository browser.