1 package at.ac.tuwien.lsdc.management;
3 import java.util.HashMap;
5 import at.ac.tuwien.lsdc.types.PhysicalMachine;
7 public class MachineManager {
8 // this class is responsible to start and stop PMs & VMs
9 // also it will be used to put an application on a VM
10 // move an application and get utilization data
12 private HashMap<Integer, PhysicalMachine> PMs = new HashMap<Integer, PhysicalMachine>();
14 public double getTotalConsumption() {
15 double consumption = 0;
16 for (PhysicalMachine pm : PMs.values()) {
18 consumption = consumption + pm.getConsumption();