Class BlockPeek

java.lang.Object
io.camunda.zeebe.dispatcher.BlockPeek
All Implemented Interfaces:
Iterable<org.agrona.DirectBuffer>

public class BlockPeek extends Object implements Iterable<org.agrona.DirectBuffer>
Represents a block of fragments to read from.
  • Field Details

    • streamId

      protected int streamId
    • blockLength

      protected int blockLength
    • iterator

      protected final BlockPeek.DataFrameIterator iterator
  • Constructor Details

    • BlockPeek

      public BlockPeek()
  • Method Details

    • setBlock

      public void setBlock(ByteBuffer byteBuffer, AtomicPosition position, ActorCondition dataConsumed, int streamId, int bufferOffset, int blockLength, int newPartitionId, int newPartitionOffset)
    • getRawBuffer

      public ByteBuffer getRawBuffer()
    • getBuffer

      public org.agrona.MutableDirectBuffer getBuffer()
      Returns the buffer to read from.
    • markFailed

      public void markFailed()
      Finish reading and consume the fragments (i.e. update the subscription position). Mark all fragments as failed.
    • markCompleted

      public void markCompleted()
      Finish reading and consume the fragments (i.e. update the subscription position).
    • getStreamId

      public int getStreamId()
    • getBufferOffset

      public int getBufferOffset()
    • getBlockLength

      public int getBlockLength()
    • iterator

      public Iterator<org.agrona.DirectBuffer> iterator()
      Specified by:
      iterator in interface Iterable<org.agrona.DirectBuffer>