Package org.dspace.statistics
Class StatisticsLoggingConsumer
java.lang.Object
org.dspace.statistics.StatisticsLoggingConsumer
- All Implemented Interfaces:
Consumer
StatisticsLogging Consumer for SolrLogger which captures Create, Update
and Delete Events on DSpace Objects.
All usage-events will be updated to capture changes to e.g.
the owning collection
- Author:
- kevinvandevelde at atmire.com, ben at atmrie.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CollectionServiceprotected ItemServiceprotected SolrLoggerService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConsume an event.voidSignal that there are no more events queued in this event stream and event processing for the preceding consume calls should be finished up.voidFinish - free any allocated resources.voidAllocate any resources required to operate.
-
Field Details
-
collectionService
-
itemService
-
solrLoggerService
-
-
Constructor Details
-
StatisticsLoggingConsumer
public StatisticsLoggingConsumer()
-
-
Method Details
-
initialize
Description copied from interface:ConsumerAllocate any resources required to operate. This may include initializing any pooled JMS resources. Called ONCE when created by the dispatcher pool. This should be used to set up expensive resources that will remain for the lifetime of the consumer.- Specified by:
initializein interfaceConsumer- Throws:
Exception- if error
-
consume
Description copied from interface:ConsumerConsume an event. Events may be filtered by a dispatcher, hiding them from the consumer. This behavior is based on the dispatcher/consumer configuration. Should include logic to initialize any resources required for a batch of events.This method must not commit the context. Committing causes re-dispatch of the event queue, which can result in infinite recursion leading to memory exhaustion as seen in {@link https://github.com/DSpace/DSpace/pull/8756}.
-
end
Description copied from interface:ConsumerSignal that there are no more events queued in this event stream and event processing for the preceding consume calls should be finished up. -
finish
Description copied from interface:ConsumerFinish - free any allocated resources. Called when consumer (via it's parent dispatcher) is going to be destroyed by the dispatcher pool.
-