org.apache.storm.daemon.supervisor

## Class ReadClusterState

- java.lang.Object
- - org.apache.storm.daemon.supervisor.ReadClusterState

- All Implemented Interfaces:
    AutoCloseable, Runnable

      public class ReadClusterState
      extends Object
      implements Runnable, AutoCloseable

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static UniFunc<Slot>` | `DEFAULT_ON_ERROR_TIMEOUT`
    `static BiConsumer<Slot,Long>` | `DEFAULT_ON_WARN_TIMEOUT`
    `static UniFunc<Slot>` | `THREAD_DUMP_ON_ERROR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReadClusterState(Supervisor supervisor)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `protected Map<String,Assignment>` | `getAssignmentsSnapshot(IStormClusterState stormClusterState)`
    `protected Map<String,List<ProfileRequest>>` | `getProfileActions(IStormClusterState stormClusterState, List<String> stormIds)`
    `protected Map<Integer,LocalAssignment>` | `readAssignments(Map<String,Assignment> assignmentsSnapshot)`
    `protected Map<Integer,LocalAssignment>` | `readMyExecutors(String topoId, String assignmentId, Assignment assignment)`
    `void` | `run()`
    `void` | `shutdownAllWorkers(BiConsumer<Slot,Long> onWarnTimeout, UniFunc<Slot> onErrorTimeout)`

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

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

- - ### Field Detail

    - #### DEFAULT_ON_ERROR_TIMEOUT

          public static final UniFunc<Slot> DEFAULT_ON_ERROR_TIMEOUT

    - #### THREAD_DUMP_ON_ERROR

          public static final UniFunc<Slot> THREAD_DUMP_ON_ERROR

    - #### DEFAULT_ON_WARN_TIMEOUT

          public static final BiConsumer<Slot,Long> DEFAULT_ON_WARN_TIMEOUT

  - ### Constructor Detail

    - #### ReadClusterState

          public ReadClusterState(Supervisor supervisor)
                           throws Exception

      Throws:
        `Exception`

  - ### Method Detail

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`

    - #### getAssignmentsSnapshot

          protected Map<String,Assignment> getAssignmentsSnapshot(IStormClusterState stormClusterState)
                                                           throws Exception

      Throws:
        `Exception`

    - #### getProfileActions

          protected Map<String,List<ProfileRequest>> getProfileActions(IStormClusterState stormClusterState,
                                                                       List<String> stormIds)
                                                                throws Exception

      Throws:
        `Exception`

    - #### readAssignments

          protected Map<Integer,LocalAssignment> readAssignments(Map<String,Assignment> assignmentsSnapshot)

    - #### readMyExecutors

          protected Map<Integer,LocalAssignment> readMyExecutors(String topoId,
                                                                 String assignmentId,
                                                                 Assignment assignment)

    - #### shutdownAllWorkers

          public void shutdownAllWorkers(BiConsumer<Slot,Long> onWarnTimeout,
                                         UniFunc<Slot> onErrorTimeout)

    - #### close

          public void close()

      Specified by:
        `close` in interface `AutoCloseable`

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