public class ParallelRangeExecutor extends Object
ParallelRangeExecutor.RangeExecutor interface.| Modifier and Type | Class and Description |
|---|---|
static interface |
ParallelRangeExecutor.RangeExecutor
An interface that describes an execution that can be applied to
a range of elements
|
| Modifier and Type | Method and Description |
|---|---|
static void |
execute(int parallelism,
ExecutorService executorService,
int globalMin,
int globalMax,
ParallelRangeExecutor.RangeExecutor rangeExecutor)
Perform a parallel execution of the given
ParallelRangeExecutor.RangeExecutor
with the specified range and parallelism level on the given
executor service. |
public static void execute(int parallelism,
ExecutorService executorService,
int globalMin,
int globalMax,
ParallelRangeExecutor.RangeExecutor rangeExecutor)
ParallelRangeExecutor.RangeExecutor
with the specified range and parallelism level on the given
executor service.min(parallelism, globalMax-globalMin.parallelism - The parallelism. This is the maximum number of
tasks that will be created in order to process the specified range.
(If the range is smaller than this parallelism level, then fewer
tasks will be created)executorService - The executor serviceglobalMin - The global minimum index of the rangeglobalMax - The global maximum index of the rangerangeExecutor - The ParallelRangeExecutor.RangeExecutor to which the
computation for the sub-ranges will be delegated.IllegalArgumentException - If the parallelism is not positiveIllegalArgumentException - If the global minimum is larger than
the global maximum.Copyright © 2015. All rights reserved.