public class ProcessSimulator extends Object
In local mode, ProcessSimulator
keeps track of Shutdownable objects in place of actual processes (in cluster mode).
Modifier and Type | Field and Description |
---|---|
protected static ConcurrentHashMap<String,Shutdownable> |
processMap |
Constructor and Description |
---|
ProcessSimulator() |
Modifier and Type | Method and Description |
---|---|
static Collection<Shutdownable> |
getAllProcessHandles()
Get all process handles.
|
static void |
killAllProcesses()
Kill all processes.
|
static void |
killProcess(String pid)
Kill a process.
|
static void |
registerProcess(String pid,
Shutdownable shutdownable)
Register a process’ handle.
|
protected static ConcurrentHashMap<String,Shutdownable> processMap
public static void registerProcess(String pid, Shutdownable shutdownable)
Register a process’ handle.
public static Collection<Shutdownable> getAllProcessHandles()
Get all process handles.
public static void killProcess(String pid)
Kill a process.
public static void killAllProcesses()
Kill all processes.
Copyright © 2020 The Apache Software Foundation. All rights reserved.