Interface ShutdownController
-
- All Known Implementing Classes:
ExecutorShutdownController,ShutdownController.Wrapper
public interface ShutdownControllerThe shutdown controller allows registering hooks run on the three shutdown phases:- prepare: stop accepting new work (e.g. stop accepting HTTP requests).
- perform: shut things down, save state if applicable etc.
- finalize: shutdown the core components like the work thread pool or a database connections.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceShutdownController.Actuatorstatic classShutdownController.IllegalShutdownStateExceptionstatic classShutdownController.Statestatic classShutdownController.Wrapper
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonFinalize(io.vavr.CheckedRunnable callback)voidonPerform(io.vavr.CheckedRunnable callback)voidonPrepare(io.vavr.CheckedRunnable callback)ShutdownController.Statestate()
-
-
-
Method Detail
-
onPrepare
void onPrepare(io.vavr.CheckedRunnable callback)
-
onPerform
void onPerform(io.vavr.CheckedRunnable callback)
-
onFinalize
void onFinalize(io.vavr.CheckedRunnable callback)
-
state
ShutdownController.State state()
-
-