org.springframework.scheduling.config

Class IntervalTask

    • Constructor Summary

      Constructors 
      Constructor and Description
      IntervalTask(java.lang.Runnable runnable, long interval)
      Create a new IntervalTask with no initial delay.
      IntervalTask(java.lang.Runnable runnable, long interval, long initialDelay)
      Create a new IntervalTask.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      long getInitialDelay()
      Return the initial delay before first execution of the task.
      long getInterval()
      Return how often in milliseconds the task should be executed.
      • Methods inherited from class java.lang.Object

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

      • IntervalTask

        public IntervalTask(java.lang.Runnable runnable,
                            long interval,
                            long initialDelay)
        Create a new IntervalTask.
        Parameters:
        runnable - the underlying task to execute
        interval - how often in milliseconds the task should be executed
        initialDelay - the initial delay before first execution of the task
      • IntervalTask

        public IntervalTask(java.lang.Runnable runnable,
                            long interval)
        Create a new IntervalTask with no initial delay.
        Parameters:
        runnable - the underlying task to execute
        interval - how often in milliseconds the task should be executed
    • Method Detail

      • getInterval

        public long getInterval()
        Return how often in milliseconds the task should be executed.
      • getInitialDelay

        public long getInitialDelay()
        Return the initial delay before first execution of the task.