Skip to content
Snippets Groups Projects
Commit 05e15f26 authored by Christian Wulf's avatar Christian Wulf
Browse files

added catch in RunnableStage;

reverted Recordfactory in TCPReader
parent 877e3e67
No related branches found
No related tags found
No related merge requests found
package teetime.variant.methodcallWithPorts.framework.core;
import kieker.common.logging.Log;
import kieker.common.logging.LogFactory;
public class RunnableStage implements Runnable {
private final StageWithPort<?, ?> stage;
private final Log logger;
public RunnableStage(final StageWithPort<?, ?> stage) {
this.stage = stage;
this.logger = LogFactory.getLog(stage.getClass());
}
@Override
public void run() {
this.stage.onStart();
try {
this.stage.onStart();
do {
this.stage.executeWithPorts();
} while (this.stage.isReschedulable());
do {
this.stage.executeWithPorts();
} while (this.stage.isReschedulable());
} catch (RuntimeException e) {
this.logger.error("Terminating thread due to the following exception: ", e);
throw e;
}
}
}
......@@ -58,7 +58,7 @@ public class EndStage<T> implements StageWithPort<T, T> {
@Override
public void executeWithPorts() {
// this.getInputPort().receive(); // just consume
this.getInputPort().receive(); // just consume
// do nothing
// this.count++;
// Object r = this.closure.execute(null);
......
......@@ -28,6 +28,7 @@ import teetime.variant.methodcallWithPorts.framework.core.ProducerStage;
import kieker.common.exception.MonitoringRecordException;
import kieker.common.logging.Log;
import kieker.common.logging.LogFactory;
import kieker.common.record.AbstractMonitoringRecord;
import kieker.common.record.IMonitoringRecord;
import kieker.common.record.flow.trace.TraceMetadata;
import kieker.common.record.flow.trace.operation.AfterOperationEvent;
......@@ -150,8 +151,8 @@ public class TCPReader extends ProducerStage<Void, IMonitoringRecord> {
final long loggingTimestamp = buffer.getLong();
final IMonitoringRecord record;
try { // NOCS (Nested try-catch)
record = this.recordFactory.create(clazzid, buffer, this.stringRegistry);
// record = AbstractMonitoringRecord.createFromByteBuffer(clazzid, buffer, this.stringRegistry);
// record = this.recordFactory.create(clazzid, buffer, this.stringRegistry);
record = AbstractMonitoringRecord.createFromByteBuffer(clazzid, buffer, this.stringRegistry);
record.setLoggingTimestamp(loggingTimestamp);
this.send(record);
} catch (final MonitoringRecordException ex) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment