Package org.alfresco.repo.event2
Class EnqueuingEventSender
java.lang.Object
org.alfresco.repo.event2.DirectEventSender
org.alfresco.repo.event2.EnqueuingEventSender
- All Implemented Interfaces:
EventSender,org.springframework.beans.factory.InitializingBean
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 Executorprotected 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidProcedure to enqueue the callback functions that creates an event.voidvoidsetDequeueThreadPoolExecutor(Executor dequeueThreadPoolExecutor) voidsetEnqueueThreadPoolExecutor(Executor enqueueThreadPoolExecutor) Methods inherited from class org.alfresco.repo.event2.DirectEventSender
setEvent2MessageProducer
-
Field Details
-
LOGGER
protected static final org.apache.commons.logging.Log LOGGER -
enqueueThreadPoolExecutor
-
dequeueThreadPoolExecutor
-
queue
-
listener
-
-
Constructor Details
-
EnqueuingEventSender
public EnqueuingEventSender()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classDirectEventSender
-
setEnqueueThreadPoolExecutor
-
setDequeueThreadPoolExecutor
-
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.
-