public class SchedulingStrategies extends Object
SchedulingStrategy
.Constructor and Description |
---|
SchedulingStrategies() |
Modifier and Type | Method and Description |
---|---|
static SchedulingStrategy |
createInvokerStrategy() |
static SchedulingStrategy |
createParallelSharedStrategy(ExecutorService threadPool)
The threadPool passed to this strategy can be shared in other strategies.
|
static SchedulingStrategy |
createParallelStrategy(int nThreads) |
static SchedulingStrategy |
createParallelStrategyUnbounded() |
public static SchedulingStrategy createInvokerStrategy()
public static SchedulingStrategy createParallelStrategy(int nThreads)
nThreads
- fixed pool capacitypublic static SchedulingStrategy createParallelStrategyUnbounded()
public static SchedulingStrategy createParallelSharedStrategy(ExecutorService threadPool)
The call SchedulingStrategy.finished()
is waiting until own tasks have finished.
New tasks will not be scheduled by this call in this strategy. This strategy is not
waiting for other strategies to finish. The RunnerScheduler.finished()
may
freely use SchedulingStrategy.finished()
.
threadPool
- thread pool possibly shared with other strategiesNullPointerException
- if threadPool is nullCopyright © 2004–2013 The Apache Software Foundation. All rights reserved.