Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 1.24 KB

index.md

File metadata and controls

25 lines (17 loc) · 1.24 KB

tw-graceful-shutdown Documentation

A library to help keep your service alive until all clients become aware that your service is going to shut down.

Table of Contents

How it Works

When application has started:
  1. It calls applicationStarted for each GracefulShutdownStrategy.
When application is stopped:
  1. GracefulShutdowner receives a stop notification.
  2. It calls prepareForShutdown for each GracefulShutdownStrategy
  3. Waits for 30 secs so that all clients understand that they should not call this application node anymore.
  4. 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.