Package org.alfresco.repo.event2
Class EnqueuingEventSender
java.lang.Object
org.alfresco.repo.event2.DirectEventSender
org.alfresco.repo.event2.EnqueuingEventSender
- All Implemented Interfaces:
EventSender
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 Summary
FieldsModifier and TypeFieldDescriptionprotected final Executorprotected final Executorprotected Runnableprotected static final org.apache.commons.logging.Logprotected BlockingQueue<org.alfresco.repo.event2.EnqueuingEventSender.EventInMaking> Fields inherited from class org.alfresco.repo.event2.DirectEventSender
event2MessageProducer -
Constructor Summary
ConstructorsConstructorDescriptionEnqueuingEventSender(Event2MessageProducer event2MessageProducer, Executor enqueueThreadPoolExecutor, Executor dequeueThreadPoolExecutor) -
Method Summary
Modifier and TypeMethodDescriptionvoidProcedure to enqueue the callback functions that creates an event.voidCalled byEventSenderFactoryBeanduringLifecycle.start().Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.repo.event2.EventSender
destroy, shouldParticipateInTransaction, stop
-
Field Details
-
LOGGER
protected static final org.apache.commons.logging.Log LOGGER -
enqueueThreadPoolExecutor
-
dequeueThreadPoolExecutor
-
queue
-
listener
-
-
Constructor Details
-
EnqueuingEventSender
public EnqueuingEventSender(Event2MessageProducer event2MessageProducer, Executor enqueueThreadPoolExecutor, Executor dequeueThreadPoolExecutor)
-
-
Method Details
-
accept
Procedure to enqueue the callback functions that creates an event.- Specified by:
acceptin interfaceEventSender- Overrides:
acceptin classDirectEventSender- Parameters:
eventProducer- Callback function that creates an event.
-
initialize
public void initialize()Description copied from interface:EventSenderCalled byEventSenderFactoryBeanduringLifecycle.start(). It might be used to initialize the sender implementation.
-