A library to help keep your service alive until all clients become aware that your service is going to shut down.
- It calls
applicationStarted
for eachGracefulShutdownStrategy
.
GracefulShutdowner
receives a stop notification.- It calls
prepareForShutdown
for eachGracefulShutdownStrategy
- Waits for 30 secs so that all clients understand that they should not call this application node anymore.
- Waits until all strategies return true in the
canShutdown
method.
Here is the list of default GracefulShutdownStrategy
implementations.
You can add your own by just creating a bean that implements GracefulShutdownStrategy
.