Package io.camunda.zeebe.dispatcher
Class ClaimedFragment
java.lang.Object
io.camunda.zeebe.dispatcher.ClaimedFragment
Represents a claimed fragment in the buffer.
Reusable but not threadsafe.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Commit the fragment and mark it as failed.voidcommit()Commit the fragment so that it can be read by subscriptions.org.agrona.MutableDirectBufferReturns the claimed fragment to write in.intintintbooleanisOpen()voidwrap(org.agrona.concurrent.UnsafeBuffer underlyingbuffer, int fragmentOffset, int fragmentLength, Runnable onCompleteHandler)
-
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()
-