public interface Journaled extends Checkpointed, JournalEntryIterable
JournalEntryIterable.getJournalEntryIterator()
.LOG
Modifier and Type | Method and Description |
---|---|
default void |
applyAndJournal(java.util.function.Supplier<JournalContext> context,
Journal.JournalEntry entry)
Applies and journals a journal entry.
|
boolean |
processJournalEntry(Journal.JournalEntry entry)
Attempts to apply a journal entry.
|
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.
|
getCheckpointName, restoreFromCheckpoint, writeToCheckpoint
getJournalEntryIterator
boolean processJournalEntry(Journal.JournalEntry entry)
entry
- the entry to applyvoid resetState()
default void applyAndJournal(java.util.function.Supplier<JournalContext> context, Journal.JournalEntry entry)
context
- journal contextentry
- the entry to apply and journaldefault void writeToCheckpoint(OutputStream output) throws IOException, InterruptedException
Checkpointed
InterruptedException
if they get
interrupted while running.writeToCheckpoint
in interface Checkpointed
output
- the output stream to write toIOException
InterruptedException
default void restoreFromCheckpoint(CheckpointInputStream input) throws IOException
Checkpointed
restoreFromCheckpoint
in interface Checkpointed
input
- an input stream with checkpoint dataIOException
Copyright © 2023. All Rights Reserved.