Class EnqueuingEventSender

java.lang.Object
org.alfresco.repo.event2.DirectEventSender
org.alfresco.repo.event2.EnqueuingEventSender
All Implemented Interfaces:
EventSender

public class EnqueuingEventSender extends DirectEventSender
Enqueuing event sender allows to create asynchronously the RepoEvent offloading the work to a ThreadPool but at the same time it preserves the order of the events.
  • Field Details

    • LOGGER

      protected static final org.apache.commons.logging.Log LOGGER
    • enqueueThreadPoolExecutor

      protected final Executor enqueueThreadPoolExecutor
    • dequeueThreadPoolExecutor

      protected final Executor dequeueThreadPoolExecutor
    • queue

      protected BlockingQueue<org.alfresco.repo.event2.EnqueuingEventSender.EventInMaking> queue
    • listener

      protected Runnable listener
  • Constructor Details

  • Method Details

    • accept

      public void accept(Callable<Optional<org.alfresco.repo.event.v1.model.RepoEvent<?>>> eventProducer)
      Procedure to enqueue the callback functions that creates an event.
      Specified by:
      accept in interface EventSender
      Overrides:
      accept in class DirectEventSender
      Parameters:
      eventProducer - Callback function that creates an event.
    • initialize

      public void initialize()
      Description copied from interface: EventSender
      It's called right after event sender instantiation (see EventSenderFactoryBean). It might be used to initialize the sender implementation.