March 2005
Intermediate to advanced
1254 pages
104h 21m
English
ThreadPoolExecutor.DiscardOldestPolicy
This
RejectedExecutionHandler
implementation discards the rejected Runnable if
the ThreadPoolExecutor has been shut down.
Otherwise, it discards the oldest pending task that has not run and
tries again to execute( ) the rejected task.
public static class ThreadPoolExecutor.DiscardOldestPolicy implements RejectedExecutionHandler { // Public Constructors public DiscardOldestPolicy( ); // Methods Implementing RejectedExecutionHandler public void rejectedExecution(Runnable r, ThreadPoolExecutor e); }