|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.browse.BrowseConsumer
public class BrowseConsumer
Class for updating browse system from content events. Prototype: only Item events recognized. XXX FIXME NOTE: The Browse Consumer is INCOMPLETE because the deletion of an Item CANNOT be implemented as an event consumer: When an Item is deleted, the browse tables must be updated immediately, within the same transaction, to maintain referential consistency. It cannot be handled in an Event consumer since by definition that runs after the transaction is committed. Perhaps this can be addressed if the Browse system is replaced. To handle create/modify events: accumulate Sets of Items to be added and updated out of the event stream. Process them in endEvents() filter out update requests for Items that were just created. Recommended filter: Item+Create|Modify|Modify_Metadata:Collection+Add|Remove
| Constructor Summary | |
|---|---|
BrowseConsumer()
|
|
| Method Summary | |
|---|---|
void |
consume(Context ctx,
Event event)
Consume an event; events may get filtered at the dispatcher level, hiding it from the consumer. |
void |
end(Context ctx)
Signal that there are no more events queued in this event stream and event processing for the preceding consume calls should be finished up. |
void |
finish(Context ctx)
Finish - free any allocated resources. |
void |
initialize()
Initialize - allocate any resources required to operate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BrowseConsumer()
| Method Detail |
|---|
public void initialize()
throws Exception
Consumer
initialize in interface ConsumerException
public void consume(Context ctx,
Event event)
throws Exception
Consumer
consume in interface Consumerctx - the execution context objectevent - the content event
Exception
public void end(Context ctx)
throws Exception
Consumer
end in interface ConsumerExceptionpublic void finish(Context ctx)
Consumer
finish in interface Consumer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||