use of org.agrona.MutableDirectBuffer in project Aeron by real-logic.
the class EventLogger method log.
public void log(final EventCode code, final DirectBuffer buffer, final int offset, final int length) {
if (EventCode.isEnabled(code, ENABLED_EVENT_CODES)) {
final MutableDirectBuffer encodedBuffer = ENCODING_BUFFER.get();
final int encodedLength = EventEncoder.encode(encodedBuffer, buffer, offset, length);
ringBuffer.write(code.id(), encodedBuffer, 0, encodedLength);
}
}
Aggregations