Commit 49dbc456 authored by Christian Wulf's avatar Christian Wulf

renamed TeeTimeService to TeeTimeScheduler

parent 52bfb933
......@@ -25,11 +25,17 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>net.sourceforge.metrics.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature>
<nature>net.sourceforge.metrics.nature</nature>
</natures>
</projectDescription>
......@@ -24,7 +24,7 @@ import java.util.List;
import org.junit.Test;
import teetime.framework.Execution;
import teetime.framework.TeeTimeService;
import teetime.framework.TeeTimeScheduler;
//@Ignore("test run infinitely on 20.10.17")
public class ParallelCounterConfigIT {
......@@ -63,7 +63,7 @@ public class ParallelCounterConfigIT {
List<Integer> processedElements = new ArrayList<>();
ParallelCounterConfig config = new ParallelCounterConfig(numElements, numThreads, processedElements);
TeeTimeService scheduling = new GlobalTaskPoolScheduling(numThreads, config, numExecutions);
TeeTimeScheduler scheduling = new GlobalTaskPoolScheduling(numThreads, config, numExecutions);
Execution<ParallelCounterConfig> execution = new Execution<>(config, true, scheduling);
execution.executeBlocking();
......
......@@ -27,7 +27,7 @@ import org.junit.Test;
import teetime.framework.Configuration;
import teetime.framework.Execution;
import teetime.framework.TeeTimeService;
import teetime.framework.TeeTimeScheduler;
import teetime.stage.*;
public class PipelineIT {
......@@ -76,7 +76,7 @@ public class PipelineIT {
public void shouldExecutePipelineCorrectlyThreeElements() {
String[] inputElements = { "a", "b", "c" };
GlobalTaskPoolConfig<String> config = new GlobalTaskPoolConfig<>(inputElements);
TeeTimeService scheduling = new GlobalTaskPoolScheduling(NUM_THREADS, config, 1);
TeeTimeScheduler scheduling = new GlobalTaskPoolScheduling(NUM_THREADS, config, 1);
Execution<GlobalTaskPoolConfig<String>> execution = new Execution<>(config, true, scheduling);
execution.executeBlocking();
......@@ -90,7 +90,7 @@ public class PipelineIT {
public void shouldExecutePipelineCorrectlyThreeElementsWithOneSingleThread() {
String[] inputElements = { "a", "b", "c" };
GlobalTaskPoolConfig<String> config = new GlobalTaskPoolConfig<>(inputElements);
TeeTimeService scheduling = new GlobalTaskPoolScheduling(1, config, 1);
TeeTimeScheduler scheduling = new GlobalTaskPoolScheduling(1, config, 1);
Execution<GlobalTaskPoolConfig<String>> execution = new Execution<>(config, true, scheduling);
execution.executeBlocking();
......@@ -103,7 +103,7 @@ public class PipelineIT {
public void shouldExecutePipelineCorrectlyThreeElementsWith2ExecutionsPerTask() {
String[] inputElements = { "a", "b", "c" };
GlobalTaskPoolConfig<String> config = new GlobalTaskPoolConfig<>(inputElements);
TeeTimeService scheduling = new GlobalTaskPoolScheduling(NUM_THREADS, config, 2);
TeeTimeScheduler scheduling = new GlobalTaskPoolScheduling(NUM_THREADS, config, 2);
Execution<GlobalTaskPoolConfig<String>> execution = new Execution<>(config, true, scheduling);
execution.executeBlocking();
......@@ -116,7 +116,7 @@ public class PipelineIT {
public void shouldExecutePipelineCorrectlyThreeElementsWith3ExecutionsPerTask() {
String[] inputElements = { "a", "b", "c" };
GlobalTaskPoolConfig<String> config = new GlobalTaskPoolConfig<>(inputElements);
TeeTimeService scheduling = new GlobalTaskPoolScheduling(NUM_THREADS, config, 3);
TeeTimeScheduler scheduling = new GlobalTaskPoolScheduling(NUM_THREADS, config, 3);
Execution<GlobalTaskPoolConfig<String>> execution = new Execution<>(config, true, scheduling);
execution.executeBlocking();
......@@ -130,7 +130,7 @@ public class PipelineIT {
public void shouldExecuteReflexivePipeCorrectlyManyElements() {
int numElements = 1_000;
ManyElementsWithStatelessStageGlobalTaskPoolConfig config = new ManyElementsWithStatelessStageGlobalTaskPoolConfig(numElements);
TeeTimeService scheduling = new GlobalTaskPoolScheduling(NUM_THREADS, config, 1);
TeeTimeScheduler scheduling = new GlobalTaskPoolScheduling(NUM_THREADS, config, 1);
Execution<ManyElementsWithStatelessStageGlobalTaskPoolConfig> execution = new Execution<>(config, true, scheduling);
execution.executeBlocking();
......
......@@ -26,7 +26,7 @@ import org.junit.Test;
import teetime.framework.Configuration;
import teetime.framework.Execution;
import teetime.framework.TeeTimeService;
import teetime.framework.TeeTimeScheduler;
import teetime.framework.scheduling.globaltaskpool.GlobalTaskPoolScheduling;
import teetime.stage.CollectorSink;
import teetime.stage.StreamProducer;
......@@ -72,7 +72,7 @@ public class ProducerConsumerGlobalTaskPoolIT {
.from(new StreamProducer<>(inputElements))
.end(new CollectorSink<>(processedElements));
TeeTimeService scheduling = new GlobalTaskPoolScheduling(numThreads, config, numExecutions);
TeeTimeScheduler scheduling = new GlobalTaskPoolScheduling(numThreads, config, numExecutions);
Execution<Configuration> execution = new Execution<>(config, true, scheduling);
execution.executeBlocking();
......
......@@ -28,7 +28,7 @@ import org.junit.runners.MethodSorters;
import teetime.framework.Configuration;
import teetime.framework.Execution;
import teetime.framework.TeeTimeService;
import teetime.framework.TeeTimeScheduler;
import teetime.stage.CollectorSink;
import teetime.stage.Counter;
import teetime.stage.StreamProducer;
......@@ -172,7 +172,7 @@ public class ThreeStagesGlobalTaskPoolIT {
.to(new Counter<>())
.end(new CollectorSink<>(processedElements));
TeeTimeService scheduling = new GlobalTaskPoolScheduling(numThreads, config, numExecutions);
TeeTimeScheduler scheduling = new GlobalTaskPoolScheduling(numThreads, config, numExecutions);
Execution<Configuration> execution = new Execution<>(config, true, scheduling);
execution.executeBlocking();
......
......@@ -28,7 +28,7 @@ import org.junit.runners.MethodSorters;
import teetime.framework.Configuration;
import teetime.framework.Execution;
import teetime.framework.TeeTimeService;
import teetime.framework.TeeTimeScheduler;
import teetime.framework.scheduling.pushpullmodel.PushPullScheduling;
import teetime.stage.CollectorSink;
import teetime.stage.Counter;
......@@ -63,7 +63,7 @@ public class ThreeStagesPushPullIT {
.to(new Counter<>())
.end(new CollectorSink<>(processedElements));
TeeTimeService scheduling = new PushPullScheduling(config);
TeeTimeScheduler scheduling = new PushPullScheduling(config);
Execution<Configuration> execution = new Execution<>(config, true, scheduling);
execution.executeBlocking();
......
......@@ -58,7 +58,7 @@ public abstract class AbstractStage {
private Thread owningThread;
private boolean isActive;
/** the scheduler used for this stage and all of the other stages */
private TeeTimeService scheduler;
private TeeTimeScheduler scheduler;
private final Map<Class<? extends ISignal>, Set<InputPort<?>>> signalMap = new HashMap<Class<? extends ISignal>, Set<InputPort<?>>>();
private final Set<Class<? extends ISignal>> triggeredSignalTypes = new HashSet<Class<? extends ISignal>>();
......@@ -149,11 +149,11 @@ public abstract class AbstractStage {
/**
* Required by {@link RuntimeServiceFacade#startWithinNewThread(AbstractStage, AbstractStage)}
*/
TeeTimeService getScheduler() {
TeeTimeScheduler getScheduler() {
return scheduler;
}
void setScheduler(final TeeTimeService scheduler) {
void setScheduler(final TeeTimeScheduler scheduler) {
this.scheduler = scheduler;
}
......
......@@ -27,13 +27,13 @@ import teetime.framework.scheduling.pushpullmodel.PushPullScheduling;
@Deprecated
public final class ConfigurationContext {
private final TeeTimeService teeTimeService;
private final TeeTimeScheduler teeTimeService;
public ConfigurationContext(final Configuration configuration) {
this.teeTimeService = new PushPullScheduling(configuration);
}
public ConfigurationContext(final TeeTimeService teeTimeService) {
public ConfigurationContext(final TeeTimeScheduler teeTimeService) {
this.teeTimeService = teeTimeService;
}
......
......@@ -104,7 +104,7 @@ public final class Execution<T extends Configuration> {
private ExecutionState state;
private TeeTimeService scheduler;
private TeeTimeScheduler scheduler;
/**
* Creates a new {@link Execution}. It validates the given configuration and uses the {@link PushPullScheduling} as default scheduler.
......@@ -136,7 +136,7 @@ public final class Execution<T extends Configuration> {
* @param scheduler
* to be used for the given configuration.
*/
public Execution(final T configuration, final boolean validationEnabled, final TeeTimeService scheduler) {
public Execution(final T configuration, final boolean validationEnabled, final TeeTimeScheduler scheduler) {
this.scheduler = scheduler;
this.configuration = configuration;
if (configuration.isInitialized()) {
......
......@@ -58,7 +58,7 @@ public final class StageFacade {
stage.setExceptionHandler(exceptionHandler);
}
public void setScheduler(final AbstractStage stage, final TeeTimeService scheduler) {
public void setScheduler(final AbstractStage stage, final TeeTimeScheduler scheduler) {
stage.setScheduler(scheduler);
}
......
......@@ -22,7 +22,7 @@ package teetime.framework;
*
* @since 2.0
*/
public interface TeeTimeService {
public interface TeeTimeScheduler {
abstract void onInitialize();
......
......@@ -45,7 +45,7 @@ import teetime.framework.validation.AnalysisNotValidException;
* @since 3.0
*
*/
public class GlobalTaskPoolScheduling implements TeeTimeService, PipeScheduler, UncaughtExceptionHandler {
public class GlobalTaskPoolScheduling implements TeeTimeScheduler, PipeScheduler, UncaughtExceptionHandler {
private static final Logger LOGGER = LoggerFactory.getLogger(GlobalTaskPoolScheduling.class);
private static final StageFacade STAGE_FACADE = StageFacade.INSTANCE;
......
......@@ -31,9 +31,9 @@ class A4StageAttributeSetter {
// requires: factory and context
private final Configuration configuration;
private final Set<AbstractStage> threadableStages;
private final TeeTimeService scheduler;
private final TeeTimeScheduler scheduler;
public A4StageAttributeSetter(final Configuration configuration, final Set<AbstractStage> threadableStages, final TeeTimeService scheduler) {
public A4StageAttributeSetter(final Configuration configuration, final Set<AbstractStage> threadableStages, final TeeTimeScheduler scheduler) {
super();
this.configuration = configuration;
this.threadableStages = threadableStages;
......
......@@ -25,7 +25,7 @@ import teetime.framework.scheduling.CountDownAndUpLatch;
import teetime.framework.signal.ValidatingSignal;
import teetime.framework.validation.AnalysisNotValidException;
public class PushPullScheduling implements TeeTimeService, ThreadListener {
public class PushPullScheduling implements TeeTimeScheduler, ThreadListener {
private static final Logger LOGGER = LoggerFactory.getLogger(PushPullScheduling.class);
......
......@@ -26,7 +26,7 @@ import com.google.common.primitives.Longs;
import teetime.framework.AbstractPort;
import teetime.framework.Execution;
import teetime.framework.TeeTimeService;
import teetime.framework.TeeTimeScheduler;
import teetime.framework.pipe.IMonitorablePipe;
import teetime.framework.scheduling.globaltaskpool.GlobalTaskPoolScheduling;
import teetime.stage.basic.distributor.strategy.NonBlockingRoundRobinStrategy;
......@@ -75,7 +75,7 @@ public class WordCounterTestWithGlobalTaskPool {
for (int i = 0; i < numWarmUps; i++) {
LOGGER.info("Warm up #{}", i);
final WordCounterConfiguration wcc = new WordCounterConfiguration(numWorkerThreads, testFile);
final TeeTimeService scheduling = new GlobalTaskPoolScheduling(numWorkerThreads, wcc, numOfExecutions);
final TeeTimeScheduler scheduling = new GlobalTaskPoolScheduling(numWorkerThreads, wcc, numOfExecutions);
final Execution<?> analysis = new Execution<WordCounterConfiguration>(wcc, true, scheduling);
stopWatch.start();
......@@ -87,7 +87,7 @@ public class WordCounterTestWithGlobalTaskPool {
LOGGER.info("Starting analysis...");
final WordCounterConfiguration wcc = new WordCounterConfiguration(numWorkerThreads, testFile);
final TeeTimeService scheduling = new GlobalTaskPoolScheduling(numWorkerThreads, wcc, numOfExecutions);
final TeeTimeScheduler scheduling = new GlobalTaskPoolScheduling(numWorkerThreads, wcc, numOfExecutions);
final Execution<?> analysis = new Execution<WordCounterConfiguration>(wcc, true, scheduling);
if (monitoringEnabled) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment