public class SchedulingStrategies extends Object
SchedulingStrategy
.Constructor and Description |
---|
SchedulingStrategies() |
Modifier and Type | Method and Description |
---|---|
static SchedulingStrategy |
createInvokerStrategy(ConsoleStream logger) |
static SchedulingStrategy |
createParallelSharedStrategy(ConsoleStream logger,
ExecutorService threadPool)
The threadPool passed to this strategy can be shared in other strategies.
|
static SchedulingStrategy |
createParallelStrategy(ConsoleStream logger,
int nThreads) |
static SchedulingStrategy |
createParallelStrategyUnbounded(ConsoleStream logger) |
public static SchedulingStrategy createInvokerStrategy(ConsoleStream logger)
logger
- current error loggerpublic static SchedulingStrategy createParallelStrategy(ConsoleStream logger, int nThreads)
logger
- current error loggernThreads
- fixed pool capacitypublic static SchedulingStrategy createParallelStrategyUnbounded(ConsoleStream logger)
logger
- current error loggerpublic static SchedulingStrategy createParallelSharedStrategy(ConsoleStream logger, ExecutorService threadPool)
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()
.logger
- current error loggerthreadPool
- thread pool possibly shared with other strategiesNullPointerException
- if threadPool is nullCopyright © 2004–2018 The Apache Software Foundation. All rights reserved.