public interface ShutdownCallbackRegistry
LifeCycle
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SHUTDOWN_CALLBACK_REGISTRY
System property to set to choose the ShutdownCallbackRegistry.
|
static java.lang.String |
SHUTDOWN_HOOK_ENABLED
System property to set to override the global ability to register shutdown hooks.
|
static Marker |
SHUTDOWN_HOOK_MARKER
Shared Marker to indicate log messages corresponding to shutdown hooks.
|
Modifier and Type | Method and Description |
---|---|
Cancellable |
addShutdownCallback(java.lang.Runnable callback)
Adds a Runnable shutdown callback to this class.
|
static final java.lang.String SHUTDOWN_CALLBACK_REGISTRY
static final java.lang.String SHUTDOWN_HOOK_ENABLED
static final Marker SHUTDOWN_HOOK_MARKER
Cancellable addShutdownCallback(java.lang.Runnable callback)
callback
- the shutdown callback to be executed upon shutdown.null
if the shutdown hook is disabled and
cannot be added.