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

Merge branch 'renamed-StageWithPort' into 'master'

Renamed stage with port

just renamed it

See merge request !5
parents 80599470 55411184
No related branches found
No related tags found
No related merge requests found
Showing
with 23 additions and 23 deletions
......@@ -14,7 +14,7 @@ import teetime.framework.pipe.IPipe;
import teetime.framework.signal.ISignal;
import teetime.framework.validation.InvalidPortConnection;
public abstract class AbstractStage implements StageWithPort {
public abstract class AbstractStage implements Stage {
private final String id;
/**
......@@ -22,7 +22,7 @@ public abstract class AbstractStage implements StageWithPort {
*/
protected final Logger logger;
private StageWithPort parentStage;
private Stage parentStage;
private final List<InputPort<?>> inputPortList = new ArrayList<InputPort<?>>();
private final List<OutputPort<?>> outputPortList = new ArrayList<OutputPort<?>>();
......@@ -74,12 +74,12 @@ public abstract class AbstractStage implements StageWithPort {
}
@Override
public StageWithPort getParentStage() {
public Stage getParentStage() {
return this.parentStage;
}
@Override
public void setParentStage(final StageWithPort parentStage, final int index) {
public void setParentStage(final Stage parentStage, final int index) {
this.parentStage = parentStage;
}
......
package teetime.framework;
public class HeadPipeline<FirstStage extends HeadStage, LastStage extends StageWithPort> extends Pipeline<FirstStage, LastStage> implements HeadStage {
public class HeadPipeline<FirstStage extends HeadStage, LastStage extends Stage> extends Pipeline<FirstStage, LastStage> implements HeadStage {
public HeadPipeline() {}
......
package teetime.framework;
public interface HeadStage extends StageWithPort {
public interface HeadStage extends Stage {
boolean shouldBeTerminated();
......
......@@ -4,9 +4,9 @@ import teetime.framework.pipe.IPipe;
public class InputPort<T> extends AbstractPort<T> {
private final StageWithPort owningStage;
private final Stage owningStage;
InputPort(final StageWithPort owningStage) {
InputPort(final Stage owningStage) {
super();
this.owningStage = owningStage;
}
......@@ -33,7 +33,7 @@ public class InputPort<T> extends AbstractPort<T> {
this.pipe = pipe;
}
public StageWithPort getOwningStage() {
public Stage getOwningStage() {
return this.owningStage;
}
......
......@@ -5,7 +5,7 @@ import java.util.List;
import teetime.framework.signal.ISignal;
import teetime.framework.validation.InvalidPortConnection;
public class Pipeline<FirstStage extends StageWithPort, LastStage extends StageWithPort> implements StageWithPort {
public class Pipeline<FirstStage extends Stage, LastStage extends Stage> implements Stage {
protected FirstStage firstStage;
protected LastStage lastStage;
......@@ -37,12 +37,12 @@ public class Pipeline<FirstStage extends StageWithPort, LastStage extends StageW
}
@Override
public StageWithPort getParentStage() {
public Stage getParentStage() {
return this.firstStage.getParentStage();
}
@Override
public void setParentStage(final StageWithPort parentStage, final int index) {
public void setParentStage(final Stage parentStage, final int index) {
this.firstStage.setParentStage(parentStage, index);
}
......
......@@ -5,15 +5,15 @@ import java.util.List;
import teetime.framework.signal.ISignal;
import teetime.framework.validation.InvalidPortConnection;
public interface StageWithPort {
public interface Stage {
String getId();
void executeWithPorts();
StageWithPort getParentStage();
Stage getParentStage();
void setParentStage(StageWithPort parentStage, int index);
void setParentStage(Stage parentStage, int index);
// BETTER remove this method since it will be replaced by onTerminating()
void onIsPipelineHead();
......
......@@ -2,7 +2,7 @@ package teetime.framework.pipe;
import teetime.framework.InputPort;
import teetime.framework.OutputPort;
import teetime.framework.StageWithPort;
import teetime.framework.Stage;
public abstract class AbstractPipe implements IPipe {
......@@ -15,7 +15,7 @@ public abstract class AbstractPipe implements IPipe {
* this.getPipe().getTargetPort().getOwningStage()
* </pre>
*/
protected StageWithPort cachedTargetStage;
protected Stage cachedTargetStage;
protected <T> AbstractPipe(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) {
this.targetPort = targetPort;
......
......@@ -21,7 +21,7 @@ import java.util.List;
import teetime.framework.HeadPipeline;
import teetime.framework.RunnableStage;
import teetime.framework.StageWithPort;
import teetime.framework.Stage;
import teetime.framework.pipe.DummyPipe;
import teetime.framework.pipe.IPipe;
import teetime.framework.pipe.PipeFactory;
......@@ -135,7 +135,7 @@ public class MethodCallThroughputAnalysis17 {
* @param numNoopFilters
* @since 1.10
*/
private HeadPipeline<Relay<TimestampObject>, CollectorSink<TimestampObject>> buildPipeline(final StageWithPort previousStage,
private HeadPipeline<Relay<TimestampObject>, CollectorSink<TimestampObject>> buildPipeline(final Stage previousStage,
final List<TimestampObject> timestampObjects) {
// create stages
Relay<TimestampObject> relay = new Relay<TimestampObject>();
......
......@@ -8,7 +8,7 @@ import java.util.List;
import teetime.framework.AnalysisConfiguration;
import teetime.framework.HeadPipeline;
import teetime.framework.StageWithPort;
import teetime.framework.Stage;
import teetime.framework.pipe.SingleElementPipe;
import teetime.framework.pipe.SpScPipe;
import teetime.stage.Clock;
......@@ -117,7 +117,7 @@ public class TcpTraceReconstructionAnalysisWithThreadsConfiguration extends Anal
return pipeline;
}
private static class StageFactory<T extends StageWithPort> {
private static class StageFactory<T extends Stage> {
private final Constructor<T> constructor;
private final List<T> stages = new ArrayList<T>();
......
......@@ -10,7 +10,7 @@ import java.util.TreeMap;
import teetime.framework.HeadPipeline;
import teetime.framework.RunnableStage;
import teetime.framework.StageWithPort;
import teetime.framework.Stage;
import teetime.framework.pipe.SingleElementPipe;
import teetime.framework.pipe.SpScPipe;
import teetime.stage.Clock;
......@@ -98,7 +98,7 @@ public class TcpTraceReductionAnalysisWithThreads {
return pipeline;
}
private static class StageFactory<T extends StageWithPort> {
private static class StageFactory<T extends Stage> {
private final Constructor<T> constructor;
private final List<T> stages = new ArrayList<T>();
......
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