Skip to content
Snippets Groups Projects
Commit d05ebcdf authored by Florian Fittkau's avatar Florian Fittkau
Browse files

read in remote bridge record

parent c73b54db
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@ import explorviz.live_trace_processing.record.event.constructor.BeforeConstructo
import explorviz.live_trace_processing.record.event.normal.AfterFailedOperationEventRecord;
import explorviz.live_trace_processing.record.event.normal.AfterOperationEventRecord;
import explorviz.live_trace_processing.record.event.normal.BeforeOperationEventRecord;
import explorviz.live_trace_processing.record.event.remote.RemoteCallBridgeRecord;
import explorviz.live_trace_processing.record.event.statics.AfterFailedStaticOperationEventRecord;
import explorviz.live_trace_processing.record.event.statics.AfterStaticOperationEventRecord;
import explorviz.live_trace_processing.record.event.statics.BeforeStaticOperationEventRecord;
......@@ -219,6 +220,15 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
buffer.compact();
return;
}
case RemoteCallBridgeRecord.CLAZZ_ID: {
if (buffer.remaining() >= RemoteCallBridgeRecord.COMPRESSED_BYTE_LENGTH) {
readInRemoteCallBridgeEvent(buffer);
break;
}
buffer.position(buffer.position() - 1);
buffer.compact();
return;
}
case BeforeStaticOperationEventRecord.CLAZZ_ID: {
if (buffer.remaining() >= BeforeStaticOperationEventRecord.COMPRESSED_BYTE_LENGTH) {
readInBeforeStaticOperationEvent(buffer);
......@@ -348,10 +358,8 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
final int causeId = buffer.getInt();
try {
final String cause = stringRegistry.getStringFromId(causeId);
putInRingBuffer(new AfterFailedConstructorEventRecord(timestamp, traceId, orderIndex,
cause, hostApplicationMetadata));
stringRegistry.getStringFromId(causeId), hostApplicationMetadata));
} catch (final IdNotAvailableException e) {
putInWaitingMessages(buffer,
AfterFailedConstructorEventRecord.COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID);
......@@ -367,6 +375,27 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
hostApplicationMetadata));
}
private final void readInRemoteCallBridgeEvent(final ByteBuffer buffer) {
final int callerHost = buffer.getInt();
final int callerApplication = buffer.getInt();
final long callerTraceId = buffer.getLong();
final int callerOrderIndex = buffer.getInt();
final long timestamp = buffer.getLong();
final long traceId = buffer.getLong();
final int orderIndex = buffer.getInt();
try {
putInRingBuffer(new RemoteCallBridgeRecord(timestamp,
stringRegistry.getStringFromId(callerHost),
stringRegistry.getStringFromId(callerApplication), callerTraceId,
callerOrderIndex, traceId, orderIndex, hostApplicationMetadata));
} catch (final IdNotAvailableException e) {
putInWaitingMessages(buffer,
RemoteCallBridgeRecord.COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID);
}
}
private final void readInBeforeStaticOperationEvent(final ByteBuffer buffer) {
final long timestamp = buffer.getLong();
final long traceId = buffer.getLong();
......@@ -449,6 +478,9 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
case AfterConstructorEventRecord.CLAZZ_ID:
readInAfterConstructorEvent(buffer);
break;
case RemoteCallBridgeRecord.CLAZZ_ID:
readInRemoteCallBridgeEvent(buffer);
break;
case BeforeStaticOperationEventRecord.CLAZZ_ID:
readInBeforeStaticOperationEvent(buffer);
break;
......
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