Class NonSharedThreadPoolStrategy
- java.lang.Object
-
- org.apache.maven.surefire.junitcore.pc.SchedulingStrategy
-
- org.apache.maven.surefire.junitcore.pc.AbstractThreadPoolStrategy
-
- org.apache.maven.surefire.junitcore.pc.NonSharedThreadPoolStrategy
-
- All Implemented Interfaces:
Destroyable
final class NonSharedThreadPoolStrategy extends AbstractThreadPoolStrategy
Parallel strategy for non-shared thread pool in private package.- Since:
- 2.16
- See Also:
AbstractThreadPoolStrategy
-
-
Constructor Summary
Constructors Constructor Description NonSharedThreadPoolStrategy(ConsoleStream logger, java.util.concurrent.ExecutorService threadPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
finished()
Waiting for scheduled tasks to finish.boolean
hasSharedThreadPool()
-
Methods inherited from class org.apache.maven.surefire.junitcore.pc.AbstractThreadPoolStrategy
destroy, getFutureResults, getThreadPool, schedule, setDefaultShutdownHandler, stop, stopNow
-
Methods inherited from class org.apache.maven.surefire.junitcore.pc.SchedulingStrategy
canSchedule, disable, logQuietly
-
-
-
-
Constructor Detail
-
NonSharedThreadPoolStrategy
NonSharedThreadPoolStrategy(ConsoleStream logger, java.util.concurrent.ExecutorService threadPool)
-
-
Method Detail
-
hasSharedThreadPool
public boolean hasSharedThreadPool()
- Specified by:
hasSharedThreadPool
in classSchedulingStrategy
- Returns:
true
if a thread pool associated with this strategy can be shared with other strategies.
-
finished
public boolean finished() throws java.lang.InterruptedException
Description copied from class:SchedulingStrategy
Waiting for scheduled tasks to finish. New tasks will not be scheduled by calling this method.- Specified by:
finished
in classSchedulingStrategy
- Returns:
true
if successfully stopped the scheduler, elsefalse
if already stopped (a shared thread pool was shutdown externally).- Throws:
java.lang.InterruptedException
- if interrupted while waiting for scheduled tasks to finish- See Also:
RunnerScheduler.finished()
-
-