LatchedExecutorService
which has higher throughput and
plays more nicely with the Executor
paradigm.public class MappedTaskExecutor extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
log
Deprecated.
|
Constructor and Description |
---|
MappedTaskExecutor(ExecutorService service)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected ExecutorService |
getThreadPool()
Deprecated.
|
<T> List<T> |
runTasks(List<Callable<T>> tasks,
long timeout,
TimeUnit unit,
int maxParallel)
Deprecated.
Runs a set of tasks, checking their futures.
|
public MappedTaskExecutor(ExecutorService service)
protected ExecutorService getThreadPool()
public <T> List<T> runTasks(List<Callable<T>> tasks, long timeout, TimeUnit unit, int maxParallel) throws InterruptedException, ExecutionException, TimeoutException
maxParallel
- The maximum parallelism. This is ONE (1) to run the tasks
sequentially. If the value is 2 or greater, then the tasks
will be executed with limited parallelism. You may specify
Integer.MAX_VALUE
to indicate that this class should
not impose any constraint on their parallel execution.tasks
- The tasks to be executed.Future
(s) of the tasks
IFF all tasks were executed successfully.TimeoutException
ExecutionException
InterruptedException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.