public interface PollingIncrementalLister
If the adaptor has no easy way of determining repository changes,
then it should not implement this interface and let the GSA naturally find
changes. If the adaptor can use an event-based method of discovering changes,
it should use that method instead. If an adaptor doesn't want to relinguish
control to the frequency of the polling and other such details, then there is
no need to use this interface; simply manually using Timer
is appropriate for a adaptor to do if it wishes.
Implementing this interface does improve the ease of configuring the adaptor for the user. Thus, adaptors are encouraged to implement this interface if it is applicable.
Modifier and Type | Method and Description |
---|---|
void |
getModifiedDocIds(DocIdPusher pusher)
Check for documents modified since the last call to the method.
|
void getModifiedDocIds(DocIdPusher pusher) throws IOException, InterruptedException
Adaptor.getDocIds(com.google.enterprise.adaptor.DocIdPusher)
will
provide additions.
For the first invocation, implementations can simply provide a small amount of very recent history (e.g., last five revisions or last hour of modifications) or provide no history and just initialize data structures for future invocations. Adaptors are always encouraged to not persist state; providing recent history during the first invocation allows the adaptor to handle upgrades, computer restarts, and power outages without trouble and still provide low-latency for those time periods. If an hour is too short a period of time, then feel free to send a day's worth of history instead. However, remember that missing modifications here only increases the amount of latency before the GSA notices the modification.
pusher
- convenience reference to pusherIOException
- on failure getting doc idsInterruptedException
- may percolate from IO calls