- Timestamp:
- 11/28/13 10:54:54 (11 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/Node.java
r1207 r1247 1 1 package schedframe.resources.computing; 2 2 3 import java.util.ArrayList; 3 4 import java.util.List; 4 5 import java.util.Properties; … … 9 10 import schedframe.resources.computing.extensions.ExtensionType; 10 11 import schedframe.resources.computing.profiles.energy.EnergyExtension; 11 import schedframe.resources.computing.profiles.energy.power.ui. ComputingNodePowerInterface;12 import schedframe.resources.computing.properties. ComputingNodePropertiesBuilder;12 import schedframe.resources.computing.profiles.energy.power.ui.NodePowerInterface; 13 import schedframe.resources.computing.properties.NodePropertiesBuilder; 13 14 import schedframe.resources.computing.properties.PropertiesDirector; 14 15 import schedframe.resources.units.Cost; … … 16 17 import schedframe.resources.units.StandardResourceUnitName; 17 18 18 public class ComputingNode extends ComputingResource{19 public class Node extends ComputingResource{ 19 20 20 21 21 public ComputingNode (ComputingResourceDescription resDesc) {22 public Node (ComputingResourceDescription resDesc) { 22 23 super(resDesc); 23 24 … … 29 30 } 30 31 31 public ComputingNodePowerInterface getPowerInterface(){32 ComputingNodePowerInterface powerInterface = null;32 public NodePowerInterface getPowerInterface(){ 33 NodePowerInterface powerInterface = null; 33 34 if(extensionList.isExtensionAvailable(ExtensionType.ENERGY_EXTENSION)){ 34 35 EnergyExtension ee = (EnergyExtension)extensionList.getExtension(ExtensionType.ENERGY_EXTENSION); 35 powerInterface = ( ComputingNodePowerInterface)ee.getPowerInterface();36 powerInterface = (NodePowerInterface)ee.getPowerInterface(); 36 37 } 37 38 return powerInterface; … … 48 49 } 49 50 51 public List<Core> getCores(){ 52 List<Core> cores = new ArrayList<Core>(); 53 for(Processor proc: getProcessors()){ 54 cores.addAll(proc.getCores()); 55 } 56 return cores; 57 } 58 59 public List<Core> getFreeCores(){ 60 List<Core> freeCores = new ArrayList<Core>(); 61 for(Processor proc: getProcessors()){ 62 freeCores.addAll(proc.getFreeCores()); 63 } 64 return freeCores; 65 } 66 50 67 public int getProcessorsNumber() { 51 68 return getProcessors().size(); … … 88 105 public Properties getProperties(){ 89 106 PropertiesDirector propDirector = new PropertiesDirector(); 90 propDirector.setPropertiesBuilder(new ComputingNodePropertiesBuilder());107 propDirector.setPropertiesBuilder(new NodePropertiesBuilder()); 91 108 propDirector.constructProperties(this); 92 109 return propDirector.getProperties();
Note: See TracChangeset
for help on using the changeset viewer.