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

compressed sizes

parent 9256ae10
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,7 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
break;
}
case BeforeOperationEventRecord.CLAZZ_ID: {
if (buffer.remaining() >= (BeforeOperationEventRecord.BYTE_LENGTH_WITH_CLAZZ_ID - 1)) {
if (buffer.remaining() >= BeforeOperationEventRecord.COMPRESSED_BYTE_LENGTH) {
readInBeforeOperationEvent(buffer);
} else {
buffer.position(buffer.position() - 1);
......@@ -100,7 +100,7 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
break;
}
case AfterFailedOperationEventRecord.CLAZZ_ID: {
if (buffer.remaining() >= (AfterFailedOperationEventRecord.BYTE_LENGTH_WITH_CLAZZ_ID - 1)) {
if (buffer.remaining() >= AfterFailedOperationEventRecord.COMPRESSED_BYTE_LENGTH) {
readInAfterFailedOperationEvent(buffer);
} else {
buffer.position(buffer.position() - 1);
......@@ -110,7 +110,7 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
break;
}
case AfterOperationEventRecord.CLAZZ_ID: {
if (buffer.remaining() >= (AfterOperationEventRecord.BYTE_LENGTH_WITH_CLAZZ_ID - 1)) {
if (buffer.remaining() >= AfterOperationEventRecord.COMPRESSED_BYTE_LENGTH) {
readInAfterOperationEvent(buffer);
} else {
buffer.position(buffer.position() - 1);
......@@ -147,7 +147,7 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
break;
}
case SystemMonitoringRecord.CLAZZ_ID: {
if (buffer.remaining() >= (SystemMonitoringRecord.BYTE_LENGTH_WITH_CLAZZ_ID - 1)) {
if (buffer.remaining() >= SystemMonitoringRecord.BYTE_LENGTH) {
readInSystemMonitoringRecord(buffer);
} else {
buffer.position(buffer.position() - 1);
......@@ -232,7 +232,8 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
putInRingBuffer(new BeforeOperationEventRecord(timestamp, traceId, orderIndex,
operation, hostApplicationMetadata, new RuntimeStatisticInformation(timestamp)));
} catch (final IdNotAvailableException e) {
putInWaitingMessages(buffer, 1 + 8 + 8 + 4 + 4);
putInWaitingMessages(buffer,
BeforeOperationEventRecord.COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID);
}
}
......@@ -251,7 +252,8 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
operation, cause, hostApplicationMetadata, new RuntimeStatisticInformation(
timestamp)));
} catch (final IdNotAvailableException e) {
putInWaitingMessages(buffer, 1 + 8 + 8 + 4 + 4 + 4);
putInWaitingMessages(buffer,
AfterFailedOperationEventRecord.COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID);
}
}
......@@ -267,7 +269,8 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
putInRingBuffer(new AfterOperationEventRecord(timestamp, traceId, orderIndex,
operation, hostApplicationMetadata, new RuntimeStatisticInformation(timestamp)));
} catch (final IdNotAvailableException e) {
putInWaitingMessages(buffer, 1 + 8 + 8 + 4 + 4);
putInWaitingMessages(buffer,
AfterOperationEventRecord.COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID);
}
}
......
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