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
private static final class Dispatcher.PerThreadQueuedDispatcher extends Dispatcher
Implementation of aDispatcher.perThreadDispatchQueue()dispatcher.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classDispatcher.PerThreadQueuedDispatcher.Event
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ThreadLocal<java.lang.Boolean>dispatchingPer-thread dispatch state, used to avoid reentrant event dispatching.private java.lang.ThreadLocal<java.util.Queue<Dispatcher.PerThreadQueuedDispatcher.Event>>queuePer-thread queue of events to dispatch.
-
Constructor Summary
Constructors Modifier Constructor Description privatePerThreadQueuedDispatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voiddispatch(java.lang.Object event, java.util.Iterator<Subscriber> subscribers)Dispatches the giveneventto the givensubscribers.-
Methods inherited from class com.google.common.eventbus.Dispatcher
immediate, legacyAsync, perThreadDispatchQueue
-
-
-
-
Field Detail
-
queue
private final java.lang.ThreadLocal<java.util.Queue<Dispatcher.PerThreadQueuedDispatcher.Event>> queue
Per-thread queue of events to dispatch.
-
dispatching
private final java.lang.ThreadLocal<java.lang.Boolean> dispatching
Per-thread dispatch state, used to avoid reentrant event dispatching.
-
-
Method Detail
-
dispatch
void dispatch(java.lang.Object event, java.util.Iterator<Subscriber> subscribers)Description copied from class:DispatcherDispatches the giveneventto the givensubscribers.- Specified by:
dispatchin classDispatcher
-
-