public synchronized void end() { for (PilotManager pilot : pilots) { try { pilot.stop(); } catch (DistributedAmuseException e) { logger.error("Failed to stop pilot: " + pilot, e); } } }
public synchronized void deletePilot(int pilotID) throws DistributedAmuseException { logger.debug("deleting reservation " + pilotID); for (int i = 0; i < pilots.size(); i++) { PilotManager pilot = pilots.get(i); if (pilotID == pilot.getID()) { pilots.remove(i); pilot.stop(); return; } } throw new DistributedAmuseException("Pilot " + pilotID + " not found"); }