Class DelayingShutdownHook

  • All Implemented Interfaces:
    ShutdownHook, ContextAware, java.lang.Runnable

    public class DelayingShutdownHook
    extends ShutdownHookBase
    ShutdownHook implementation that stops the Logback context after a specified delay. The default delay is 0 ms (zero).
    • Field Detail

      • DEFAULT_DELAY

        public static final Duration DEFAULT_DELAY
        The default is no delay before shutdown.
    • Constructor Detail

      • DelayingShutdownHook

        public DelayingShutdownHook()
    • Method Detail

      • setDelay

        public void setDelay​(Duration delay)
        The duration to wait before shutting down the current logback context.
        Parameters:
        delay -
      • run

        public void run()