Class InFlightAppend
java.lang.Object
io.camunda.zeebe.logstreams.impl.flowcontrol.InFlightAppend
- All Implemented Interfaces:
LogStorage.AppendListener
Represents an in-flight append. Updates metrics and backpressure limits after being
started and handles callbacks from the log storage. Commit and write
errors are propagated to an AppendErrorHandler.-
Constructor Summary
ConstructorsConstructorDescriptionInFlightAppend(AppendErrorHandler errorHandler, com.netflix.concurrency.limits.Limiter.Listener limiter, io.camunda.zeebe.logstreams.impl.flowcontrol.AppenderMetrics metrics) -
Method Summary
Modifier and TypeMethodDescriptionvoiddiscard()voidonCommit(long address) Called when the entry has been successfully committed.voidonCommitError(long address, Throwable error) Called when an error occurs while committing an entry.voidonWrite(long address) Called when the entry has been successfully written to the local storage.voidonWriteError(Throwable error) Called when an error occurred while writing to the entry.start(long position)
-
Constructor Details
-
InFlightAppend
public InFlightAppend(AppendErrorHandler errorHandler, com.netflix.concurrency.limits.Limiter.Listener limiter, io.camunda.zeebe.logstreams.impl.flowcontrol.AppenderMetrics metrics)
-
-
Method Details
-
onWrite
public void onWrite(long address) Description copied from interface:LogStorage.AppendListenerCalled when the entry has been successfully written to the local storage.- Specified by:
onWritein interfaceLogStorage.AppendListener- Parameters:
address- the address of the written entry
-
onWriteError
Description copied from interface:LogStorage.AppendListenerCalled when an error occurred while writing to the entry.- Specified by:
onWriteErrorin interfaceLogStorage.AppendListener- Parameters:
error- the error that occurred
-
onCommit
public void onCommit(long address) Description copied from interface:LogStorage.AppendListenerCalled when the entry has been successfully committed.- Specified by:
onCommitin interfaceLogStorage.AppendListener- Parameters:
address- the address of the committed entry
-
onCommitError
Description copied from interface:LogStorage.AppendListenerCalled when an error occurs while committing an entry.- Specified by:
onCommitErrorin interfaceLogStorage.AppendListener- Parameters:
address- the address of the entry to be committederror- the error that occurred
-
start
-
discard
public void discard()
-