public class DelegatedExecutorService extends AbstractExecutorService
| Constructor and Description |
|---|
DelegatedExecutorService(ExecutorService executor)
构造
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
void |
execute(Runnable command) |
<T> List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> tasks) |
<T> List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
<T> Future<T> |
submit(Callable<T> task) |
Future<?> |
submit(Runnable task) |
<T> Future<T> |
submit(Runnable task,
T result) |
newTaskFor, newTaskForpublic DelegatedExecutorService(ExecutorService executor)
executor - ExecutorServicepublic void execute(Runnable command)
public void shutdown()
public boolean isShutdown()
public boolean isTerminated()
public boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
InterruptedExceptionpublic Future<?> submit(Runnable task)
submit in interface ExecutorServicesubmit in class AbstractExecutorServicepublic <T> Future<T> submit(Callable<T> task)
submit in interface ExecutorServicesubmit in class AbstractExecutorServicepublic <T> Future<T> submit(Runnable task, T result)
submit in interface ExecutorServicesubmit in class AbstractExecutorServicepublic <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll in interface ExecutorServiceinvokeAll in class AbstractExecutorServiceInterruptedExceptionpublic <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll in interface ExecutorServiceinvokeAll in class AbstractExecutorServiceInterruptedExceptionpublic <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
invokeAny in interface ExecutorServiceinvokeAny in class AbstractExecutorServiceInterruptedExceptionExecutionExceptionpublic <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
invokeAny in interface ExecutorServiceinvokeAny in class AbstractExecutorServiceInterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2025. All rights reserved.