Changeset 1384 for DCWoRMS/branches
- Timestamp:
- 06/18/14 14:05:53 (11 years ago)
- Location:
- DCWoRMS/branches/coolemall/src/schedframe/resources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/ui/NodePowerInterface.java
r1321 r1384 14 14 public class NodePowerInterface extends ComputingResourcePowerInterface{ 15 15 16 public static long START_TIME = 600000;17 public static long SHUTDOWN_TIME = 300000;18 public static double START_COST = 4000;19 public static double SHUTDOWN_COST = 2000;20 21 22 16 public NodePowerInterface(ComputingResource resource, PowerProfile pp){ 23 17 super(resource, pp); -
DCWoRMS/branches/coolemall/src/schedframe/resources/units/PEUnit.java
r477 r1384 1 1 package schedframe.resources.units; 2 3 4 2 5 3 -
DCWoRMS/branches/coolemall/src/schedframe/resources/units/ProcessingElements.java
r738 r1384 17 17 public ProcessingElements(){ 18 18 super(); 19 resources = new ArrayList<ComputingResource>(1);20 provisioner = new ProcessingElementsResourceUnitProvisioner(ResourceUnitState.FREE, 0);19 this.resources = new ArrayList<ComputingResource>(1); 20 this.provisioner = new ProcessingElementsResourceUnitProvisioner(ResourceUnitState.FREE, 0); 21 21 } 22 22 -
DCWoRMS/branches/coolemall/src/schedframe/resources/units/ResourceUnitFactory.java
r781 r1384 37 37 return new SimpleResourceUnit(ResourceUnitNameFactory.createResourceUnitName(unitName), resId, totalAmount, usedAmount); 38 38 } 39 40 public static ResourceUnit createUnit(String unitName, int totalAmount, int usedAmount){ 41 if(unitName.equalsIgnoreCase(StandardResourceUnitName.CPU.getName())) 42 return new PEUnit(totalAmount, usedAmount, 1); 43 else if(unitName.equalsIgnoreCase(StandardResourceUnitName.MEMORY.getName())) 44 return new Memory(totalAmount, usedAmount); 45 else if (unitName.equalsIgnoreCase(StandardResourceUnitName.CPUSPEED.getName())) 46 return new CpuSpeed(totalAmount, usedAmount); 47 else 48 return new SimpleResourceUnit(ResourceUnitNameFactory.createResourceUnitName(unitName), totalAmount, usedAmount); 49 } 50 51 52 public static ResourceUnit createUnit(ResourceUnitName unitName, int totalAmount, int usedAmount){ 53 if(unitName.equals(StandardResourceUnitName.CPU)) 54 return new PEUnit(totalAmount, usedAmount, 1); 55 else if(unitName.equals(StandardResourceUnitName.MEMORY)) 56 return new Memory(totalAmount, usedAmount); 57 else if (unitName.equals(StandardResourceUnitName.CPUSPEED)) 58 return new CpuSpeed(totalAmount, usedAmount); 59 else 60 return new SimpleResourceUnit(unitName, totalAmount, usedAmount); 61 } 62 63 /*public static ResourceUnit creteUnit(String resourceClass, int totalAmount, int usedAmount){ 64 65 switch(ResourceUnitClass.valueOf(resourceClass)){ 66 case CPU: return new Processors(totalAmount, usedAmount, 1); 67 case MEMORY: return new Memory(totalAmount, usedAmount); 68 case STORAGE: return new Storage(totalAmount, usedAmount); 69 default: 70 71 throw new IllegalArgumentException("Paramter " + resourceClass + " is not supported."); 72 } 73 }*/ 39 74 40 }
Note: See TracChangeset
for help on using the changeset viewer.