public interface ShutdownAwarePlugin
A
ShutdownAwarePlugin is a plugin that can be made aware of a shutdown. It comprises two
parts, one part used for telling plugins that a set of nodes are going to be shut down
(signalShutdown(Collection)), the other for retrieving the status of those plugins
as to whether it is safe to shut down (safeToShutdown(String, SingleNodeShutdownMetadata.Type)-
Method Summary
Modifier and TypeMethodDescriptionbooleansafeToShutdown(String nodeId, SingleNodeShutdownMetadata.Type shutdownType) Whether the plugin is considered safe to shut down.voidsignalShutdown(Collection<String> shutdownNodeIds) A trigger to notify the plugin that a shutdown for the nodes has been triggered.
-
Method Details
-
safeToShutdown
Whether the plugin is considered safe to shut down. This method is called when the status of a shutdown is retrieved via the API, and it is only called on the master node. -
signalShutdown
A trigger to notify the plugin that a shutdown for the nodes has been triggered. This method will be called on every node for each cluster state, so it should return quickly.
-