|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
public interface RejectedExecutionHandler
無法由 ThreadPoolExecutor 執行的任務的處理程序。
| 方法摘要 | |
|---|---|
void |
rejectedExecution(Runnable r,
ThreadPoolExecutor executor)
當 execute 不能接受某個任務時,可以由 ThreadPoolExecutor 調用的方法。 |
| 方法詳細資訊 |
|---|
void rejectedExecution(Runnable r,
ThreadPoolExecutor executor)
execute 不能接受某個任務時,可以由 ThreadPoolExecutor 調用的方法。因為超出其界限而沒有更多可用的執行緒或佇列槽時,或者關閉 Executor 時就可能發生這種情況。
在沒有其他替代方法的情況下,該方法可能拋出未經檢查的 RejectedExecutionException,而該異常將傳播到 execute 的調用者。
r - 所請求執行的可運行任務。executor - 試圖執行此任務的執行程序。
RejectedExecutionException - 如果沒有補救方法。
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。