@NotThreadSafe public final class RaftJournalContext extends Object implements JournalContext
MasterJournalContext
for holding the raft journal lock over the
lifetime of the journal context.Constructor and Description |
---|
RaftJournalContext(AsyncJournalWriter asyncJournalWriter,
Lock lock)
Constructs a
MasterJournalContext . |
Modifier and Type | Method and Description |
---|---|
void |
append(Journal.JournalEntry entry) |
void |
close() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
public RaftJournalContext(AsyncJournalWriter asyncJournalWriter, Lock lock)
MasterJournalContext
.asyncJournalWriter
- a AsyncJournalWriter
lock
- a lock to hold until the context is closedpublic 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
Copyright © 2023. All Rights Reserved.