Spec-Zone .ru
спецификации, руководства, описания, API
|
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV NEXT | FRAMES NO FRAMES |
Package | Description |
---|---|
java.util.concurrent | Utility classes commonly useful in concurrent programming. |
javax.tools | Provides interfaces for tools which can be invoked from a program, for example, compilers. |
Uses of Callable in java.util.concurrent |
---|
Modifier and Type | Method and Description | |
---|---|---|
static Callable<Object> |
Executors.callable(PrivilegedAction<?> action)
Returns a Callable object that, when
called, runs the given privileged action and returns its result. |
|
static Callable<Object> |
Executors.callable(PrivilegedExceptionAction<?> action)
Returns a Callable object that, when
called, runs the given privileged exception action and returns
its result. |
|
static Callable<Object> |
Executors.callable(Runnable task)
Returns a Callable object that, when
called, runs the given task and returns null. |
|
static
|
Executors.callable(Runnable task,
T result)
Returns a Callable object that, when
called, runs the given task and returns the given result. |
|
static
|
Executors.privilegedCallable(Callable<T> callable)
Returns a Callable object that will, when
called, execute the given callable under the current
access control context. |
|
static
|
Executors.privilegedCallableUsingCurrentClassLoader(Callable<T> callable)
Returns a Callable object that will, when
called, execute the given callable under the current
access control context, with the current context class loader
as the context class loader. |
Modifier and Type | Method and Description | |
---|---|---|
static
|
ForkJoinTask.adapt(Callable<? extends T> callable)
Returns a new ForkJoinTask that performs the call
method of the given Callable as its action, and returns
its result upon ForkJoinTask.join() , translating any checked exceptions
encountered into RuntimeException . |
|
protected
|
ScheduledThreadPoolExecutor.decorateTask(Callable<V> callable,
RunnableScheduledFuture<V> task)
Modifies or replaces the task used to execute a callable. |
|
protected
|
ForkJoinPool.newTaskFor(Callable<T> callable)
|
|
protected
|
AbstractExecutorService.newTaskFor(Callable<T> callable)
Returns a RunnableFuture for the given callable task. |
|
static
|
Executors.privilegedCallable(Callable<T> callable)
Returns a Callable object that will, when
called, execute the given callable under the current
access control context. |
|
static
|
Executors.privilegedCallableUsingCurrentClassLoader(Callable<T> callable)
Returns a Callable object that will, when
called, execute the given callable under the current
access control context, with the current context class loader
as the context class loader. |
|
|
ScheduledThreadPoolExecutor.schedule(Callable<V> callable,
long delay,
TimeUnit unit)
|
|
|
ScheduledExecutorService.schedule(Callable<V> callable,
long delay,
TimeUnit unit)
Creates and executes a ScheduledFuture that becomes enabled after the given delay. |
|
|
ScheduledThreadPoolExecutor.submit(Callable<T> task)
|
|
|
ForkJoinPool.submit(Callable<T> task)
|
|
|
AbstractExecutorService.submit(Callable<T> task)
|
|
|
ExecutorService.submit(Callable<T> task)
Submits a value-returning task for execution and returns a Future representing the pending results of the task. |
|
Future<V> |
ExecutorCompletionService.submit(Callable<V> task)
|
|
Future<V> |
CompletionService.submit(Callable<V> task)
Submits a value-returning task for execution and returns a Future representing the pending results of the task. |
Modifier and Type | Method and Description | |
---|---|---|
|
ForkJoinPool.invokeAll(Collection<? extends Callable<T>> tasks)
|
|
|
AbstractExecutorService.invokeAll(Collection<? extends Callable<T>> tasks)
|
|
|
ExecutorService.invokeAll(Collection<? extends Callable<T>> tasks)
Executes the given tasks, returning a list of Futures holding their status and results when all complete. |
|
|
AbstractExecutorService.invokeAll(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit)
|
|
|
ExecutorService.invokeAll(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit)
Executes the given tasks, returning a list of Futures holding their status and results when all complete or the timeout expires, whichever happens first. |
|
|
AbstractExecutorService.invokeAny(Collection<? extends Callable<T>> tasks)
|
|
|
ExecutorService.invokeAny(Collection<? extends Callable<T>> tasks)
Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do. |
|
|
AbstractExecutorService.invokeAny(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit)
|
|
|
ExecutorService.invokeAny(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit)
Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do before the given timeout elapses. |
Constructor and Description |
---|
FutureTask(Callable<V> callable)
Creates a FutureTask that will, upon running, execute the given Callable. |
Uses of Callable in javax.tools |
---|
Modifier and Type | Interface and Description |
---|---|
static interface |
JavaCompiler.CompilationTask
Interface representing a future for a compilation task. |
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV NEXT | FRAMES NO FRAMES |
Copyright © 1993, 2010, Oracle Corporation. All rights reserved.