Interface OrderlyShutdownCapable


public interface OrderlyShutdownCapable
Interface for components that wish to be considered for an orderly shutdown using management interfaces. beforeShutdown() will be called before schedulers, executors etc, are stopped. afterShutdown() is called after the shutdown delay.
Since:
2.2
  • Method Summary

    Modifier and Type Method Description
    int afterShutdown()
    Called after normal shutdown of schedulers, executors etc, and after the shutdown delay has elapsed, but before any forced shutdown of any remaining active scheduler/executor threads.Can optionally return the number of active messages still in process.
    int beforeShutdown()
    Called before shutdown begins.
  • Method Details

    • beforeShutdown

      int beforeShutdown()
      Called before shutdown begins. Implementations should stop accepting new messages. Can optionally return the number of active messages in process.
      Returns:
      The number of active messages if available.
    • afterShutdown

      int afterShutdown()
      Called after normal shutdown of schedulers, executors etc, and after the shutdown delay has elapsed, but before any forced shutdown of any remaining active scheduler/executor threads.Can optionally return the number of active messages still in process.
      Returns:
      The number of active messages if available.