Search in sources :

Example 1 with Shutdownable

use of org.apache.storm.daemon.Shutdownable in project storm by apache.

the class ProcessSimulator method killProcess.

/**
     * Kill a process
     * 
     * @param pid
     */
public static void killProcess(String pid) {
    synchronized (lock) {
        LOG.info("Begin killing process " + pid);
        Shutdownable shutdownHandle = processMap.get(pid);
        if (shutdownHandle != null) {
            shutdownHandle.shutdown();
        }
        processMap.remove(pid);
        LOG.info("Successfully killed process " + pid);
    }
}
Also used : Shutdownable(org.apache.storm.daemon.Shutdownable)

Aggregations

Shutdownable (org.apache.storm.daemon.Shutdownable)1