Class TimeoutGuardTask

  • All Implemented Interfaces:
    Runnable

    public class TimeoutGuardTask
    extends HawaiiAsyncRunnable
    Task that stops another scheduled task if the scheduled task's timeout has been reached.

    We first try to remove the scheduled task from the executor, so it will not be executed. If this fails we will try to abort the scheduled tasks.

    For this the guarded task must register it's TaskAbortStrategy in the SharedTaskContext.

    Since:
    2.0.0
    Author:
    Rutger Lubbers, Paul Klos
    • Method Detail

      • doRun

        protected void doRun()
        This method is executed by Runnable run. Run executes all administrative calls. Code specified in this method will be executed in between those calls.
        Specified by:
        doRun in class HawaiiAsyncRunnable