public class DelegatedExecutorService extends AbstractExecutorService implements Wrapper<ExecutorService>
Constructor and Description |
---|
DelegatedExecutorService(ExecutorService executor)
构造
|
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
void |
execute(Runnable command) |
ExecutorService |
getRaw()
获取原始对象
|
<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, newTaskFor
public DelegatedExecutorService(ExecutorService executor)
executor
- ExecutorService
public ExecutorService getRaw()
Wrapper
getRaw
in interface Wrapper<ExecutorService>
public void shutdown()
shutdown
in interface ExecutorService
public List<Runnable> shutdownNow()
shutdownNow
in interface ExecutorService
public boolean isShutdown()
isShutdown
in interface ExecutorService
public boolean isTerminated()
isTerminated
in interface ExecutorService
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
awaitTermination
in interface ExecutorService
InterruptedException
public Future<?> submit(Runnable task)
submit
in interface ExecutorService
submit
in class AbstractExecutorService
public <T> Future<T> submit(Callable<T> task)
submit
in interface ExecutorService
submit
in class AbstractExecutorService
public <T> Future<T> submit(Runnable task, T result)
submit
in interface ExecutorService
submit
in class AbstractExecutorService
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll
in interface ExecutorService
invokeAll
in class AbstractExecutorService
InterruptedException
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll
in interface ExecutorService
invokeAll
in class AbstractExecutorService
InterruptedException
public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
invokeAny
in interface ExecutorService
invokeAny
in class AbstractExecutorService
InterruptedException
ExecutionException
public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
invokeAny
in interface ExecutorService
invokeAny
in class AbstractExecutorService
InterruptedException
ExecutionException
TimeoutException
Copyright © 2025. All rights reserved.