Class ListenerCallQueue.PerListenerQueue<L>

java.lang.Object
com.google.common.util.concurrent.ListenerCallQueue.PerListenerQueue<L>
All Implemented Interfaces:
Runnable
Enclosing class:
ListenerCallQueue<L>

private static final class ListenerCallQueue.PerListenerQueue<L> extends Object implements Runnable
A special purpose queue/executor that dispatches listener events serially on a configured executor. Each event can be added and dispatched as separate phases.

This class is very similar to SequentialExecutor with the exception that events can be added without necessarily executing immediately.

  • Field Details

  • Constructor Details

    • PerListenerQueue

      PerListenerQueue(L listener, Executor executor)
  • Method Details

    • add

      void add(ListenerCallQueue.Event<L> event, Object label)
      Enqueues an event to be run.
    • dispatch

      void dispatch()
      Dispatches all listeners enqueued prior to this call, serially and in order.
    • run

      public void run()
      Specified by:
      run in interface Runnable