Class TimedSupervisorTask

  • All Implemented Interfaces:
    java.lang.Runnable

    public class TimedSupervisorTask
    extends java.util.TimerTask
    A supervisor task that schedules subtasks while enforce a timeout. Wrapped subtasks must be thread safe.
    • Constructor Summary

      Constructors 
      Constructor Description
      TimedSupervisorTask​(java.lang.String name, java.util.concurrent.ScheduledExecutorService scheduler, java.util.concurrent.ThreadPoolExecutor executor, int timeout, java.util.concurrent.TimeUnit timeUnit, int expBackOffBound, java.lang.Runnable task)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean cancel()  
      void run()  
      • Methods inherited from class java.util.TimerTask

        scheduledExecutionTime
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TimedSupervisorTask

        public TimedSupervisorTask​(java.lang.String name,
                                   java.util.concurrent.ScheduledExecutorService scheduler,
                                   java.util.concurrent.ThreadPoolExecutor executor,
                                   int timeout,
                                   java.util.concurrent.TimeUnit timeUnit,
                                   int expBackOffBound,
                                   java.lang.Runnable task)
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Specified by:
        run in class java.util.TimerTask
      • cancel

        public boolean cancel()
        Overrides:
        cancel in class java.util.TimerTask