@ThreadSafe public class FileSystemMergeJournalContext extends Object implements JournalContext
Modifier and Type | Field and Description |
---|---|
protected JournalEntryMerger |
mJournalEntryMerger |
Constructor and Description |
---|
FileSystemMergeJournalContext(JournalContext journalContext,
JournalEntryMerger journalEntryMerger)
Constructs a
FileSystemMergeJournalContext . |
Modifier and Type | Method and Description |
---|---|
void |
append(Journal.JournalEntry entry)
Adds the new journal entry into the journal entry merger.
|
protected boolean |
appendMergedJournals() |
void |
close() |
void |
flush()
Merges all journals and then flushes them.
|
JournalContext |
getUnderlyingJournalContext() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
protected final JournalEntryMerger mJournalEntryMerger
public FileSystemMergeJournalContext(JournalContext journalContext, JournalEntryMerger journalEntryMerger)
FileSystemMergeJournalContext
.journalContext
- the journal context to wrapjournalEntryMerger
- the merger which merges multiple journal entries into onepublic void append(Journal.JournalEntry entry)
append
in interface JournalContext
entry
- the Journal.JournalEntry
to append to the journalpublic void close() throws UnavailableException
close
in interface JournalContext
close
in interface Closeable
close
in interface AutoCloseable
UnavailableException
public void flush() throws UnavailableException
flush
in interface JournalContext
UnavailableException
protected boolean appendMergedJournals()
public JournalContext getUnderlyingJournalContext()
Copyright © 2023. All Rights Reserved.