final class LoggingEventDispatcher extends Object implements Runnable
LoggingEvents from application threads and inserts them into
the tail of a queue; uses a dispatch thread to take events from the head of
the queue and forward them to attached appenders.
At construction time, if the configuration parameter
UseConcurrentBackport is true, this class searches the CLASSPATH for
the class
LinkedBlockingDeque,
typically be found in the SourceForge
backport-util-concurrent JAR. If the LinkedBlockingDeque class
is found, then the backport-util-concurrent implementations are instantiated
and used by this dispatcher. Otherwise default implementations for Java 1.6,
1.5, or the default for Java 1.4 will be used.
| Constructor and Description |
|---|
LoggingEventDispatcher(ExecutingAppenderAttachable parent,
ActiveAsynchronousAppenderProperties appenderProperties) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
begin()
Fire up the dispatch thread.
|
(package private) void |
dispatch(LoggingEvent event)
Performs asynchronous dispatch if the dispatcher thread is running,
otherwise does a direct dispatch to all attached appenders.
|
(package private) void |
end()
Flush the queue and destroy the dispatcher thread.
|
void |
run() |
LoggingEventDispatcher(ExecutingAppenderAttachable parent, ActiveAsynchronousAppenderProperties appenderProperties)
final void begin()
final void dispatch(LoggingEvent event)
event - final void end()