org.eaglei.search.harvest
Interface ResourceChangeListener


public interface ResourceChangeListener

Notifications of a set resource changes. The start notification indicates the beginning of a "transaction". Event notifications will be fired for individual resource change information. The end notification indicates the end of a set of changes. Listeners should fully commit all changes received since start. Note that there is no rollback support. If one listener returns false from onChangeEnd(), then all listeners may receive duplicate resouce change information in a subsequent set of events.

Author:
Ted

Method Summary
 void onChangeEvent(ResourceChangeEvent event)
          Data about a single resource change.
 boolean onChangeStreamEnd(org.eaglei.model.EIEntity institution, java.util.Date lastModifiedDate)
          Indicates the end of a set of resource change notifications.
 void onChangeStreamStart(org.eaglei.model.EIEntity institution)
          Indicates the start of a set of resource changes from a given institution.
 void optimize()
          Indicates its a good time to optimize the datastore.
 

Method Detail

onChangeStreamStart

void onChangeStreamStart(org.eaglei.model.EIEntity institution)
Indicates the start of a set of resource changes from a given institution.

Parameters:
institution -

onChangeEvent

void onChangeEvent(ResourceChangeEvent event)
Data about a single resource change. Will be received between a start and an end notification.

Parameters:
event -

onChangeStreamEnd

boolean onChangeStreamEnd(org.eaglei.model.EIEntity institution,
                          java.util.Date lastModifiedDate)
Indicates the end of a set of resource change notifications. All information received since start should be stored. Return false if unable to process all changes received since start.


optimize

void optimize()
Indicates its a good time to optimize the datastore. Is guaranteed to be called between event stream notifications.



Copyright © 2009-2011 Eagle-I. All Rights Reserved.