Revision 194,
1.3 KB
checked in by wojtekp, 13 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Line | |
---|
1 | package test.rewolucja.scheduling.plan; |
---|
2 | |
---|
3 | import java.util.Map; |
---|
4 | |
---|
5 | import schedframe.resources.units.ResourceUnit; |
---|
6 | import schedframe.scheduling.plan.impl.Allocation; |
---|
7 | import schedframe.scheduling.utils.ResourceParameterName; |
---|
8 | import test.rewolucja.resources.ProcessingElements; |
---|
9 | import test.rewolucja.resources.manager.utils.ResourceManagerUtils; |
---|
10 | |
---|
11 | public 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.