Class JobService
- java.lang.Object
-
- org.neotropic.kuwaiba.modules.commercial.sync.JobService
-
@Service public class JobService extends Object
The service creates asynchronous jobs to obtain and deliver information about a synchronization process.- Author:
- Hardy Ryan Chingal Martinez <ryan.chingal@neotropic.co>
-
-
Constructor Summary
Constructors Constructor Description JobService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<List<SyncResult>>createAsyncActionsJob(PollResult pollResult, AbstractSyncProvider syncProvider, int totalElements, int currentElement)Asynchronous thread to obtain the results of the previous data collection process.CompletableFuture<PollResult>createAsyncFetchJob(AbstractSyncProvider syncProvider, SyncDataSourceConfiguration dataSourceConfiguration)Async thread to fetch data using a data source configurationCompletableFuture<List<SyncResult>>createJob(AbstractSyncProvider syncProvider, List<SyncDataSourceConfiguration> datasources)Create a thread to execute a result capture to be sent to the user in a dialog.
-
-
-
Method Detail
-
createAsyncFetchJob
@Async public CompletableFuture<PollResult> createAsyncFetchJob(AbstractSyncProvider syncProvider, SyncDataSourceConfiguration dataSourceConfiguration)
Async thread to fetch data using a data source configuration- Parameters:
syncProvider- synchronization providerdataSourceConfiguration- data source configuration- Returns:
- completale future thread
-
createAsyncActionsJob
@Async public CompletableFuture<List<SyncResult>> createAsyncActionsJob(PollResult pollResult, AbstractSyncProvider syncProvider, int totalElements, int currentElement)
Asynchronous thread to obtain the results of the previous data collection process.- Parameters:
pollResult- results of data collection processsyncProvider- synchronization providertotalElements- total jobscurrentElement- current job- Returns:
- completale future thread
-
createJob
public CompletableFuture<List<SyncResult>> createJob(AbstractSyncProvider syncProvider, List<SyncDataSourceConfiguration> datasources) throws InterruptedException
Create a thread to execute a result capture to be sent to the user in a dialog.- Parameters:
syncProvider- synchronization providerdatasources- data soruce sonfiguration- Returns:
- completale future thread
- Throws:
InterruptedException
-
-