Interface LogStorage.AppendListener
- All Known Implementing Classes:
Listener
- Enclosing interface:
- LogStorage
public static interface LogStorage.AppendListener
An append listener can be added to an append call to be notified of different events that can
occur during the append operation.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonCommit(long address) Called when the entry has been successfully committed.default voidonCommitError(long address, Throwable error) Called when an error occurs while committing an entry.default voidonWrite(long address) Called when the entry has been successfully written to the local storage.default voidonWriteError(Throwable error) Called when an error occurred while writing to the entry.
-
Method Details
-
onWrite
default void onWrite(long address) Called when the entry has been successfully written to the local storage.- Parameters:
address- the address of the written entry
-
onWriteError
Called when an error occurred while writing to the entry.- Parameters:
error- the error that occurred
-
onCommit
default void onCommit(long address) Called when the entry has been successfully committed.- Parameters:
address- the address of the committed entry
-
onCommitError
Called when an error occurs while committing an entry.- Parameters:
address- the address of the entry to be committederror- the error that occurred
-