Package io.micronaut.runtime.graceful
Class GracefulShutdownManager
java.lang.Object
io.micronaut.runtime.graceful.GracefulShutdownManager
@Singleton
@Requires(classes=GracefulShutdownCapable.class)
public final class GracefulShutdownManager
extends Object
Helper class that can be used to call all
GracefulShutdownCapable
beans.- Since:
- 4.9.0
- Author:
- Jonas Konrad
-
Method Summary
Modifier and TypeMethodDescriptionReport theshutdown state
of all capable beans.Shut down allGracefulShutdownCapable
beans.
-
Method Details
-
shutdownGracefully
Shut down allGracefulShutdownCapable
beans. Semantics of this method are likeGracefulShutdownCapable.shutdownGracefully()
.- Returns:
- A future that completes when all
GracefulShutdownCapable
beans have shut down
-
reportActiveTasks
Report theshutdown state
of all capable beans.- Returns:
- The combined number of active tasks
-