Package org.molgenis.data.index.job
Class IndexJobSchedulerImpl
- java.lang.Object
-
- org.molgenis.data.index.job.IndexJobSchedulerImpl
-
- All Implemented Interfaces:
IndexJobScheduler
public class IndexJobSchedulerImpl extends Object implements IndexJobScheduler
-
-
Constructor Summary
Constructors Constructor Description IndexJobSchedulerImpl(DataService dataService, IndexJobExecutionFactory indexJobExecutionFactory, JobExecutor jobExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanupJobExecutions()Cleans up successful IndexJobExecutions that finished longer than five minutes ago.voidscheduleIndexJob(String transactionId)Schedules a job to rebuild the index for all changes made in the context of a specific transaction.voidwaitForAllIndicesStable()voidwaitForIndexToBeStableIncludingReferences(EntityType entityType)
-
-
-
Constructor Detail
-
IndexJobSchedulerImpl
public IndexJobSchedulerImpl(DataService dataService, IndexJobExecutionFactory indexJobExecutionFactory, JobExecutor jobExecutor)
-
-
Method Detail
-
scheduleIndexJob
public void scheduleIndexJob(String transactionId)
Description copied from interface:IndexJobSchedulerSchedules a job to rebuild the index for all changes made in the context of a specific transaction. Does nothing if no IndexActionJob exists for this transactionId.- Specified by:
scheduleIndexJobin interfaceIndexJobScheduler- Parameters:
transactionId- the ID of the transaction.
-
waitForAllIndicesStable
public void waitForAllIndicesStable() throws InterruptedException- Specified by:
waitForAllIndicesStablein interfaceIndexJobScheduler- Throws:
InterruptedException
-
waitForIndexToBeStableIncludingReferences
public void waitForIndexToBeStableIncludingReferences(EntityType entityType) throws InterruptedException
- Specified by:
waitForIndexToBeStableIncludingReferencesin interfaceIndexJobScheduler- Throws:
InterruptedException
-
cleanupJobExecutions
@Scheduled(initialDelay=60000L, fixedRate=300000L) public void cleanupJobExecutions()Cleans up successful IndexJobExecutions that finished longer than five minutes ago. delay for a minute to allow the transaction manager to become available- Specified by:
cleanupJobExecutionsin interfaceIndexJobScheduler
-
-