@NotThreadSafe public final class MergeJournalContext extends Object implements JournalContext
Modifier and Type | Field and Description |
---|---|
static int |
MAX_ENTRIES |
Constructor and Description |
---|
MergeJournalContext(JournalContext journalContext,
AlluxioURI uri,
java.util.function.UnaryOperator<List<Journal.JournalEntry>> merger)
Constructs a
MergeJournalContext . |
Modifier and Type | Method and Description |
---|---|
void |
append(Journal.JournalEntry entry) |
void |
close() |
void |
flush()
Flushes all the entries appended by the journal context so far.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
public static final int MAX_ENTRIES
public MergeJournalContext(JournalContext journalContext, AlluxioURI uri, java.util.function.UnaryOperator<List<Journal.JournalEntry>> merger)
MergeJournalContext
.journalContext
- the journal context to wrapuri
- Alluxio URI that needs mergingmerger
- merging function which will merge multiple journal entries into onepublic void append(Journal.JournalEntry entry)
append
in interface JournalContext
entry
- the Journal.JournalEntry
to append to the journalpublic void flush() throws UnavailableException
JournalContext
MasterJournalContext
,
or only added into the async journal writer (example MetadataSyncMergeJournalContext
,
based on different implementations.flush
in interface JournalContext
UnavailableException
public void close() throws UnavailableException
close
in interface JournalContext
close
in interface Closeable
close
in interface AutoCloseable
UnavailableException
Copyright © 2023. All Rights Reserved.