Package com.carfey.ops.job
Interface InterruptableContextJob
-
- All Superinterfaces:
SchedulableJob
public interface InterruptableContextJob extends SchedulableJob
Alternative to theInterruptableJobinterface to indicate that a class supports job interrupts. UnlikeInterruptableJob, theContextfor the job is passed to thebeforeInterrupt(Context)method, which invoked before Obsidian invokesThread.interrupt()on the running job.Note that the job itself must still implement logic to handle the thread interrupt.
- Since:
- 3.2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.carfey.ops.job.SchedulableJob
SchedulableJob.AsyncJob, SchedulableJob.Initializable, SchedulableJob.InitializableChainAnnotation, SchedulableJob.InitializableChainConditionAnnotation, SchedulableJob.RepeatableInitializableAnnotation, SchedulableJob.Schedulable, SchedulableJob.ScheduledRun
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbeforeInterrupt(Context context)Invoked before the job is interrupted viaThread.interrupt().-
Methods inherited from interface com.carfey.ops.job.SchedulableJob
execute
-
-
-
-
Method Detail
-
beforeInterrupt
void beforeInterrupt(Context context)
Invoked before the job is interrupted viaThread.interrupt(). Suitable for cleanup operations.- Parameters:
context- the job's context object
-
-