@Override public List<VirtualMachine> list(Machine owner) { List<VirtualMachine> vms = new ArrayList<VirtualMachine>(); vms.addAll(memory(owner.getId()).values()); return vms; }
@Override public void migrate(VirtualMachine vm, Machine source, Machine dest) { migrationHistory.add(new Object[] {vm, source, dest}); memory(source.getId()).remove(vm.getName()); memory(dest.getId()).put(vm.getName(), vm); }
@Override public VirtualMachine find(Machine owner, String name) { return memory.get(owner.getId()).get(name); }