Package ch.qos.logback.core.hook

# Class DelayingShutdownHook

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.hook.ShutdownHookBase
ch.qos.logback.core.hook.DelayingShutdownHook

All Implemented Interfaces:
  `ShutdownHook`, `ContextAware`, `Runnable`

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

Author:
  Mike Reinhold

## Field Summary

Fields
Modifier and Type
Field
Description
`static final Duration`
`DEFAULT_DELAY`
The default is no delay before shutdown.

### Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

`context`

## Constructor Summary

Constructors
Constructor
Description
`DelayingShutdownHook()`

## Method Summary

Modifier and Type
Method
Description
`Duration`
`getDelay()`
`void`
`run()`
`void`
`setDelay(Duration delay)`
The duration to wait before shutting down the current logback context.

### Methods inherited from class ch.qos.logback.core.hook.ShutdownHookBase

`stop`

### Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface ch.qos.logback.core.spi.ContextAware

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext`

## Field Details

### DEFAULT_DELAY

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

## Constructor Details

### DelayingShutdownHook

public DelayingShutdownHook()

## Method Details

### getDelay

public Duration getDelay()

### setDelay

public void setDelay(Duration delay)
The duration to wait before shutting down the current logback context.

Parameters:
  `delay` -

### run

public void run()