@NotThreadSafe public class RaftJournal extends Object implements Journal
Constructor and Description |
---|
RaftJournal(Journaled stateMachine,
URI location,
AtomicReference<AsyncJournalWriter> journalWriter) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
JournalContext |
createJournalContext() |
URI |
getLocation() |
Journaled |
getStateMachine() |
public RaftJournal(Journaled stateMachine, URI location, AtomicReference<AsyncJournalWriter> journalWriter)
stateMachine
- the state machine for this journallocation
- the location of the raft journaljournalWriter
- reference to the journal writer to use for writing to the journalpublic Journaled getStateMachine()
public URI getLocation()
getLocation
in interface Journal
public JournalContext createJournalContext() throws UnavailableException
createJournalContext
in interface Journal
UnavailableException
- if a context cannot be created because the journal has been
closed.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2023. All Rights Reserved.