Package org.tailormap.api.scheduling
Class InterruptablePocTask
java.lang.Object
org.springframework.scheduling.quartz.QuartzJobBean
org.tailormap.api.scheduling.InterruptablePocTask
- All Implemented Interfaces:
org.quartz.InterruptableJob
,org.quartz.Job
,Task
@DisallowConcurrentExecution
@PersistJobDataAfterExecution
public class InterruptablePocTask
extends org.springframework.scheduling.quartz.QuartzJobBean
implements Task, org.quartz.InterruptableJob
POC task for testing purposes, this is a task that can be interrupted.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
executeInternal
(org.quartz.JobExecutionContext context) Get the description of the task.getType()
Get the type of the task.void
void
setDescription
(String description) Set the description of the task.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.quartz.Job
execute
Methods inherited from interface org.tailormap.api.scheduling.Task
isInterruptable, taskProgress
-
Constructor Details
-
InterruptablePocTask
public InterruptablePocTask()
-
-
Method Details
-
interrupt
public void interrupt() throws org.quartz.UnableToInterruptJobException- Specified by:
interrupt
in interfaceorg.quartz.InterruptableJob
- Throws:
org.quartz.UnableToInterruptJobException
-
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
-
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. -
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
-