public final class WritingThread
extends java.lang.Thread
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(Writer writer,
LogEntry logEntry) |
Adds a log entry for writing.
|
void |
run() |
Fetches log entries and writes them until receiving a poison task.
|
void |
shutdown() |
Shuts this writing thread down after writing all already added log entries.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitactiveCount, 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, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic void run()
run in class java.lang.Threadpublic void add(Writer writer, LogEntry logEntry)
writer - Writer to write given log entrylogEntry - Log entry to writepublic void shutdown()
This method doesn't wait until the writing thread is down. Thread.join() can be used afterwards to wait
for termination.
Copyright © 2022. All rights reserved.