软件包 | 描述 |
---|---|
java.util.concurrent |
在并发编程中常用的实用类。
|
javax.swing |
提供了一套“轻量级”(所有的java语言)组件,以最大可能的程度,在所有平台上工作。
|
Modifier and Type | Method and Description |
---|---|
V |
ForkJoinTask.get()
等待,如果需要计算完成,然后检索其结果。
|
V |
Future.get()
等待,如果需要计算完成,然后检索其结果。
|
T |
CompletableFuture.get()
等待,如果必要的,为这个未来完成,然后返回其结果。
|
V |
FutureTask.get() |
V |
ForkJoinTask.get(long timeout, TimeUnit unit)
如果需要的话,在大多数给定的计算时间完成,然后检索其结果,如果可用。
|
V |
Future.get(long timeout, TimeUnit unit)
如果需要的话,在大多数给定的计算时间完成,然后检索其结果,如果可用。
|
T |
CompletableFuture.get(long timeout, TimeUnit unit)
如果需要的话,在大多数给定的时间为这个未来完成,然后返回其结果,如果可用。
|
V |
FutureTask.get(long timeout, TimeUnit unit) |
<T> T |
AbstractExecutorService.invokeAny(Collection<? extends Callable<T>> tasks) |
<T> T |
ExecutorService.invokeAny(Collection<? extends Callable<T>> tasks)
执行给定的任务,返回已成功完成的结果(即,不抛出一个例外),如果任何。
|
<T> T |
AbstractExecutorService.invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) |
<T> T |
ExecutorService.invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
执行给定的任务,返回一个成功完成的结果(即,不抛出异常),如果做了超时之前经过。
|
Modifier and Type | Method and Description |
---|---|
T |
SwingWorker.get()
等待,如果需要计算完成,然后检索其结果。
|
T |
SwingWorker.get(long timeout, TimeUnit unit)
如果需要的话,在大多数给定的计算时间完成,然后检索其结果,如果可用。
|
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.