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