软件包 | 描述 |
---|---|
java.awt |
包含创建用户界面和绘制图形和图像的所有类。
|
java.awt.event |
用于处理不同类型的事件由AWT组件提供的接口和类发射。
|
java.awt.image.renderable |
提供用于生成渲染独立图像的类和接口。
|
java.lang |
提供对java编程语言的设计基础课。
|
java.util |
包含集合框架、遗留的集合类、事件模型、日期和时间的设施、国际化和各种实用工具类(一个字符串标记,一个随机数发生器,和一位阵列)。
|
java.util.concurrent |
在并发编程中常用的实用类。
|
java.util.stream |
类,以支持元素流上的功能样式操作,如Map减少集合上的转换。
|
javax.net.ssl |
为安全套接字包提供类。
|
javax.swing |
提供了一套“轻量级”(所有的java语言)组件,以最大可能的程度,在所有平台上工作。
|
javax.swing.text |
提供类和接口处理编辑和不可编辑的文本组件。
|
Modifier and Type | Method and Description |
---|---|
static void |
EventQueue.invokeAndWait(Runnable runnable)
|
static void |
EventQueue.invokeLater(Runnable runnable)
|
Modifier and Type | Field and Description |
---|---|
protected Runnable |
InvocationEvent.runnable
可运行的run()方法会被调用。
|
Constructor and Description |
---|
InvocationEvent(Object source, int id, Runnable runnable, Object notifier, boolean catchThrowables)
构建具有指定源和ID将执行Runnable的
run 方法时,派一个
InvocationEvent 。
|
InvocationEvent(Object source, Runnable runnable)
构建具有指定源将执行Runnable的
run 方法时,派一个
InvocationEvent 。
|
InvocationEvent(Object source, Runnable runnable, Object notifier, boolean catchThrowables)
构建具有指定源将执行Runnable的
run 方法时,派一个
InvocationEvent 。
|
InvocationEvent(Object source, Runnable runnable, Runnable listener, boolean catchThrowables)
构建具有指定源将执行Runnable的
run 方法时,派一个
InvocationEvent 。
|
Modifier and Type | Class and Description |
---|---|
class |
RenderableImageProducer
一个适配器类实现imageproducer允许一个renderableimage异步生产。
|
Modifier and Type | Class and Description |
---|---|
class |
Thread
空线是一个线程在执行一个程序。
|
Constructor and Description |
---|
Thread(Runnable target)
分配一个新的
Thread 对象。
|
Thread(Runnable target, String name)
分配一个新的
Thread 对象。
|
Thread(ThreadGroup group, Runnable target)
分配一个新的
Thread 对象。
|
Thread(ThreadGroup group, Runnable target, String name)
分配一个新的
Thread 对象具有
target 为经营对象,具有指定的
name 正如其名,属于线程组被
group 。
|
Thread(ThreadGroup group, Runnable target, String name, long stackSize)
分配一个新的
Thread 对象具有
target 为经营对象,具有指定的
name 正如其名,属于线程组被
group ,并且具有指定的空堆栈大小。
|
Modifier and Type | Class and Description |
---|---|
class |
TimerTask
可以由定时器一次性或重复执行的任务。
|
Modifier and Type | Interface and Description |
---|---|
interface |
RunnableFuture<V>
|
interface |
RunnableScheduledFuture<V>
这是一个
ScheduledFuture
Runnable 。
|
Modifier and Type | Class and Description |
---|---|
class |
ForkJoinWorkerThread
一个线程的
ForkJoinPool 管理,执行
ForkJoinTask s。
|
class |
FutureTask<V>
一个可以取消的异步计算。
|
Modifier and Type | Method and Description |
---|---|
BlockingQueue<Runnable> |
ScheduledThreadPoolExecutor.getQueue()
返回此执行器使用的任务队列。
|
BlockingQueue<Runnable> |
ThreadPoolExecutor.getQueue()
返回此执行器使用的任务队列。
|
List<Runnable> |
ScheduledThreadPoolExecutor.shutdownNow()
试图阻止所有积极执行任务,停止等待任务的处理,并返回一个列表,正在等待执行的任务。
|
List<Runnable> |
ThreadPoolExecutor.shutdownNow()
试图阻止所有积极执行任务,停止等待任务的处理,并返回一个列表,正在等待执行的任务。
|
List<Runnable> |
ExecutorService.shutdownNow()
试图阻止所有积极执行任务,停止等待任务的处理,并返回一个列表,正在等待执行的任务。
|
List<Runnable> |
ForkJoinPool.shutdownNow()
可能试图取消和/或停止所有任务,并拒绝所有随后提交的任务。
|
Modifier and Type | Method and Description |
---|---|
static ForkJoinTask<?> |
ForkJoinTask.adapt(Runnable runnable)
|
static <T> ForkJoinTask<T> |
ForkJoinTask.adapt(Runnable runnable, T result)
|
protected void |
ThreadPoolExecutor.afterExecute(Runnable r, Throwable t)
在给定运行调用执行完成的方法。
|
protected void |
ThreadPoolExecutor.beforeExecute(Thread t, Runnable r)
方法调用在给定的线程执行给定的运行之前。
|
static Callable<Object> |
Executors.callable(Runnable task)
返回一个
Callable 对象,在调用时,执行指定的任务并返回
null 。
|
static <T> Callable<T> |
Executors.callable(Runnable task, T result)
返回一个
Callable 对象,在调用时,执行指定的任务并返回结果。
|
protected <V> RunnableScheduledFuture<V> |
ScheduledThreadPoolExecutor.decorateTask(Runnable runnable, RunnableScheduledFuture<V> task)
修改或替换用来执行一个可运行的任务。
|
void |
ScheduledThreadPoolExecutor.execute(Runnable command)
command 要求执行零延迟。
|
void |
Executor.execute(Runnable command)
在未来的某个时间执行给定的命令。
|
void |
ThreadPoolExecutor.execute(Runnable command)
在未来的某个时候执行给定的任务。
|
void |
ForkJoinPool.execute(Runnable task) |
protected <T> RunnableFuture<T> |
AbstractExecutorService.newTaskFor(Runnable runnable, T value)
返回一个
RunnableFuture 为给定的运行与默认值。
|
protected <T> RunnableFuture<T> |
ForkJoinPool.newTaskFor(Runnable runnable, T value) |
Thread |
ThreadFactory.newThread(Runnable r)
构建了一种新的
Thread 。
|
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)
得到了下一个任务的执行,否则执行,如果是立即可用的,然后重试任务执行,除非遗嘱执行人是关闭的,在这种情况下,任务是不是丢弃。
|
boolean |
ThreadPoolExecutor.remove(Runnable task)
如果它是存在的,从执行者的内部队列中移除这个任务,如果它没有已经启动的话,就不会运行它。
|
CompletionStage<Void> |
CompletionStage.runAfterBoth(CompletionStage<?> other, Runnable action)
返回一个新的completionstage,当和其他阶段都正常完成,执行特定动作。
|
CompletableFuture<Void> |
CompletableFuture.runAfterBoth(CompletionStage<?> other, Runnable action) |
CompletionStage<Void> |
CompletionStage.runAfterBothAsync(CompletionStage<?> other, Runnable action)
返回一个新的completionstage,当这种和其他特定阶段的正常完成,利用这个阶段的默认的异步执行机构执行特定动作。
|
CompletableFuture<Void> |
CompletableFuture.runAfterBothAsync(CompletionStage<?> other, Runnable action) |
CompletionStage<Void> |
CompletionStage.runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)
返回一个新的completionstage,当这种和其他特定阶段的正常完成,执行给定的操作使用提供的遗嘱执行人看到规则覆盖出色的完成
CompletionStage 文档。
|
CompletableFuture<Void> |
CompletableFuture.runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor) |
CompletionStage<Void> |
CompletionStage.runAfterEither(CompletionStage<?> other, Runnable action)
返回一个新的completionstage,当这种或其他特定阶段的正常完成,执行特定动作。
|
CompletableFuture<Void> |
CompletableFuture.runAfterEither(CompletionStage<?> other, Runnable action) |
CompletionStage<Void> |
CompletionStage.runAfterEitherAsync(CompletionStage<?> other, Runnable action)
返回一个新的completionstage,当这种或其他特定阶段的正常完成,利用这个阶段的默认的异步执行机构执行特定动作。
|
CompletableFuture<Void> |
CompletableFuture.runAfterEitherAsync(CompletionStage<?> other, Runnable action) |
CompletionStage<Void> |
CompletionStage.runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)
返回一个新的completionstage,当这种或其他特定阶段的正常完成,执行给定的操作使用提供的遗嘱执行人。
|
CompletableFuture<Void> |
CompletableFuture.runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor) |
static CompletableFuture<Void> |
CompletableFuture.runAsync(Runnable runnable)
返回一个新的completablefuture是由一个任务运行在
ForkJoinPool.commonPool() 它运行的特定动作完成后异步。
|
static CompletableFuture<Void> |
CompletableFuture.runAsync(Runnable runnable, Executor executor)
返回一个新的completablefuture是由一个任务运行在给定的执行器运行了异步完成动作后。
|
ScheduledFuture<?> |
ScheduledThreadPoolExecutor.schedule(Runnable command, long delay, TimeUnit unit) |
ScheduledFuture<?> |
ScheduledExecutorService.schedule(Runnable command, long delay, TimeUnit unit)
创建并执行在给定的延迟后启用的一一个射击动作。
|
ScheduledFuture<?> |
ScheduledThreadPoolExecutor.scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) |
ScheduledFuture<?> |
ScheduledExecutorService.scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
创建和执行一个周期的动作变成了使后先给定的初始延迟,随后与给定的时期;这是执行将开始
initialDelay 然后
initialDelay+period ,然后
initialDelay + 2 * period ,等等。
|
ScheduledFuture<?> |
ScheduledThreadPoolExecutor.scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) |
ScheduledFuture<?> |
ScheduledExecutorService.scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
创建和执行一个周期性的行动,使第一次后,给定的初始延迟,并随后与给定的一个执行之间的终止和下一个开始的开始。
|
Future<?> |
ScheduledThreadPoolExecutor.submit(Runnable task) |
Future<?> |
AbstractExecutorService.submit(Runnable task) |
Future<?> |
ExecutorService.submit(Runnable task)
提交执行一个Runnable任务并返回一个表示该任务的未来。
|
ForkJoinTask<?> |
ForkJoinPool.submit(Runnable task) |
<T> Future<T> |
ScheduledThreadPoolExecutor.submit(Runnable task, T result) |
<T> Future<T> |
AbstractExecutorService.submit(Runnable task, T result) |
<T> Future<T> |
ExecutorService.submit(Runnable task, T result)
提交执行一个Runnable任务并返回一个表示该任务的未来。
|
<T> ForkJoinTask<T> |
ForkJoinPool.submit(Runnable task, T result) |
Future<V> |
CompletionService.submit(Runnable task, V result)
提交执行一个Runnable任务并返回一个表示该任务的未来。
|
Future<V> |
ExecutorCompletionService.submit(Runnable task, V result) |
CompletionStage<Void> |
CompletionStage.thenRun(Runnable action)
返回一个新的completionstage,当此阶段完成通常执行特定动作。
|
CompletableFuture<Void> |
CompletableFuture.thenRun(Runnable action) |
CompletionStage<Void> |
CompletionStage.thenRunAsync(Runnable action)
返回一个新的completionstage,当此阶段完成这个阶段通常使用默认的异步执行机构执行特定动作。
|
CompletableFuture<Void> |
CompletableFuture.thenRunAsync(Runnable action) |
CompletionStage<Void> |
CompletionStage.thenRunAsync(Runnable action, Executor executor)
返回一个新的completionstage,当此阶段完成正常的情况下,使用提供的遗嘱执行人执行特定动作。
|
CompletableFuture<Void> |
CompletableFuture.thenRunAsync(Runnable action, Executor executor) |
Constructor and Description |
---|
CyclicBarrier(int parties, Runnable barrierAction)
创建一个新的
CyclicBarrier 将旅行当给定数量的政党(线程)正等待它,和它将执行给定的屏障作用时的障碍绊倒,由最后一个线程进入障碍的表现。
|
FutureTask(Runnable runnable, V result)
创建一个
FutureTask 会在运行,执行给定的
Runnable ,并安排
get 将给定的成功完成的结果返回。
|
Constructor and Description |
---|
ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue)
创建具有给定的初始参数和默认线厂和拒绝执行处理程序的一个新的
ThreadPoolExecutor 。
|
ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler)
创建具有给定的初始参数和默认线厂一个新的
ThreadPoolExecutor 。
|
ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory)
创建一个新的
ThreadPoolExecutor 与给定的初始参数和默认拒绝执行处理程序。
|
ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler)
创建具有给定的初始参数的一种新
ThreadPoolExecutor 。
|
Modifier and Type | Method and Description |
---|---|
S |
BaseStream.onClose(Runnable closeHandler)
返回一个额外的关闭处理程序的等效流。
|
Modifier and Type | Method and Description |
---|---|
abstract Runnable |
SSLEngine.getDelegatedTask()
返回一个授权
Runnable 任务这
SSLEngine 。
|
Modifier and Type | Class and Description |
---|---|
class |
SwingWorker<T,V>
在后台线程中执行冗长的图形用户界面交互任务的抽象类。
|
Modifier and Type | Method and Description |
---|---|
static void |
SwingUtilities.invokeAndWait(Runnable doRun)
原因
doRun.run() 是同步执行的事件派发线程。
|
static void |
SwingUtilities.invokeLater(Runnable doRun)
原因nullrun()东岭。是异步执行的事件派发线程。
|
Modifier and Type | Class and Description |
---|---|
class |
AsyncBoxView.ChildState
表示子视图的布局状态的记录。
|
Modifier and Type | Method and Description |
---|---|
protected Runnable |
LayoutQueue.waitForWork()
由工人线程使用,以获得一个新的任务来执行
|
Modifier and Type | Method and Description |
---|---|
void |
LayoutQueue.addTask(Runnable task)
添加一个不需要立即的任务,因为结果不被认为是可见的。
|
void |
Document.render(Runnable r)
允许该模型在并发的情况下安全地呈现,如果模型支持异步更新的话。
|
void |
AbstractDocument.render(Runnable r)
这使得该模型可以安全地呈现在货币的存在下,如果该模型支持异步更新。
|
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.