Class ConcurrentTrsProviderHandler
- java.lang.Object
-
- org.eclipse.lyo.trs.client.handlers.ConcurrentTrsProviderHandler
-
- All Implemented Interfaces:
IProviderHandler
public class ConcurrentTrsProviderHandler extends Object implements 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
Constructors Constructor Description ConcurrentTrsProviderHandler(URI trsUriBase, ITrackedResourceClient trsClient, IProviderEventHandler handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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 Detail
-
ConcurrentTrsProviderHandler
public ConcurrentTrsProviderHandler(URI trsUriBase, ITrackedResourceClient trsClient, IProviderEventHandler handler)
-
-
Method Detail
-
update
public void update()
- Specified by:
update
in interfaceIProviderHandler
-
fetchRemoteChangeLogs
public boolean 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. 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
-
-