Package io.camunda.zeebe.util.buffer
Interface BufferWriter
- All Known Implementing Classes:
DirectBufferWriter
public interface BufferWriter
Implementations may add custom setters to specify values that should be written. Values are
written/copied when the
write(MutableDirectBuffer, int) method is called. Calling a
call-by-reference setter method (e.g. an Object setter) tells the writer which object to
write but not what value. The value is only determined at the time of writing, so that
value changes happening between setter and #write invocations affect the writer.-
Method Summary
-
Method Details
-
getLength
int getLength()- Returns:
- the number of bytes that this writer is going to write
-
write
void write(org.agrona.MutableDirectBuffer buffer, int offset) Writes to a buffer.- Parameters:
buffer- the buffer that this writer writes tooffset- the offset in the buffer that the writer begins writing at
-