/** * Destroys the JVM running this stage and removes it's working files. * Should a JVM shutdown fail, it will throw an IllegalStateException. */ public void destroy() { logger.debug("Attempting to destroy JVM running stage group " + stageGroup.getName()); boolean success = stageDestroyer.killAll(); if (success) { logger.debug("... destruction successful"); } else { logger.error("JVM running stage group " + stageGroup.getName() + " was not killed"); throw new IllegalStateException("Orphaned process for " + stageGroup.getName()); } removeFiles(); wasKilled = true; }