org.specrunner.junit
Class ConcurrentRunnerScheduler

java.lang.Object
  extended by org.specrunner.junit.ConcurrentRunnerScheduler
All Implemented Interfaces:
org.junit.runners.model.RunnerScheduler

public class ConcurrentRunnerScheduler
extends Object
implements org.junit.runners.model.RunnerScheduler

Scheduler for concurrent runners.

Author:
Mathieu Carbou (mathieu.carbou@gmail.com), Thiago Santos

Field Summary
protected  CompletionService<Integer> completionService
          Completion service.
protected  ExecutorService executorService
          Executor service.
static double RATE
          Thread creation ration.
protected  Queue<Future<Integer>> tasks
          Future tasks.
 
Constructor Summary
ConcurrentRunnerScheduler(Class<?> klass)
          Default constructor.
 
Method Summary
 void finished()
           
 void schedule(Runnable childStatement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RATE

public static final double RATE
Thread creation ration.

See Also:
Constant Field Values

executorService

protected final ExecutorService executorService
Executor service.


completionService

protected final CompletionService<Integer> completionService
Completion service.


tasks

protected final Queue<Future<Integer>> tasks
Future tasks.

Constructor Detail

ConcurrentRunnerScheduler

public ConcurrentRunnerScheduler(Class<?> klass)
Default constructor.

Parameters:
klass - The target class test.
Method Detail

schedule

public void schedule(Runnable childStatement)
Specified by:
schedule in interface org.junit.runners.model.RunnerScheduler

finished

public void finished()
Specified by:
finished in interface org.junit.runners.model.RunnerScheduler


Copyright © 2015. All rights reserved.