ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/RejectedExecutionHandler.java
Revision: 1.6
Committed: Tue Jun 20 22:08:46 2006 UTC (17 years, 11 months ago) by jsr166
Branch: MAIN
Changes since 1.5: +1 -1 lines
Log Message:
typo

File Contents

# User Rev Content
1 dl 1.1 /*
2     * Written by Doug Lea with assistance from members of JCP JSR-166
3 dl 1.5 * Expert Group and released to the public domain, as explained at
4     * http://creativecommons.org/licenses/publicdomain
5 dl 1.1 */
6    
7     package java.util.concurrent;
8    
9     /**
10 dl 1.4 * A handler for tasks that cannot be executed by a {@link
11     * ThreadPoolExecutor}.
12 dl 1.1 *
13     * @since 1.5
14 dl 1.2 * @author Doug Lea
15 dl 1.1 */
16     public interface RejectedExecutionHandler {
17 tim 1.3
18 dl 1.1 /**
19 dl 1.4 * Method that may be invoked by a {@link ThreadPoolExecutor} when
20     * <tt>execute</tt> cannot accept a task. This may occur when no
21 dl 1.1 * more threads or queue slots are available because their bounds
22     * would be exceeded, or upon shutdown of the Executor.
23     *
24 jsr166 1.6 * In the absence of other alternatives, the method may throw an
25 dl 1.4 * unchecked {@link RejectedExecutionException}, which will be
26 dl 1.1 * 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     }