public static class ThreadPoolExecutor.DiscardOldestPolicy extends Object implements RejectedExecutionHandler
execute处理程序,除非遗嘱执行人是关闭的,在这种情况下,任务被丢弃。
| Constructor and Description |
|---|
DiscardOldestPolicy()
创建一个指定遗嘱执行人
DiscardOldestPolicy。
|
| Modifier and Type | Method and Description |
|---|---|
void |
rejectedExecution(Runnable r, ThreadPoolExecutor e)
得到了下一个任务的执行,否则执行,如果是立即可用的,然后重试任务执行,除非遗嘱执行人是关闭的,在这种情况下,任务是不是丢弃。
|
public DiscardOldestPolicy()
DiscardOldestPolicy。
public void rejectedExecution(Runnable r, ThreadPoolExecutor e)
rejectedExecution 接口
RejectedExecutionHandler
r的Runnable任务要求被执行
e -执行程序试图执行这项任务
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.