Class AsyncDispatcher<K>


  • public class AsyncDispatcher<K>
    extends Object
    Dispatch events via the executor. Executes in parallel or serializes them, if for the identical key.
    Author:
    Jens Wilke
    • Method Detail

      • queue

        public void queue​(AsyncEvent<K> event)
        Immediately executes an event with the provided executor. If an event is already executing for the identical key, queue the event and execute the event with FIFO scheme, preserving the order of the arrival.
      • runMoreOrStop

        public void runMoreOrStop​(AsyncEvent<K> event)
        Run as long there is still an event for the key.