public class DiscardWithCancelPolicy
extends Object
implements RejectedExecutionHandler
| Constructor and Description |
|---|
DiscardWithCancelPolicy() |
| Modifier and Type | Method and Description |
|---|---|
void |
rejectedExecution(Runnable runnable,
ThreadPoolExecutor threadPoolExecutor)
Rejects execution of the
Runnable task by canceling it
immediately. |
public void rejectedExecution(Runnable runnable,
ThreadPoolExecutor threadPoolExecutor)
Runnable task by canceling it
immediately.
Important: The task can only be canceled if it is a
subtype of Future.
rejectedExecution in interface RejectedExecutionHandlerrunnable - the taskthreadPoolExecutor - the executor