@FunctionalInterface
public interface ShutdownAwareTask
run with ShutdownInfo as an argument.
The ShutdownAwareTask interface is similar to Task,
in that both are designed for classes whose instances are potentially executed by another thread.
A ShutdownAwareTask however has an input argument ShutdownInfo which can be asked
if underlying Executor has received a shutdown signal.
The class is intended to be use with custom executor wrapper Runner.
Runner,
ShutdownAwareCallable| Modifier and Type | Method and Description |
|---|---|
void |
run(ShutdownInfo shutdownInfo)
Executes a task or throws an exception if unable to do so.
|
void run(ShutdownInfo shutdownInfo) throws java.lang.Exception
shutdownInfo - provides info if underlying Executor received a shutdown signaljava.lang.Exception - if unable to execute taskRunner