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
Fields inherited from interface org.tailormap.api.scheduling.Task
CRON_EXPRESSION_KEY, DESCRIPTION_KEY, INTERRUPTABLE_KEY, LAST_RESULT_KEY, PRIORITY_KEY, STATE_KEY, TYPE_KEY, UUID_KEY
-
Constructor Summary
ConstructorDescriptionIndexTask
(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 void
executeInternal
(org.quartz.JobExecutionContext context) Get the description of the task.long
getType()
Get the type of the task.void
setDescription
(String description) Set the description of the task.void
setIndexId
(long indexId) void
taskProgress
(TaskProgressEvent event) Handle the task progress event.Methods inherited from class org.springframework.scheduling.quartz.QuartzJobBean
execute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
executeInternal
in classorg.springframework.scheduling.quartz.QuartzJobBean
- Throws:
org.quartz.JobExecutionException
-
taskProgress
Description copied from interface:Task
Handle the task progress event. Override this method to handle the progress of the task, e.g. by emittingServerSentEvent
s. The default is a no-op.- Specified by:
taskProgress
in interfaceTask
- Parameters:
event
- the task progress event
-
getType
Description copied from interface:Task
Get 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:Task
Get the description of the task.- Specified by:
getDescription
in interfaceTask
- Returns:
- the description
-
setDescription
Description copied from interface:Task
Set the description of the task.- Specified by:
setDescription
in interfaceTask
- Parameters:
description
- the description
-