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 Executor
Executor.execute(java.lang.Runnable)
public void shutdown()
shutdown
in interface ExecutorService
ExecutorService.shutdown()
public List<Runnable> shutdownNow()
shutdownNow
in interface ExecutorService
ExecutorService.shutdownNow()
public boolean isShutdown()
isShutdown
in interface ExecutorService
ExecutorService.isShutdown()
public boolean isTerminated()
isTerminated
in interface ExecutorService
ExecutorService.isTerminated()
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
awaitTermination
in interface ExecutorService
InterruptedException
ExecutorService.awaitTermination(long, java.util.concurrent.TimeUnit)
public <T> Future<T> submit(Callable<T> task)
submit
in interface ExecutorService
ExecutorService.submit(java.util.concurrent.Callable)
public <T> Future<T> submit(Runnable task, T result)
submit
in interface ExecutorService
ExecutorService.submit(java.lang.Runnable, java.lang.Object)
public Future<?> submit(Runnable task)
submit
in interface ExecutorService
ExecutorService.submit(java.lang.Runnable)
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll
in interface ExecutorService
InterruptedException
ExecutorService.invokeAll(java.util.Collection)
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll
in interface ExecutorService
InterruptedException
ExecutorService.invokeAll(java.util.Collection, long, java.util.concurrent.TimeUnit)
public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
invokeAny
in interface ExecutorService
InterruptedException
ExecutionException
ExecutorService.invokeAny(java.util.Collection)
public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
invokeAny
in interface ExecutorService
InterruptedException
ExecutionException
TimeoutException
ExecutorService.invokeAny(java.util.Collection, long, java.util.concurrent.TimeUnit)
Copyright © 2023 JBoss by Red Hat. All rights reserved.