Interface InterruptableContextJob

  • All Superinterfaces:
    SchedulableJob

    public interface InterruptableContextJob
    extends SchedulableJob
    Alternative to the InterruptableJob interface to indicate that a class supports job interrupts. Unlike InterruptableJob, the Context for the job is passed to the beforeInterrupt(Context) method, which invoked before Obsidian invokes Thread.interrupt() on the running job.

    Note that the job itself must still implement logic to handle the thread interrupt.

    Since:
    3.2
    • Method Detail

      • beforeInterrupt

        void beforeInterrupt​(Context context)
        Invoked before the job is interrupted via Thread.interrupt(). Suitable for cleanup operations.
        Parameters:
        context - the job's context object