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

Revision 104, 1.6 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 javax.jws.soap.SOAPBinding.Use;
6
7import schedframe.resources.units.Memory;
8import schedframe.resources.units.ResourceUnit;
9import schedframe.scheduling.plan.impl.Allocation;
10import schedframe.scheduling.utils.ResourceParameterName;
11import test.rewolucja.resources.ProcessingElements;
12import test.rewolucja.resources.ResourceStatus;
13import test.rewolucja.resources.UnitState;
14import test.rewolucja.resources.manager.implementation.ResourceManager;
15import test.rewolucja.resources.manager.utils.ResourceManagerUtils;
16import test.rewolucja.resources.physical.base.ComputingResource;
17
18public class AllocationNew extends Allocation implements AllocationInterfaceNew {
19
20        protected Map<ResourceParameterName, ResourceUnit> requestedResources;
21        protected boolean isProcessing = false;
22        protected String providerName;
23
24        @Override
25        public void setSpecificResources(
26                        Map<ResourceParameterName, ResourceUnit> choosenResources) {
27                requestedResources = choosenResources;
28                ResourceManagerUtils.setPendingResources(choosenResources);
29                ProcessingElements processingElements = (ProcessingElements)requestedResources.get(ResourceParameterName.PROCESSINGELEMENTS);
30                if(processingElements != null){
31                        isProcessing = true;
32                }       
33               
34        }
35       
36
37        @Override
38        public Map<ResourceParameterName, ResourceUnit> getRequestedResources() {
39                return this.requestedResources;
40        }
41
42        public boolean isProcessing(){
43                return isProcessing;
44        }
45
46
47
48        @Override
49        public void setProviderName(String providerName) {
50                this.providerName = providerName;       
51        }
52
53        @Override
54        public String getProviderName() {
55                return providerName;
56        }
57}
Note: See TracBrowser for help on using the repository browser.