Class Listener
java.lang.Object
io.camunda.zeebe.logstreams.impl.log.Listener
- All Implemented Interfaces:
LogStorage.AppendListener
-
Constructor Summary
ConstructorsConstructorDescriptionListener(LogStorageAppender appender, long highestPosition, io.prometheus.client.Histogram.Timer startAppendLatencyTimer, io.prometheus.client.Histogram.Timer startCommitLatencyTimer) -
Method Summary
Modifier and TypeMethodDescriptionvoidonCommit(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.
-
Constructor Details
-
Listener
public Listener(LogStorageAppender appender, long highestPosition, io.prometheus.client.Histogram.Timer startAppendLatencyTimer, io.prometheus.client.Histogram.Timer startCommitLatencyTimer)
-
-
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
-