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

    Modifier and Type
    Method
    Description
    int
     
    void
    write(org.agrona.MutableDirectBuffer buffer, int offset)
    Writes to a buffer.
  • 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 to
      offset - the offset in the buffer that the writer begins writing at