Skip to content
Snippets Groups Projects
Commit ca0b2e97 authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

renamed the default listener

parent 72f3b77d
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ import java.util.concurrent.ConcurrentLinkedQueue; ...@@ -9,7 +9,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import teetime.framework.exceptionHandling.DefaultListener; import teetime.framework.exceptionHandling.IgnoringStageListener;
import teetime.framework.exceptionHandling.StageExceptionListener; import teetime.framework.exceptionHandling.StageExceptionListener;
import teetime.framework.signal.ValidatingSignal; import teetime.framework.signal.ValidatingSignal;
import teetime.framework.validation.AnalysisNotValidException; import teetime.framework.validation.AnalysisNotValidException;
...@@ -43,11 +43,11 @@ public class Analysis implements UncaughtExceptionHandler { ...@@ -43,11 +43,11 @@ public class Analysis implements UncaughtExceptionHandler {
* to be used for the analysis * to be used for the analysis
*/ */
public Analysis(final AnalysisConfiguration configuration) { public Analysis(final AnalysisConfiguration configuration) {
this(configuration, false, new DefaultListener()); this(configuration, false, new IgnoringStageListener());
} }
public Analysis(final AnalysisConfiguration configuration, final boolean validationEnabled) { 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) { public Analysis(final AnalysisConfiguration configuration, final StageExceptionListener listener) {
......
...@@ -2,9 +2,9 @@ package teetime.framework.exceptionHandling; ...@@ -2,9 +2,9 @@ package teetime.framework.exceptionHandling;
import teetime.framework.Stage; import teetime.framework.Stage;
public class DefaultListener extends StageExceptionListener { public class IgnoringStageListener extends StageExceptionListener {
public DefaultListener() { public IgnoringStageListener() {
super(); super();
// TODO Auto-generated constructor stub // TODO Auto-generated constructor stub
} }
......
...@@ -27,6 +27,8 @@ public abstract class StageExceptionListener { ...@@ -27,6 +27,8 @@ public abstract class StageExceptionListener {
* thrown exception * thrown exception
* @param throwingStage * @param throwingStage
* the stage, which has thrown the exception. * 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); public abstract boolean onStageException(Exception e, Stage throwingStage);
......
...@@ -20,7 +20,7 @@ import java.util.List; ...@@ -20,7 +20,7 @@ import java.util.List;
import teetime.framework.OldHeadPipeline; import teetime.framework.OldHeadPipeline;
import teetime.framework.RunnableProducerStage; import teetime.framework.RunnableProducerStage;
import teetime.framework.Stage; import teetime.framework.Stage;
import teetime.framework.exceptionHandling.DefaultListener; import teetime.framework.exceptionHandling.IgnoringStageListener;
import teetime.framework.pipe.IPipeFactory; import teetime.framework.pipe.IPipeFactory;
import teetime.stage.CollectorSink; import teetime.stage.CollectorSink;
import teetime.stage.NoopFilter; import teetime.stage.NoopFilter;
...@@ -45,7 +45,7 @@ public class MethodCallThroughputAnalysis9 { ...@@ -45,7 +45,7 @@ public class MethodCallThroughputAnalysis9 {
public void init(final IPipeFactory pipeFactory) { public void init(final IPipeFactory pipeFactory) {
Stage pipeline = this.buildPipeline(pipeFactory); Stage pipeline = this.buildPipeline(pipeFactory);
this.runnable = new RunnableProducerStage(pipeline, new DefaultListener()); this.runnable = new RunnableProducerStage(pipeline, new IgnoringStageListener());
} }
/** /**
......
...@@ -20,7 +20,7 @@ import java.util.List; ...@@ -20,7 +20,7 @@ import java.util.List;
import teetime.framework.OldHeadPipeline; import teetime.framework.OldHeadPipeline;
import teetime.framework.RunnableProducerStage; import teetime.framework.RunnableProducerStage;
import teetime.framework.Stage; import teetime.framework.Stage;
import teetime.framework.exceptionHandling.DefaultListener; import teetime.framework.exceptionHandling.IgnoringStageListener;
import teetime.framework.pipe.UnorderedGrowablePipe; import teetime.framework.pipe.UnorderedGrowablePipe;
import teetime.stage.CollectorSink; import teetime.stage.CollectorSink;
import teetime.stage.NoopFilter; import teetime.stage.NoopFilter;
...@@ -45,7 +45,7 @@ public class MethodCallThroughputAnalysis11 { ...@@ -45,7 +45,7 @@ public class MethodCallThroughputAnalysis11 {
public void init() { public void init() {
Stage pipeline = this.buildPipeline(this.numInputObjects, this.inputObjectCreator); 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, private OldHeadPipeline<ObjectProducer<TimestampObject>, CollectorSink<TimestampObject>> buildPipeline(final long numInputObjects,
......
...@@ -21,7 +21,7 @@ import teetime.framework.AnalysisConfiguration; ...@@ -21,7 +21,7 @@ import teetime.framework.AnalysisConfiguration;
import teetime.framework.OldHeadPipeline; import teetime.framework.OldHeadPipeline;
import teetime.framework.RunnableProducerStage; import teetime.framework.RunnableProducerStage;
import teetime.framework.Stage; import teetime.framework.Stage;
import teetime.framework.exceptionHandling.DefaultListener; import teetime.framework.exceptionHandling.IgnoringStageListener;
import teetime.framework.pipe.IPipeFactory; import teetime.framework.pipe.IPipeFactory;
import teetime.framework.pipe.OrderedGrowableArrayPipe; import teetime.framework.pipe.OrderedGrowableArrayPipe;
import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering; import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering;
...@@ -65,10 +65,10 @@ public class MethodCallThroughputAnalysis15 extends AnalysisConfiguration { ...@@ -65,10 +65,10 @@ public class MethodCallThroughputAnalysis15 extends AnalysisConfiguration {
public void init() { public void init() {
OldHeadPipeline<Clock, Sink<Long>> clockPipeline = this.buildClockPipeline(); 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); 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() { private OldHeadPipeline<Clock, Sink<Long>> buildClockPipeline() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment