public abstract class ManagedExecutorService extends Object implements ExecutorService
| Constructor and Description |
|---|
ManagedExecutorService(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() |
protected ExecutorService |
protectExecutor(ExecutorService executor) |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
<T> Future<T> |
submit(Callable<T> task) |
Future<?> |
submit(Runnable task) |
<T> Future<T> |
submit(Runnable task,
T result) |
public ManagedExecutorService(ExecutorService executor)
protected ExecutorService protectExecutor(ExecutorService executor)
public void execute(Runnable command)
execute in interface ExecutorExecutor.execute(java.lang.Runnable)public void shutdown()
shutdown in interface ExecutorServiceExecutorService.shutdown()public List<Runnable> shutdownNow()
shutdownNow in interface ExecutorServiceExecutorService.shutdownNow()public boolean isShutdown()
isShutdown in interface ExecutorServiceExecutorService.isShutdown()public boolean isTerminated()
isTerminated in interface ExecutorServiceExecutorService.isTerminated()public boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface ExecutorServiceInterruptedExceptionExecutorService.awaitTermination(long, java.util.concurrent.TimeUnit)public <T> Future<T> submit(Callable<T> task)
submit in interface ExecutorServiceExecutorService.submit(java.util.concurrent.Callable)public <T> Future<T> submit(Runnable task, T result)
submit in interface ExecutorServiceExecutorService.submit(java.lang.Runnable, java.lang.Object)public Future<?> submit(Runnable task)
submit in interface ExecutorServiceExecutorService.submit(java.lang.Runnable)public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll in interface ExecutorServiceInterruptedExceptionExecutorService.invokeAll(java.util.Collection)public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll in interface ExecutorServiceInterruptedExceptionExecutorService.invokeAll(java.util.Collection, long, java.util.concurrent.TimeUnit)public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
invokeAny in interface ExecutorServiceInterruptedExceptionExecutionExceptionExecutorService.invokeAny(java.util.Collection)public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
invokeAny in interface ExecutorServiceInterruptedExceptionExecutionExceptionTimeoutExceptionExecutorService.invokeAny(java.util.Collection, long, java.util.concurrent.TimeUnit)Copyright © 2020 JBoss by Red Hat. All rights reserved.