Commit 8615e1f0 authored by Florian Fittkau's avatar Florian Fittkau

...

parent d0bf532e
......@@ -85,18 +85,34 @@ public class TCPConnector extends AbstractSink implements IWriter, IStringRecord
@Override
public void sendOutStringRecord(final StringRegistryRecord record) {
sendOutStringRecordOnlyIfFull(record);
while (!finishedSendingStrings) {
try {
Thread.sleep(1);
} catch (final InterruptedException e) {
}
}
if (record.getRecordSizeInBytes() > stringBuffer.remaining()) {
prioritizedSend(stringBuffer);
}
record.putIntoByteBuffer(stringBuffer, stringRegistry, this);
prioritizedSend(stringBuffer);
}
@Override
public void sendOutStringRecordOnlyIfFull(final StringRegistryRecord record) {
public void sendOutStringRecordAll(final StringRegistryRecord record) {
if (record.getRecordSizeInBytes() > stringBuffer.remaining()) {
prioritizedSend(stringBuffer);
}
record.putIntoByteBuffer(stringBuffer, stringRegistry, this);
}
@Override
public void sendOutStringRecordAllSingle(final StringRegistryRecord record) {
sendOutStringRecordAll(record);
prioritizedSend(stringBuffer);
}
@Override
public void processRecord(final IRecord record) {
if (record instanceof Trace) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment