@NotThreadSafe public final class UfsJournalCheckpointThread extends AutopsyThread
Modifier and Type | Class and Description |
---|---|
static class |
UfsJournalCheckpointThread.CatchupState
The state of the journal catchup.
|
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
UfsJournalCheckpointThread(Master master,
UfsJournal journal,
long startSequence,
java.util.function.Supplier<Set<JournalSink>> journalSinks)
Creates a new instance of
UfsJournalCheckpointThread . |
UfsJournalCheckpointThread(Master master,
UfsJournal journal,
java.util.function.Supplier<Set<JournalSink>> journalSinks)
Creates a new instance of
UfsJournalCheckpointThread . |
Modifier and Type | Method and Description |
---|---|
void |
awaitTermination(boolean waitQuietPeriod)
Initiates the shutdown of this checkpointer thread, and also waits for it to finish.
|
UfsJournalCheckpointThread.CatchupState |
getCatchupState() |
long |
getNextSequenceNumber()
This should only be called after
awaitTermination(boolean) . |
void |
onError(Throwable t)
Handles the uncaught error on thread crashing.
|
void |
run() |
crashed, getError, setError
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public UfsJournalCheckpointThread(Master master, UfsJournal journal, java.util.function.Supplier<Set<JournalSink>> journalSinks)
UfsJournalCheckpointThread
.master
- the master to apply the journal entries tojournal
- the journaljournalSinks
- a supplier for journal sinkspublic UfsJournalCheckpointThread(Master master, UfsJournal journal, long startSequence, java.util.function.Supplier<Set<JournalSink>> journalSinks)
UfsJournalCheckpointThread
.master
- the master to apply the journal entries tojournal
- the journalstartSequence
- the journal start sequencejournalSinks
- a supplier for journal sinkspublic void awaitTermination(boolean waitQuietPeriod)
waitQuietPeriod
- whether to wait for a quiet period to pass before terminating the threadRuntimeException
- if Thread.join()
throws an InterruptedException or if
run()
completed exceptionallypublic long getNextSequenceNumber()
awaitTermination(boolean)
.public UfsJournalCheckpointThread.CatchupState getCatchupState()
public void onError(Throwable t)
AutopsyThread
onError
in class AutopsyThread
t
- the crashing errorCopyright © 2023. All Rights Reserved.