Package com.google.common.eventbus
Class Dispatcher.PerThreadQueuedDispatcher
java.lang.Object
com.google.common.eventbus.Dispatcher
com.google.common.eventbus.Dispatcher.PerThreadQueuedDispatcher
- Enclosing class:
Dispatcher
Implementation of a
Dispatcher.perThreadDispatchQueue()
dispatcher.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ThreadLocal
<Boolean> Per-thread dispatch state, used to avoid reentrant event dispatching.private final ThreadLocal
<Queue<Dispatcher.PerThreadQueuedDispatcher.Event>> Per-thread queue of events to dispatch. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
dispatch
(Object event, Iterator<Subscriber> subscribers) Dispatches the givenevent
to the givensubscribers
.Methods inherited from class com.google.common.eventbus.Dispatcher
immediate, legacyAsync, perThreadDispatchQueue
-
Field Details
-
queue
Per-thread queue of events to dispatch. -
dispatching
Per-thread dispatch state, used to avoid reentrant event dispatching.
-
-
Constructor Details
-
PerThreadQueuedDispatcher
private PerThreadQueuedDispatcher()
-
-
Method Details
-
dispatch
Description copied from class:Dispatcher
Dispatches the givenevent
to the givensubscribers
.- Specified by:
dispatch
in classDispatcher
-