Class ClaimedFragment

java.lang.Object
io.camunda.zeebe.dispatcher.ClaimedFragment

public class ClaimedFragment extends Object
Represents a claimed fragment in the buffer.

Reusable but not threadsafe.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.agrona.concurrent.UnsafeBuffer
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Commit the fragment and mark it as failed.
    void
    Commit the fragment so that it can be read by subscriptions.
    org.agrona.MutableDirectBuffer
    Returns the claimed fragment to write in.
    int
     
    int
     
    int
     
    boolean
     
    void
    wrap(org.agrona.concurrent.UnsafeBuffer underlyingbuffer, int fragmentOffset, int fragmentLength, Runnable onCompleteHandler)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • buffer

      protected final org.agrona.concurrent.UnsafeBuffer buffer
  • Constructor Details

    • ClaimedFragment

      public ClaimedFragment()
  • Method Details

    • wrap

      public void wrap(org.agrona.concurrent.UnsafeBuffer underlyingbuffer, int fragmentOffset, int fragmentLength, Runnable onCompleteHandler)
    • getOffset

      public int getOffset()
    • getLength

      public int getLength()
    • getFragmentLength

      public int getFragmentLength()
    • getBuffer

      public org.agrona.MutableDirectBuffer getBuffer()
      Returns the claimed fragment to write in.
    • commit

      public void commit()
      Commit the fragment so that it can be read by subscriptions.
    • abort

      public void abort()
      Commit the fragment and mark it as failed. It will be ignored by subscriptions.
    • isOpen

      public boolean isOpen()