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 stateof all capable beans.Shut down allGracefulShutdownCapablebeans.
-
Method Details
-
shutdownGracefully
Shut down allGracefulShutdownCapablebeans. Semantics of this method are likeGracefulShutdownCapable.shutdownGracefully().- Returns:
- A future that completes when all
GracefulShutdownCapablebeans have shut down
-
reportActiveTasks
Report theshutdown stateof all capable beans.- Returns:
- The combined number of active tasks
-