@ThreadSafe public class BufferedJournalApplier extends Object
Constructor and Description |
---|
BufferedJournalApplier(Map<String,RaftJournal> journals,
java.util.function.Supplier<Set<JournalSink>> journalSinks)
Creates a buffered applier over given journals.
|
Modifier and Type | Method and Description |
---|---|
CatchupFuture |
catchup(long sequence)
Initiates catching up of the applier to a target sequence.
|
void |
close()
Resets the suspend applier.
|
boolean |
isSuspended() |
void |
processJournalEntry(Journal.JournalEntry journalEntry)
Processes given journal entry for applying.
|
void |
resume()
Resumes the applier.
|
void |
suspend()
Suspend the applier.
|
public BufferedJournalApplier(Map<String,RaftJournal> journals, java.util.function.Supplier<Set<JournalSink>> journalSinks)
journals
- journalsjournalSinks
- journal sinkspublic void processJournalEntry(Journal.JournalEntry journalEntry)
journalEntry
- the journal entrypublic boolean isSuspended()
true
if this applier was suspendedpublic void suspend() throws IOException
resume()
or
catchup(long)
is called.IOException
public void resume() throws IOException
IOException
public CatchupFuture catchup(long sequence)
sequence
- target sequencepublic void close()
Copyright © 2023. All Rights Reserved.