Enclosing class:
ShutdownHooks
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Method Summary
All Methods Instance Methods Abstract Methods Default Methods
Identical to
andThen(Action)
, but allows for some additional logging and associated context.
default org.slf4j.Logger
Gets the Logger
which to use when logging the shutdown hook's actions.
void
Performs the action associated with the shutdown hook.
default void
Performs the action without throwing.
Method Details
andThen
Parameters:
next
- the next action to perform.
Returns:
andThen
Identical to
andThen(Action)
, but allows for some additional logging and associated context.
Parameters:
context
- the context, which will be logged using Object.toString()
next
- the next action to perform
Returns:
a new instance
getLogger
default org.slf4j.Logger getLogger ()
Gets the
Logger
which to use when logging the shutdown hook's actions. By default this gets the
logger associated with
ShutdownHooks
.
Returns:
the logger instance