Class PluginShutdownService

org.elasticsearch.shutdown.PluginShutdownService
All Implemented Interfaces:
ClusterStateListener

public class PluginShutdownService extends implements ClusterStateListener
The PluginShutdownService is used for the node shutdown infrastructure to signal to plugins that a shutdown is occurring, and to check whether it is safe to shut down.
  • Field Details

  • Constructor Details

    • PluginShutdownService

      public PluginShutdownService(@Nullable <ShutdownAwarePlugin> plugins)
  • Method Details

    • shutdownNodes

      public static <> shutdownNodes(ClusterState clusterState)
      Return all nodes shutting down from the given cluster state
    • shutdownTypeNodes

      public static <> shutdownTypeNodes(ClusterState clusterState, SingleNodeShutdownMetadata.Type shutdownType)
      Return all nodes shutting down with the given shutdown type from the given cluster state
    • readyToShutdown

      public boolean readyToShutdown( nodeId, SingleNodeShutdownMetadata.Type shutdownType)
      Check with registered plugins whether the shutdown is safe for the given node id and type
    • signalShutdown

      public void signalShutdown(ClusterState state)
      Signal to plugins the nodes that are currently shutting down
    • clusterChanged

      public void clusterChanged(ClusterChangedEvent event)
      Description copied from interface: ClusterStateListener
      Called when cluster state changes.
      Specified by:
      clusterChanged in interface ClusterStateListener