ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/RejectedExecutionHandler.java
Revision: 1.4
Committed: Sun Aug 31 13:33:13 2003 UTC (20 years, 9 months ago) by dl
Branch: MAIN
CVS Tags: JSR166_NOV3_FREEZE, JSR166_DEC9_PRE_ES_SUBMIT, JSR166_DEC9_POST_ES_SUBMIT
Changes since 1.3: +5 -8 lines
Log Message:
Removed non-standard tags and misc javadoc cleanup

File Contents

# Content
1 /*
2 * Written by Doug Lea with assistance from members of JCP JSR-166
3 * Expert Group and released to the public domain. Use, modify, and
4 * redistribute this code in any way without acknowledgement.
5 */
6
7 package java.util.concurrent;
8
9 /**
10 * A handler for tasks that cannot be executed by a {@link
11 * ThreadPoolExecutor}.
12 *
13 * @since 1.5
14 * @author Doug Lea
15 */
16 public interface RejectedExecutionHandler {
17
18 /**
19 * Method that may be invoked by a {@link ThreadPoolExecutor} when
20 * <tt>execute</tt> cannot accept a task. This may occur when no
21 * more threads or queue slots are available because their bounds
22 * would be exceeded, or upon shutdown of the Executor.
23 *
24 * In the absence other alternatives, the method may throw an
25 * unchecked {@link RejectedExecutionException}, which will be
26 * propagated to the caller of <tt>execute</tt>.
27 *
28 * @param r the runnable task requested to be executed
29 * @param executor the executor attempting to execute this task
30 * @throws RejectedExecutionException if there is no remedy
31 */
32 void rejectedExecution(Runnable r, ThreadPoolExecutor executor);
33 }