From e58e15e3bdd96040e8d161ea00da97eefd31666b Mon Sep 17 00:00:00 2001 From: Christian Wulf <chw@informatik.uni-kiel.de> Date: Tue, 8 Jul 2014 21:57:12 +0200 Subject: [PATCH] removed endStage from TCPReaderSink --- .../methodcallWithPorts/stage/EndStage.java | 13 ++++-------- .../examples/kiekerdays/TCPReaderSink.java | 1 - .../examples/kiekerdays/TcpTraceLogging.java | 21 ++++++++----------- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/src/main/java/teetime/variant/methodcallWithPorts/stage/EndStage.java b/src/main/java/teetime/variant/methodcallWithPorts/stage/EndStage.java index e31ef23e..87f6968b 100644 --- a/src/main/java/teetime/variant/methodcallWithPorts/stage/EndStage.java +++ b/src/main/java/teetime/variant/methodcallWithPorts/stage/EndStage.java @@ -1,7 +1,5 @@ package teetime.variant.methodcallWithPorts.stage; -import java.util.LinkedList; -import java.util.List; import java.util.UUID; import teetime.util.ConstructorClosure; @@ -14,9 +12,9 @@ public class EndStage<T> implements StageWithPort<T, T> { private final InputPort<T> inputPort = new InputPort<T>(this); - public int count; + // public int count; public ConstructorClosure<?> closure; - public List<Object> list = new LinkedList<Object>(); + // public List<Object> list = new LinkedList<Object>(); private final String id; @@ -31,13 +29,12 @@ public class EndStage<T> implements StageWithPort<T, T> { @Override public StageWithPort<?, ?> getParentStage() { - // TODO Auto-generated method stub return null; } @Override public void setParentStage(final StageWithPort<?, ?> parentStage, final int index) { - // TODO Auto-generated method stub + // do nothing } @@ -53,7 +50,6 @@ public class EndStage<T> implements StageWithPort<T, T> { @Override public OutputPort<T> getOutputPort() { - // TODO Auto-generated method stub return null; } @@ -68,8 +64,7 @@ public class EndStage<T> implements StageWithPort<T, T> { @Override public void onStart() { - // TODO Auto-generated method stub - + // do nothing } @Override diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TCPReaderSink.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TCPReaderSink.java index 5ef78270..db20af71 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TCPReaderSink.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TCPReaderSink.java @@ -45,7 +45,6 @@ public class TCPReaderSink extends ProducerStage<Void, IMonitoringRecord> { private static final int MESSAGE_BUFFER_SIZE = 65535; - // BETTER use a non thread-safe implementation to increase performance. A thread-safe version is not necessary. private final ILookup<String> stringRegistry = new Lookup<String>(); private int port1 = 10133; private int port2 = 10134; diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceLogging.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceLogging.java index 34146490..55b5b400 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceLogging.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceLogging.java @@ -1,11 +1,8 @@ package teetime.variant.methodcallWithPorts.examples.kiekerdays; import teetime.variant.explicitScheduling.framework.core.Analysis; -import teetime.variant.methodcallWithPorts.framework.core.Pipeline; import teetime.variant.methodcallWithPorts.framework.core.RunnableStage; import teetime.variant.methodcallWithPorts.framework.core.StageWithPort; -import teetime.variant.methodcallWithPorts.framework.core.pipe.SingleElementPipe; -import teetime.variant.methodcallWithPorts.stage.EndStage; import kieker.common.record.IMonitoringRecord; @@ -35,15 +32,15 @@ public class TcpTraceLogging extends Analysis { private StageWithPort<Void, IMonitoringRecord> buildTcpPipeline() { TCPReaderSink tcpReader = new TCPReaderSink(); - EndStage<IMonitoringRecord> endStage = new EndStage<IMonitoringRecord>(); - - SingleElementPipe.connect(tcpReader.getOutputPort(), endStage.getInputPort()); - - // create and configure pipeline - Pipeline<Void, IMonitoringRecord> pipeline = new Pipeline<Void, IMonitoringRecord>(); - pipeline.setFirstStage(tcpReader); - pipeline.setLastStage(endStage); - return pipeline; + // EndStage<IMonitoringRecord> endStage = new EndStage<IMonitoringRecord>(); + // + // SingleElementPipe.connect(tcpReader.getOutputPort(), endStage.getInputPort()); + // + // // create and configure pipeline + // Pipeline<Void, IMonitoringRecord> pipeline = new Pipeline<Void, IMonitoringRecord>(); + // pipeline.setFirstStage(tcpReader); + // pipeline.setLastStage(endStage); + return tcpReader; } public static void main(final String[] args) { -- GitLab