Class ShutdownPrepareService

java.lang.Object
org.elasticsearch.node.ShutdownPrepareService

public class ShutdownPrepareService extends Object
This class was created to extract out the logic from Node.prepareForClose() to facilitate testing.

Invokes hooks to prepare this node to be closed. This should be called when Elasticsearch receives a request to shut down gracefully from the underlying operating system, before system resources are closed.

Note that this class is part of infrastructure to react to signals from the operating system - most graceful shutdown logic should use Node Shutdown, see NodesShutdownMetadata.

  • Field Details

    • MAXIMUM_SHUTDOWN_TIMEOUT_SETTING

      public static final Setting<TimeValue> MAXIMUM_SHUTDOWN_TIMEOUT_SETTING
    • MAXIMUM_REINDEXING_TIMEOUT_SETTING

      public static final Setting<TimeValue> MAXIMUM_REINDEXING_TIMEOUT_SETTING
  • Constructor Details

  • Method Details

    • prepareForShutdown

      public void prepareForShutdown(TaskManager taskManager)
      Invokes hooks to prepare this node to be closed. This should be called when Elasticsearch receives a request to shut down gracefully from the underlying operating system, before system resources are closed. This method will block until the node is ready to shut down.

      Note that this class is part of infrastructure to react to signals from the operating system - most graceful shutdown logic should use Node Shutdown, see NodesShutdownMetadata.