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

...

parent d0bf532e
Branches
Tags
No related merge requests found
...@@ -85,18 +85,34 @@ public class TCPConnector extends AbstractSink implements IWriter, IStringRecord ...@@ -85,18 +85,34 @@ public class TCPConnector extends AbstractSink implements IWriter, IStringRecord
@Override @Override
public void sendOutStringRecord(final StringRegistryRecord record) { 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); prioritizedSend(stringBuffer);
} }
@Override @Override
public void sendOutStringRecordOnlyIfFull(final StringRegistryRecord record) { public void sendOutStringRecordAll(final StringRegistryRecord record) {
if (record.getRecordSizeInBytes() > stringBuffer.remaining()) { if (record.getRecordSizeInBytes() > stringBuffer.remaining()) {
prioritizedSend(stringBuffer); prioritizedSend(stringBuffer);
} }
record.putIntoByteBuffer(stringBuffer, stringRegistry, this); record.putIntoByteBuffer(stringBuffer, stringRegistry, this);
} }
@Override
public void sendOutStringRecordAllSingle(final StringRegistryRecord record) {
sendOutStringRecordAll(record);
prioritizedSend(stringBuffer);
}
@Override @Override
public void processRecord(final IRecord record) { public void processRecord(final IRecord record) {
if (record instanceof Trace) { if (record instanceof Trace) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment