diff --git a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/AbstractStage.java b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/AbstractStage.java index 8c0584ac40239ab0f7a60b61cf1ea0086a27643f..7e8e853a882a91c7e46f03b245fc13c2226876a7 100644 --- a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/AbstractStage.java +++ b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/AbstractStage.java @@ -37,32 +37,6 @@ public abstract class AbstractStage<I, O> implements StageWithPort<I, O> { return this.outputPort; } - @Override - public CommittableQueue<O> execute2(final CommittableQueue<I> elements) { - // pass through the end signal - // InputPort<I> port = this.getInputPort(); - // if (elements != null) { - // // I element = port.read(); - // // I element = elements.getTail(); - // // if (element == END_SIGNAL) { - // // this.send((O) END_SIGNAL); - // // } else { - // // // elements = this.getInputPort().pipe.getElements(); - // // } - // - // this.execute4(elements); - // } else { - // throw new IllegalStateException(); - // } - - this.execute4(elements); - - // this.outputElements.commit(); - - // return this.outputElements; - return null; - } - protected void execute4(final CommittableQueue<I> elements) { throw new IllegalStateException(); // default implementation } diff --git a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/ConsumerStage.java b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/ConsumerStage.java index 331e42060cde3277bc733960e48b6438a021f5ee..e43c0f44302f8c8d9d16ad7334866bd81ed88424 100644 --- a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/ConsumerStage.java +++ b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/ConsumerStage.java @@ -1,23 +1,8 @@ package teetime.variant.methodcallWithPorts.framework.core; -import teetime.util.list.CommittableQueue; public abstract class ConsumerStage<I, O> extends AbstractStage<I, O> { - @Override - public CommittableQueue<O> execute2(final CommittableQueue<I> elements) { - // the following code block does not harm the performance - // boolean inputIsEmpty = elements.isEmpty(); - // if (inputIsEmpty) { - // this.disable(); - // return this.outputElements; - // } - - CommittableQueue<O> output = super.execute2(elements); - this.setReschedulable(!elements.isEmpty()); // costs ~1200 ns on chw-work (not reproducible) - return output; - } - @Override public void executeWithPorts() { // if (this.logger.isDebugEnabled()) { diff --git a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/Pipeline.java b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/Pipeline.java index 4d066d56fe605d3bb40e3fc457c6284ae79a7cf0..2da5e52c7db3c002eab676679f8eeaf970ee4c20 100644 --- a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/Pipeline.java +++ b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/Pipeline.java @@ -5,8 +5,6 @@ import java.util.LinkedList; import java.util.List; import java.util.UUID; -import teetime.util.list.CommittableQueue; - import kieker.common.logging.Log; import kieker.common.logging.LogFactory; @@ -58,27 +56,6 @@ public class Pipeline<I, O> implements StageWithPort<I, O> { this.lastStage = stage; } - @Override - public CommittableQueue<O> execute2(final CommittableQueue<I> elements) { - // CommittableQueue queue = this.firstStage.execute2(elements); - // for (Stage<?, ?> stage : this.intermediateStages) { - // queue = stage.execute2(queue); - // } - // return this.lastStage.execute2(queue); - - // below is faster than above (probably because of the instantiation of a list iterator in each (!) execution) - CommittableQueue queue = elements; - - // for (int i = this.startIndex; i < this.stages.length; i++) { - // Stage<?, ?> stage = this.stages[i]; - // queue = stage.execute2(queue); - // } - - this.firstStage.execute2(elements); - this.setReschedulable(this.firstStage.isReschedulable()); - return queue; - } - @Override public void executeWithPorts() { // StageWithPort<?, ?> headStage = this.currentHeads.next(); diff --git a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/ProducerStage.java b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/ProducerStage.java index 16dabc4cac9f9afcbbe24b0d1fdbe7b9c1b23339..f960b56909a839084861458da15f59abb74b02fa 100644 --- a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/ProducerStage.java +++ b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/ProducerStage.java @@ -1,6 +1,5 @@ package teetime.variant.methodcallWithPorts.framework.core; -import teetime.util.list.CommittableQueue; public abstract class ProducerStage<I, O> extends AbstractStage<I, O> { @@ -8,18 +7,6 @@ public abstract class ProducerStage<I, O> extends AbstractStage<I, O> { this.setReschedulable(true); } - @Override - public CommittableQueue<O> execute2(final CommittableQueue<I> elements) { - CommittableQueue<O> outputElements = super.execute2(elements); - - boolean outputIsEmpty = outputElements.isEmpty(); - if (outputIsEmpty) { - this.getOutputPort().getPipe().close(); - } - - return outputElements; - } - @Override public void executeWithPorts() { this.execute5(null); diff --git a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/StageWithPort.java b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/StageWithPort.java index 3503d3c4cb94a263709aa610eaef259a70ed4a7f..8cea382223be9d6810eacb8ff3da4fd94145158a 100644 --- a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/StageWithPort.java +++ b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/StageWithPort.java @@ -1,6 +1,5 @@ package teetime.variant.methodcallWithPorts.framework.core; -import teetime.util.list.CommittableQueue; public interface StageWithPort<I, O> { @@ -10,8 +9,6 @@ public interface StageWithPort<I, O> { void executeWithPorts(); - CommittableQueue<O> execute2(CommittableQueue<I> elements); - StageWithPort<?, ?> getParentStage(); void setParentStage(StageWithPort<?, ?> parentStage, int index); diff --git a/src/main/java/teetime/variant/methodcallWithPorts/stage/EndStage.java b/src/main/java/teetime/variant/methodcallWithPorts/stage/EndStage.java index 41e4f9e83e75178efb9d820fedd474db450dd461..8019b0d849654206d701b4c6ae6b47c1a40f7c8a 100644 --- a/src/main/java/teetime/variant/methodcallWithPorts/stage/EndStage.java +++ b/src/main/java/teetime/variant/methodcallWithPorts/stage/EndStage.java @@ -4,7 +4,6 @@ import java.util.LinkedList; import java.util.List; import teetime.util.ConstructorClosure; -import teetime.util.list.CommittableQueue; import teetime.variant.methodcallWithPorts.framework.core.InputPort; import teetime.variant.methodcallWithPorts.framework.core.OutputPort; import teetime.variant.methodcallWithPorts.framework.core.StageWithPort; @@ -22,12 +21,6 @@ public class EndStage<T> implements StageWithPort<T, T> { // do nothing } - @Override - public CommittableQueue<T> execute2(final CommittableQueue<T> elements) { - // TODO Auto-generated method stub - return null; - } - @Override public StageWithPort<?, ?> getParentStage() { // TODO Auto-generated method stub