Package org.tailormap.api.scheduling
Class IndexTask
java.lang.Object
org.springframework.scheduling.quartz.QuartzJobBean
org.tailormap.api.scheduling.IndexTask
- All Implemented Interfaces:
org.quartz.Job,Task
@DisallowConcurrentExecution
@PersistJobDataAfterExecution
public class IndexTask
extends org.springframework.scheduling.quartz.QuartzJobBean
implements Task
-
Field Summary
FieldsFields inherited from interface org.tailormap.api.scheduling.Task
CRON_EXPRESSION_KEY, DESCRIPTION_KEY, EXECUTION_COUNT_KEY, EXECUTION_FINISHED_KEY, INTERRUPTABLE_KEY, LAST_RESULT_KEY, PRIORITY_KEY, STATE_KEY, TYPE_KEY, UUID_KEY -
Constructor Summary
ConstructorsConstructorDescriptionIndexTask(SearchIndexRepository searchIndexRepository, FeatureTypeRepository featureTypeRepository, FeatureSourceFactoryHelper featureSourceFactoryHelper, SolrService solrService, ch.rasc.sse.eventbus.SseEventBus eventBus, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecuteInternal(org.quartz.JobExecutionContext context) Get the description of the task.longgetType()Get the type of the task.voidsetDescription(String description) Set the description of the task.voidsetIndexId(long indexId) voidtaskProgress(TaskProgressEvent event) Handle the task progress event.Methods inherited from class org.springframework.scheduling.quartz.QuartzJobBean
executeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tailormap.api.scheduling.Task
isInterruptable
-
Field Details
-
INDEX_KEY
- See Also:
-
-
Constructor Details
-
IndexTask
public IndexTask(@Autowired SearchIndexRepository searchIndexRepository, @Autowired FeatureTypeRepository featureTypeRepository, @Autowired FeatureSourceFactoryHelper featureSourceFactoryHelper, @Autowired SolrService solrService, @Autowired ch.rasc.sse.eventbus.SseEventBus eventBus, @Autowired com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
executeInternal
protected void executeInternal(@NonNull org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException - Specified by:
executeInternalin classorg.springframework.scheduling.quartz.QuartzJobBean- Throws:
org.quartz.JobExecutionException
-
taskProgress
Description copied from interface:TaskHandle the task progress event. Override this method to handle the progress of the task, e.g. by emittingServerSentEvents. The default is a no-op, which means no progress events will be emitted.- Specified by:
taskProgressin interfaceTask- Parameters:
event- the task progress event
-
getType
Description copied from interface:TaskGet the type of the task. Implement this method to return the key for the type of task. This must be a read-only property. -
getIndexId
public long getIndexId() -
setIndexId
public void setIndexId(long indexId) -
getDescription
Description copied from interface:TaskGet the description of the task.- Specified by:
getDescriptionin interfaceTask- Returns:
- the description
-
setDescription
Description copied from interface:TaskSet the description of the task.- Specified by:
setDescriptionin interfaceTask- Parameters:
description- the description
-