Class FileDataBufferStore.StoredBufferMessage

java.lang.Object
com.illumon.iris.db.v2.locations.FileDataBufferStore.StoredBufferMessage
All Implemented Interfaces:
Message
Enclosing class:
FileDataBufferStore

public static final class FileDataBufferStore.StoredBufferMessage extends Object implements Message

Message implementation to wrap a stored buffer and associated boundaries.

We fix the view's limit at construction time in order to ensure that we can return a constant length that accurately reflects the remaining bytes in a view.

  • Method Details

    • getLength

      public final int getLength()
    • getBuffer

      public final ByteBuffer getBuffer()
      Description copied from interface: Message
      Return the buffer for this message.
      Specified by:
      getBuffer in interface Message
    • getView

      public final ByteBuffer getView()
      Description copied from interface: Message
      Acquire a view into the contents of this message. The caller must invoke dropView() when it no longer needs to access the resulting view buffer.
      Specified by:
      getView in interface Message
      Returns:
      A read-only view of the ByteBuffer backing this message.
    • dropView

      public final void dropView(ByteBuffer view)
      Description copied from interface: Message
      Release resources associated with a single view. Must be invoked once for each invocation of getView().
      Specified by:
      dropView in interface Message
    • finished

      public final void finished()
      Description copied from interface: Message
      Release resources associated with message creation. Must be invoked by the message creator after all invocations of getView().
      Specified by:
      finished in interface Message