source: DCWoRMS/trunk/src/schedframe/resources/computing/DataCenter.java @ 520

Revision 520, 1.1 KB checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
RevLine 
[477]1package schedframe.resources.computing;
2
[520]3import java.util.List;
4
5import schedframe.resources.StandardResourceType;
[477]6import schedframe.resources.computing.description.ComputingResourceDescription;
7import schedframe.resources.computing.profiles.energy.EnergyExtension;
[495]8import schedframe.resources.computing.profiles.energy.power.PowerInterfaceFactory;
[477]9import schedframe.resources.computing.profiles.energy.power.ui.PowerInterface;
10
11public class DataCenter extends ComputingResource{
12
13        public DataCenter(ComputingResourceDescription resDesc) {
14                super(resDesc);
15                //extensionList.add(new EnergyExtension(this, resDesc.getPowerInterface(), resDesc.getEnergyEstimationPlugin()));
[495]16                PowerInterface pi = PowerInterfaceFactory.createPowerInterface(this, resDesc.getPowerProfile());
[477]17                accept(new EnergyExtension(pi, resDesc.getPowerProfile()));
18        }
19               
20        public void accept(EnergyExtension e){
21                extensionList.add(e);
22                e.setResource(this);
23        }
[520]24       
25        @SuppressWarnings("unchecked")
26        public List<ComputingNode> getComputingNodes(){
27                return (List<ComputingNode>) getDescendantsByType(StandardResourceType.ComputingNode);
28        }
[477]29}
Note: See TracBrowser for help on using the repository browser.