org.apache.storm

## Class ProcessSimulator

- java.lang.Object
- - org.apache.storm.ProcessSimulator

-     public class ProcessSimulator
      extends Object

  In local mode, `ProcessSimulator` keeps track of Shutdownable objects in place of actual processes (in cluster mode).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static ConcurrentHashMap<String,Shutdownable>` | `processMap`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProcessSimulator()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### processMap

          protected static ConcurrentHashMap<String,Shutdownable> processMap

  - ### Constructor Detail

    - #### ProcessSimulator

          public ProcessSimulator()

  - ### Method Detail

    - #### registerProcess

          public static void registerProcess(String pid,
                                             Shutdownable shutdownable)

      Register a process’ handle.

    - #### getAllProcessHandles

          public static Collection<Shutdownable> getAllProcessHandles()

      Get all process handles.

    - #### killProcess

          public static void killProcess(String pid)

      Kill a process.

    - #### killAllProcesses

          public static void killAllProcesses()

      Kill all processes.

Copyright © 2021 The Apache Software Foundation. All rights reserved.