1 /* Copyright (c) 2012-2014, 2016. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 package process.migration;
9 import org.simgrid.msg.Msg;
10 import org.simgrid.msg.Host;
11 import org.simgrid.msg.Process;
12 import org.simgrid.msg.MsgException;
13 import org.simgrid.msg.HostNotFoundException;
15 public class Policeman extends Process {
16 public Policeman(String hostname, String name) throws HostNotFoundException {
17 super(hostname, name);
20 public void main(String[] args) throws MsgException {
23 Msg.info("Wait a bit before migrating the emigrant.");
27 Main.processToMigrate.migrate(Host.getByName("Jacquelin"));
28 Msg.info("I moved the emigrant");
29 Main.processToMigrate.resume();