@ThreadSafe public abstract class AbstractJournalSystem extends Object implements JournalSystem
JournalSystem.Builder, JournalSystem.Mode
Constructor and Description |
---|
AbstractJournalSystem() |
Modifier and Type | Method and Description |
---|---|
void |
addJournalSink(Master master,
JournalSink journalSink) |
Set<JournalSink> |
getJournalSinks(Master master) |
void |
removeJournalSink(Master master,
JournalSink journalSink) |
void |
start()
Starts the journal system.
|
protected abstract void |
startInternal()
Starts the journal system.
|
void |
stop()
Stops the journal system.
|
protected abstract void |
stopInternal()
Stops the journal system.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
catchup, checkpoint, createJournal, format, gainPrimacy, getCurrentSequenceNumbers, getJournalServices, isEmpty, isFormatted, losePrimacy, resume, suspend
public void start() throws InterruptedException, IOException
JournalSystem
start
in interface JournalSystem
InterruptedException
IOException
public void stop() throws InterruptedException, IOException
JournalSystem
stop
in interface JournalSystem
InterruptedException
IOException
public void addJournalSink(Master master, JournalSink journalSink)
addJournalSink
in interface JournalSystem
master
- the master for which to add the journal sinkjournalSink
- the journal sink to addpublic void removeJournalSink(Master master, JournalSink journalSink)
removeJournalSink
in interface JournalSystem
master
- the master from which to remove the journal sinkjournalSink
- the journal sink to removepublic Set<JournalSink> getJournalSinks(@Nullable Master master)
getJournalSinks
in interface JournalSystem
master
- the master to get the journal sinks for, or null to get all sinksJournalSink
for the given master, or all sinks if master is nullprotected abstract void startInternal() throws InterruptedException, IOException
InterruptedException
IOException
protected abstract void stopInternal() throws InterruptedException, IOException
InterruptedException
IOException
Copyright © 2023. All Rights Reserved.