Package org.dspace.ctask.replicate
Class BagItReplicateConsumer
- java.lang.Object
-
- org.dspace.ctask.replicate.BagItReplicateConsumer
-
- All Implemented Interfaces:
org.dspace.event.Consumer
public class BagItReplicateConsumer extends Object implements org.dspace.event.Consumer
BagItReplicateConsumer is an event consumer that tracks events relevant to replication synchronization. In response to deletions, it creates and transmits a catalog of deleted objects (so they may be restored if deletion was an error). For new or changed objects, it queues a request to perform the configured curation tasks, or directly performs the task if so indicated.- Author:
- richardrodgers
-
-
Constructor Summary
Constructors Constructor Description BagItReplicateConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsume(org.dspace.core.Context ctx, org.dspace.event.Event event)Consume a content event.voidend(org.dspace.core.Context ctx)voidfinish(org.dspace.core.Context ctx)voidinitialize()
-
-
-
Method Detail
-
initialize
public void initialize() throws Exception- Specified by:
initializein interfaceorg.dspace.event.Consumer- Throws:
Exception
-
consume
public void consume(org.dspace.core.Context ctx, org.dspace.event.Event event) throws ExceptionConsume a content event. At a high level, 2 sorts of actions are performed: first, for all new or modified objects, the object handle is added to a set of objects to be processed. When a Curator batch next runs, this list will be read and whatever tasks are configured to be performed will be. Typically, a new AIP will be generated and uploaded to the replication service. Second, for deletions, the event stream is parsed to construct a 'delete catalog' containing an enumeration of the objects that are being deleted. This also is uploaded to the replication service, and can be used either to recover from mistaken deletions, or purge the replica store when desired.- Specified by:
consumein interfaceorg.dspace.event.Consumer- Parameters:
ctx- Contextevent- Event- Throws:
Exception- if error
-
end
public void end(org.dspace.core.Context ctx) throws Exception- Specified by:
endin interfaceorg.dspace.event.Consumer- Throws:
Exception
-
-