Package org.elasticsearch.shutdown
Class PluginShutdownService
java.lang.Object
org.elasticsearch.shutdown.PluginShutdownService
- All Implemented Interfaces:
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when cluster state changes.boolean
readyToShutdown
(String nodeId, SingleNodeShutdownMetadata.Type shutdownType) Check with registered plugins whether the shutdown is safe for the given node id and typeshutdownNodes
(ClusterState clusterState) Return all nodes shutting down from the given cluster stateshutdownTypeNodes
(ClusterState clusterState, SingleNodeShutdownMetadata.Type... shutdownTypes) Return all nodes shutting down with the given shutdown types from the given cluster statevoid
signalShutdown
(ClusterState state) Signal to plugins the nodes that are currently shutting down
-
Field Details
-
plugins
-
-
Constructor Details
-
PluginShutdownService
-
-
Method Details
-
shutdownNodes
Return all nodes shutting down from the given cluster state -
shutdownTypeNodes
public static Set<String> shutdownTypeNodes(ClusterState clusterState, SingleNodeShutdownMetadata.Type... shutdownTypes) Return all nodes shutting down with the given shutdown types from the given cluster state -
readyToShutdown
Check with registered plugins whether the shutdown is safe for the given node id and type -
signalShutdown
Signal to plugins the nodes that are currently shutting down -
clusterChanged
Description copied from interface:ClusterStateListener
Called when cluster state changes.- Specified by:
clusterChanged
in interfaceClusterStateListener
-