public interface ShutdownPrepared
Serviceto prepare for shutdown. Important: Implementators of this interface must be a
Serviceas well. This allows
Processors to prepare for shutdown, such as when
Routeis shutting down. The
Processorcould be a stateful EIP such as the
AggregateProcessor, allowing it to do custom work to prepare for shutdown.
|Modifier and Type||Method and Description|
Prepares for shutdown.
void prepareShutdown(boolean forced)
ShutdownStrategysupports preparing for shutdown using two steps. First a regular preparation, where the given forced parameter will be false. And if the shutdown times out, then the
ShutdownStrategyperforms a more aggressive shutdown, calling this method a second time with true for the given forced parameter. For example by graceful stopping any threads or the likes. For forced shutdown, then the service is expected to aggressively shutdown any child services, such as thread pools etc. This is the last chance it has to perform such duties.
forced- true is forcing a more aggressive shutdown, false is for preparing to shutdown.