diff --git a/src/main/java/teetime/framework/Analysis.java b/src/main/java/teetime/framework/Analysis.java index 873e2fc10dacde581866a0674d32a9a85c9f6619..450c8f757a657b54db94a6167dbf177b24bc701d 100644 --- a/src/main/java/teetime/framework/Analysis.java +++ b/src/main/java/teetime/framework/Analysis.java @@ -9,7 +9,7 @@ import java.util.concurrent.ConcurrentLinkedQueue; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import teetime.framework.exceptionHandling.DefaultListener; +import teetime.framework.exceptionHandling.IgnoringStageListener; import teetime.framework.exceptionHandling.StageExceptionListener; import teetime.framework.signal.ValidatingSignal; import teetime.framework.validation.AnalysisNotValidException; @@ -43,11 +43,11 @@ public class Analysis implements UncaughtExceptionHandler { * to be used for the analysis */ public Analysis(final AnalysisConfiguration configuration) { - this(configuration, false, new DefaultListener()); + this(configuration, false, new IgnoringStageListener()); } public Analysis(final AnalysisConfiguration configuration, final boolean validationEnabled) { - this(configuration, validationEnabled, new DefaultListener()); + this(configuration, validationEnabled, new IgnoringStageListener()); } public Analysis(final AnalysisConfiguration configuration, final StageExceptionListener listener) { diff --git a/src/main/java/teetime/framework/exceptionHandling/DefaultListener.java b/src/main/java/teetime/framework/exceptionHandling/IgnoringStageListener.java similarity index 70% rename from src/main/java/teetime/framework/exceptionHandling/DefaultListener.java rename to src/main/java/teetime/framework/exceptionHandling/IgnoringStageListener.java index 1db8e36c65c6abfc5f9da5d4e6a77480a46e91dc..c8541006c1951e9b066e3ecf3083e203ada6363d 100644 --- a/src/main/java/teetime/framework/exceptionHandling/DefaultListener.java +++ b/src/main/java/teetime/framework/exceptionHandling/IgnoringStageListener.java @@ -2,9 +2,9 @@ package teetime.framework.exceptionHandling; import teetime.framework.Stage; -public class DefaultListener extends StageExceptionListener { +public class IgnoringStageListener extends StageExceptionListener { - public DefaultListener() { + public IgnoringStageListener() { super(); // TODO Auto-generated constructor stub } diff --git a/src/main/java/teetime/framework/exceptionHandling/StageExceptionListener.java b/src/main/java/teetime/framework/exceptionHandling/StageExceptionListener.java index 1ebe184b4464369dcec7008587f89af85bce1eff..81e0fd78ec122eac3384c4cf2cb5f002a6aed627 100644 --- a/src/main/java/teetime/framework/exceptionHandling/StageExceptionListener.java +++ b/src/main/java/teetime/framework/exceptionHandling/StageExceptionListener.java @@ -27,6 +27,8 @@ public abstract class StageExceptionListener { * thrown exception * @param throwingStage * the stage, which has thrown the exception. + * @return + * true, if the thread can continue with execution or false, if thread should be terminated */ public abstract boolean onStageException(Exception e, Stage throwingStage); diff --git a/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThroughputAnalysis9.java b/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThroughputAnalysis9.java index dd3388babe592f333fa65c006d53d0dd8673ec73..de61a8adbecfdd237885d4bf02cebfc41e1d1182 100644 --- a/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThroughputAnalysis9.java +++ b/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThroughputAnalysis9.java @@ -20,7 +20,7 @@ import java.util.List; import teetime.framework.OldHeadPipeline; import teetime.framework.RunnableProducerStage; import teetime.framework.Stage; -import teetime.framework.exceptionHandling.DefaultListener; +import teetime.framework.exceptionHandling.IgnoringStageListener; import teetime.framework.pipe.IPipeFactory; import teetime.stage.CollectorSink; import teetime.stage.NoopFilter; @@ -45,7 +45,7 @@ public class MethodCallThroughputAnalysis9 { public void init(final IPipeFactory pipeFactory) { Stage pipeline = this.buildPipeline(pipeFactory); - this.runnable = new RunnableProducerStage(pipeline, new DefaultListener()); + this.runnable = new RunnableProducerStage(pipeline, new IgnoringStageListener()); } /** diff --git a/src/performancetest/java/teetime/examples/experiment11/MethodCallThroughputAnalysis11.java b/src/performancetest/java/teetime/examples/experiment11/MethodCallThroughputAnalysis11.java index 80b9e282794d796653b49a8d5e75c28c8a823053..690d2a3e74f0433599fec4d5a54bf94019105c41 100644 --- a/src/performancetest/java/teetime/examples/experiment11/MethodCallThroughputAnalysis11.java +++ b/src/performancetest/java/teetime/examples/experiment11/MethodCallThroughputAnalysis11.java @@ -20,7 +20,7 @@ import java.util.List; import teetime.framework.OldHeadPipeline; import teetime.framework.RunnableProducerStage; import teetime.framework.Stage; -import teetime.framework.exceptionHandling.DefaultListener; +import teetime.framework.exceptionHandling.IgnoringStageListener; import teetime.framework.pipe.UnorderedGrowablePipe; import teetime.stage.CollectorSink; import teetime.stage.NoopFilter; @@ -45,7 +45,7 @@ public class MethodCallThroughputAnalysis11 { public void init() { Stage pipeline = this.buildPipeline(this.numInputObjects, this.inputObjectCreator); - this.runnable = new RunnableProducerStage(pipeline, new DefaultListener()); + this.runnable = new RunnableProducerStage(pipeline, new IgnoringStageListener()); } private OldHeadPipeline<ObjectProducer<TimestampObject>, CollectorSink<TimestampObject>> buildPipeline(final long numInputObjects, diff --git a/src/performancetest/java/teetime/examples/experiment15/MethodCallThroughputAnalysis15.java b/src/performancetest/java/teetime/examples/experiment15/MethodCallThroughputAnalysis15.java index 71033ec2c5e51e5ecfa53ff97adcfc8b3237ccf9..d2db72f00487031492201ff7d66f397976c79fc3 100644 --- a/src/performancetest/java/teetime/examples/experiment15/MethodCallThroughputAnalysis15.java +++ b/src/performancetest/java/teetime/examples/experiment15/MethodCallThroughputAnalysis15.java @@ -21,7 +21,7 @@ import teetime.framework.AnalysisConfiguration; import teetime.framework.OldHeadPipeline; import teetime.framework.RunnableProducerStage; import teetime.framework.Stage; -import teetime.framework.exceptionHandling.DefaultListener; +import teetime.framework.exceptionHandling.IgnoringStageListener; import teetime.framework.pipe.IPipeFactory; import teetime.framework.pipe.OrderedGrowableArrayPipe; import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering; @@ -65,10 +65,10 @@ public class MethodCallThroughputAnalysis15 extends AnalysisConfiguration { public void init() { OldHeadPipeline<Clock, Sink<Long>> clockPipeline = this.buildClockPipeline(); - this.clockRunnable = new RunnableProducerStage(clockPipeline, new DefaultListener()); + this.clockRunnable = new RunnableProducerStage(clockPipeline, new IgnoringStageListener()); Stage pipeline = this.buildPipeline(this.clock); - this.runnable = new RunnableProducerStage(pipeline, new DefaultListener()); + this.runnable = new RunnableProducerStage(pipeline, new IgnoringStageListener()); } private OldHeadPipeline<Clock, Sink<Long>> buildClockPipeline() {