软件包 | 描述 |
---|---|
java.util.concurrent |
在并发编程中常用的实用类。
|
Modifier and Type | Class and Description |
---|---|
class |
ScheduledThreadPoolExecutor
一个
ThreadPoolExecutor 可以另外安排的命令来运行在一个给定的延迟,或定期执行。
|
Modifier and Type | Method and Description |
---|---|
void |
RejectedExecutionHandler.rejectedExecution(Runnable r, ThreadPoolExecutor executor)
方法,可以通过
ThreadPoolExecutor 调用时,
execute 不能接受任务。
|
void |
ThreadPoolExecutor.CallerRunsPolicy.rejectedExecution(Runnable r, ThreadPoolExecutor e)
在调用方的线程中执行任务R,除非执行器已关闭,在这种情况下,任务将被丢弃。
|
void |
ThreadPoolExecutor.AbortPolicy.rejectedExecution(Runnable r, ThreadPoolExecutor e)
总是把rejectedexecutionexception。
|
void |
ThreadPoolExecutor.DiscardPolicy.rejectedExecution(Runnable r, ThreadPoolExecutor e)
什么都不做,哪有丢弃任务河的效果。
|
void |
ThreadPoolExecutor.DiscardOldestPolicy.rejectedExecution(Runnable r, ThreadPoolExecutor 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.