Interface TerminationHandler


public interface TerminationHandler
Interface for termination handlers, which are called after Elasticsearch receives a signal from the OS indicating it should shut down but before core services are stopped. These handlers may be called in any order or concurrently, so do not depend on ordering guarantees and leave the system in a functioning state so that other handlers can complete.

Note that this class is mostly for plumbing - translating a low-level signal received by a node process into a higher-level set of operations. Logic to respond to planned changes in cluster membership should use Node Shutdown primitives instead, see ShutdownAwarePlugin for lower-level plugin operations and NodesShutdownMetadata for cluster state level operations.

  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Block termination of this node.
    void
    The method which is called when the node is signalled to shut down.
  • Method Details

    • handleTermination

      void handleTermination()
      The method which is called when the node is signalled to shut down. This method should block until the node is ready to shut down.
    • blockTermination

      default void blockTermination()
      Block termination of this node. This method will be called during shutdown before any other shutdown actions occur, allowing the implementation to block termination until it is safe to shut down.