From d0766d38339d8b52ab3c99e7399f06636118c65e Mon Sep 17 00:00:00 2001 From: Christian Wulf <chw@informatik.uni-kiel.de> Date: Fri, 29 Aug 2014 19:07:36 +0200 Subject: [PATCH] fixed some compiler errors --- .../methodcallWithPorts/framework/core/HeadPipeline.java | 4 ++++ .../examples/kiekerdays/TcpTraceLoggingExplorviz.java | 6 +++--- .../examples/kiekerdays/TcpTraceReconstruction.java | 8 +++----- .../examples/kiekerdays/TcpTraceReduction.java | 9 +++------ 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/HeadPipeline.java b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/HeadPipeline.java index f4e3e867..2f57679e 100644 --- a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/HeadPipeline.java +++ b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/HeadPipeline.java @@ -2,6 +2,10 @@ package teetime.variant.methodcallWithPorts.framework.core; public class HeadPipeline<FirstStage extends HeadStage, LastStage extends StageWithPort> extends Pipeline<FirstStage, LastStage> implements HeadStage { + public HeadPipeline() {} + + public HeadPipeline(final String name) {} + @Override public boolean shouldBeTerminated() { return this.firstStage.shouldBeTerminated(); diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceLoggingExplorviz.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceLoggingExplorviz.java index 91a6a5ae..d81ab05b 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceLoggingExplorviz.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceLoggingExplorviz.java @@ -2,8 +2,8 @@ package teetime.variant.methodcallWithPorts.examples.kiekerdays; import teetime.variant.explicitScheduling.framework.core.Analysis; import teetime.variant.methodcallWithPorts.framework.core.HeadPipeline; +import teetime.variant.methodcallWithPorts.framework.core.HeadStage; 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.basic.Sink; import teetime.variant.methodcallWithPorts.stage.explorviz.KiekerRecordTcpReader; @@ -17,7 +17,7 @@ public class TcpTraceLoggingExplorviz extends Analysis { @Override public void init() { super.init(); - StageWithPort tcpPipeline = this.buildTcpPipeline(); + HeadStage tcpPipeline = this.buildTcpPipeline(); this.tcpThread = new Thread(new RunnableStage(tcpPipeline)); } @@ -34,7 +34,7 @@ public class TcpTraceLoggingExplorviz extends Analysis { } } - private StageWithPort buildTcpPipeline() { + private HeadStage buildTcpPipeline() { KiekerRecordTcpReader tcpReader = new KiekerRecordTcpReader(); Sink<IMonitoringRecord> endStage = new Sink<IMonitoringRecord>(); diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceReconstruction.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceReconstruction.java index 538c20c1..f6967ff1 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceReconstruction.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceReconstruction.java @@ -8,8 +8,8 @@ import teetime.util.concurrent.hashmap.ConcurrentHashMapWithDefault; import teetime.util.concurrent.hashmap.TraceBuffer; import teetime.variant.explicitScheduling.framework.core.Analysis; import teetime.variant.methodcallWithPorts.framework.core.HeadPipeline; +import teetime.variant.methodcallWithPorts.framework.core.HeadStage; 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.framework.core.pipe.SpScPipe; import teetime.variant.methodcallWithPorts.stage.InstanceOfFilter; @@ -48,7 +48,7 @@ public class TcpTraceReconstruction extends Analysis { this.workerThreads = new Thread[this.numWorkerThreads]; for (int i = 0; i < this.workerThreads.length; i++) { - StageWithPort pipeline = this.buildPipeline(tcpPipeline.getLastStage()); + HeadStage pipeline = this.buildPipeline(tcpPipeline.getLastStage()); this.workerThreads[i] = new Thread(new RunnableStage(pipeline)); } } @@ -66,7 +66,7 @@ public class TcpTraceReconstruction extends Analysis { return pipeline; } - private StageWithPort buildPipeline(final Distributor<IMonitoringRecord> tcpReaderPipeline) { + private HeadStage buildPipeline(final Distributor<IMonitoringRecord> tcpReaderPipeline) { // create stages Relay<IMonitoringRecord> relay = new Relay<IMonitoringRecord>(); final InstanceOfFilter<IMonitoringRecord, IFlowRecord> instanceOfFilter = new InstanceOfFilter<IMonitoringRecord, IFlowRecord>( @@ -85,8 +85,6 @@ public class TcpTraceReconstruction extends Analysis { // create and configure pipeline HeadPipeline<Relay<IMonitoringRecord>, Sink<TraceEventRecords>> pipeline = new HeadPipeline<Relay<IMonitoringRecord>, Sink<TraceEventRecords>>(); pipeline.setFirstStage(relay); - pipeline.addIntermediateStage(instanceOfFilter); - pipeline.addIntermediateStage(traceReconstructionFilter); pipeline.setLastStage(endStage); return pipeline; } diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceReduction.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceReduction.java index a38bf7d6..f04cdfc8 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceReduction.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/kiekerdays/TcpTraceReduction.java @@ -10,8 +10,8 @@ import teetime.util.concurrent.hashmap.ConcurrentHashMapWithDefault; import teetime.util.concurrent.hashmap.TraceBuffer; import teetime.variant.explicitScheduling.framework.core.Analysis; import teetime.variant.methodcallWithPorts.framework.core.HeadPipeline; +import teetime.variant.methodcallWithPorts.framework.core.HeadStage; 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.framework.core.pipe.SpScPipe; import teetime.variant.methodcallWithPorts.stage.Clock; @@ -59,7 +59,7 @@ public class TcpTraceReduction extends Analysis { this.workerThreads = new Thread[this.numWorkerThreads]; for (int i = 0; i < this.workerThreads.length; i++) { - StageWithPort pipeline = this.buildPipeline(tcpPipeline.getLastStage(), clockStage.getLastStage()); + HeadStage pipeline = this.buildPipeline(tcpPipeline.getLastStage(), clockStage.getLastStage()); this.workerThreads[i] = new Thread(new RunnableStage(pipeline)); } } @@ -92,7 +92,7 @@ public class TcpTraceReduction extends Analysis { return pipeline; } - private StageWithPort buildPipeline(final Distributor<IMonitoringRecord> tcpReaderPipeline, final Distributor<Long> clockStage) { + private HeadStage buildPipeline(final Distributor<IMonitoringRecord> tcpReaderPipeline, final Distributor<Long> clockStage) { // create stages Relay<IMonitoringRecord> relay = new Relay<IMonitoringRecord>(); final InstanceOfFilter<IMonitoringRecord, IFlowRecord> instanceOfFilter = new InstanceOfFilter<IMonitoringRecord, IFlowRecord>( @@ -115,9 +115,6 @@ public class TcpTraceReduction extends Analysis { // create and configure pipeline HeadPipeline<Relay<IMonitoringRecord>, Sink<TraceEventRecords>> pipeline = new HeadPipeline<Relay<IMonitoringRecord>, Sink<TraceEventRecords>>(); pipeline.setFirstStage(relay); - pipeline.addIntermediateStage(instanceOfFilter); - pipeline.addIntermediateStage(traceReconstructionFilter); - pipeline.addIntermediateStage(traceReductionFilter); pipeline.setLastStage(endStage); return pipeline; } -- GitLab