Class ConcurrentTrsProviderHandler
java.lang.Object
org.eclipse.lyo.trs.client.handlers.ConcurrentTrsProviderHandler
- All Implemented Interfaces:
IProviderHandler
Specialization fothe TRS provider class which supports multithreading when it
comes to the processing of the base members and the change events.
Additionally, processes the sparql updates as a single transaction. In case
the sparql update transaction is not successful, then the indexing of the
base members is restarted all over again
- Author:
- Omar
-
Constructor Summary
ConstructorsConstructorDescriptionConcurrentTrsProviderHandler
(URI trsUriBase, ITrackedResourceClient trsClient, IProviderEventHandler handler) -
Method Summary
Modifier and TypeMethodDescriptionboolean
fetchRemoteChangeLogs
(ChangeLog currentChangeLog, List<ChangeLog> changeLogs) Request the pages of the change log from the TRS provider sequentially through the traversal of the paging information until the last processed change event is found.void
update()
-
Constructor Details
-
ConcurrentTrsProviderHandler
public ConcurrentTrsProviderHandler(URI trsUriBase, ITrackedResourceClient trsClient, IProviderEventHandler handler)
-
-
Method Details
-
update
public void update()- Specified by:
update
in interfaceIProviderHandler
-
fetchRemoteChangeLogs
Request the pages of the change log from the TRS provider sequentially through the traversal of the paging information until the last processed change event is found. Add the fetched change logs to the changeLogs argument. In case the last processed change event is found true is returned otherwise false is returned- Parameters:
currentChangeLog
- the first change log from which the next page will be retrieved to retrieve the other pages of the change logchangeLogs
- the list of change logs which will be filled with the pages of the change log- Returns:
- true if the last processed change event is found, false otherwise
-