Package io.atomix.raft.zeebe
Interface ZeebeLogAppender.AppendListener
- Enclosing interface:
ZeebeLogAppender
public static interface ZeebeLogAppender.AppendListener
An append listener can observe and be notified of different events related to the append
operation.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonCommit(long index, long highestPosition) Called when the entry has been committed.default voidonCommitError(long index, Throwable error) Called when an error occurred while replicating or committing an entry, typically when if an append operation was pending when shutting down the server or stepping down as leader.default voidonWrite(IndexedRaftLogEntry indexed) Called when the entry has been written to the log.default voidonWriteError(Throwable error) Called when an error occurred while writing the entry to the log.
-
Method Details
-
onWrite
Called when the entry has been written to the log.- Parameters:
indexed- the entry that was written to the log
-
onWriteError
Called when an error occurred while writing the entry to the log.- Parameters:
error- the error that occurred
-
onCommit
default void onCommit(long index, long highestPosition) Called when the entry has been committed.- Parameters:
index- the index of the entry that was committed
-
onCommitError
Called when an error occurred while replicating or committing an entry, typically when if an append operation was pending when shutting down the server or stepping down as leader.- Parameters:
index- the index of the entry that should have been committederror- the error that occurred
-