public interface NoopJournaled extends Journaled
Modifier and Type | Method and Description |
---|---|
default CheckpointName |
getCheckpointName() |
default CloseableIterator<Journal.JournalEntry> |
getJournalEntryIterator() |
default boolean |
processJournalEntry(Journal.JournalEntry entry)
Attempts to apply a journal entry.
|
default void |
resetState()
Resets the object's journaled state.
|
default void |
restoreFromCheckpoint(CheckpointInputStream input)
Restores state from a checkpoint.
|
default void |
writeToCheckpoint(OutputStream output)
Writes a checkpoint of all state to the given output stream.
|
applyAndJournal
default boolean processJournalEntry(Journal.JournalEntry entry)
Journaled
processJournalEntry
in interface Journaled
entry
- the entry to applydefault void resetState()
Journaled
resetState
in interface Journaled
default CheckpointName getCheckpointName()
getCheckpointName
in interface Checkpointed
default void writeToCheckpoint(OutputStream output) throws IOException
Checkpointed
InterruptedException
if they get
interrupted while running.writeToCheckpoint
in interface Checkpointed
writeToCheckpoint
in interface Journaled
output
- the output stream to write toIOException
default void restoreFromCheckpoint(CheckpointInputStream input)
Checkpointed
restoreFromCheckpoint
in interface Checkpointed
restoreFromCheckpoint
in interface Journaled
input
- an input stream with checkpoint datadefault CloseableIterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator
in interface JournalEntryIterable
CloseableIterator
that iterates all the journal entriesCopyright © 2023. All Rights Reserved.