Class SchedulableTask

  • All Implemented Interfaces:
    java.lang.Runnable
    Direct Known Subclasses:
    PausableSchedulableTask

    public abstract class SchedulableTask
    extends java.lang.Object
    implements java.lang.Runnable
    Abstract task class to be used with a SheduledExecutorService.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2016 Created on Jan 12, 2016
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.slf4j.Logger log  
    • Constructor Summary

      Constructors 
      Constructor Description
      SchedulableTask()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void handle​(long now)
      This method is called every time the task is scheduled to run.
      void run()  
      • Methods inherited from class java.lang.Object

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

      • log

        private final org.slf4j.Logger log
    • Constructor Detail

      • SchedulableTask

        public SchedulableTask()
    • Method Detail

      • handle

        public abstract void handle​(long now)
        This method is called every time the task is scheduled to run.
        Parameters:
        now - current time in milliseconds.
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable