Skip to content
Snippets Groups Projects
Commit 1806362e authored by Christian Wulf's avatar Christian Wulf
Browse files

renamed connectStages to connectPorts

parent 2d02bc7b
No related branches found
No related tags found
No related merge requests found
#FindBugs User Preferences
#Mon Apr 20 12:42:35 CEST 2015
#Mon Apr 20 15:07:50 CEST 2015
detector_threshold=3
effort=max
excludefilter0=.fbExcludeFilterFile|true
......
......@@ -107,7 +107,7 @@ public abstract class AbstractCompositeStage extends Stage {
super.setOwningThread(owningThread);
}
protected <T> void connectStages(final OutputPort<? extends T> out, final InputPort<T> in) {
protected <T> void connectPorts(final OutputPort<? extends T> out, final InputPort<T> in) {
INTRA_PIPE_FACTORY.create(out, in);
containingStages.add(out.getOwningStage());
containingStages.add(in.getOwningStage());
......
......@@ -267,7 +267,7 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
* This method will start the Analysis and block until it is finished.
*
* @throws AnalysisException
* if at least one exception in one thread has occurred within the analysis. The exception contains the pairs of thread and throwable
* if at least one exception in one thread has occurred within the analysis. The exception contains the pairs of thread and throwable.
*
* @since 1.1
*/
......
......@@ -21,6 +21,7 @@ import java.util.List;
import teetime.framework.Analysis;
import teetime.framework.AnalysisConfiguration;
import teetime.framework.AnalysisException;
import teetime.framework.Stage;
import teetime.framework.StageState;
import teetime.stage.CollectorSink;
......@@ -68,9 +69,17 @@ public final class StageTester {
return this;
}
/**
* This method will start the test and block until it is finished.
*
* @throws AnalysisException
* if at least one exception in one thread has occurred within the analysis.
* The exception contains the pairs of thread and throwable.
*
*/
public void start() {
final AnalysisConfiguration configuration = new Configuration(inputHolders, stage, outputHolders);
final Analysis analysis = new Analysis(configuration);
final Analysis<AnalysisConfiguration> analysis = new Analysis<AnalysisConfiguration>(configuration);
analysis.executeBlocking();
}
......
......@@ -36,8 +36,8 @@ public final class EveryXthPrinter<T> extends AbstractCompositeStage {
EveryXthStage<T> everyXthStage = new EveryXthStage<T>(threshold);
Printer<Integer> printer = new Printer<Integer>();
connectStages(distributor.getNewOutputPort(), everyXthStage.getInputPort());
connectStages(everyXthStage.getOutputPort(), printer.getInputPort());
connectPorts(distributor.getNewOutputPort(), everyXthStage.getInputPort());
connectPorts(everyXthStage.getOutputPort(), printer.getInputPort());
lastStages.add(printer);
distributor.setStrategy(new CopyByReferenceStrategy());
......
......@@ -45,8 +45,8 @@ public final class WordCounter extends AbstractCompositeStage {
this.lastStages.add(this.mapCounter);
final ToLowerCase toLowerCase = new ToLowerCase();
connectStages(this.tokenizer.getOutputPort(), toLowerCase.getInputPort());
connectStages(toLowerCase.getOutputPort(), this.mapCounter.getInputPort());
connectPorts(this.tokenizer.getOutputPort(), toLowerCase.getInputPort());
connectPorts(toLowerCase.getOutputPort(), this.mapCounter.getInputPort());
// connectStages(wordcharacterFilter.getOutputPort(), this.mapCounter.getInputPort());
}
......
wiki @ 0e447457
Subproject commit 162510ff4d2f04011498ba6920aae0c78347c6c8
Subproject commit 0e4474577e1f49bc96e734c286b2d9e0363895e8
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment