org.clazzes.util.sched
Interface ITimedJob


public interface ITimedJob

A job that supports specifying when it wants to be executed next time.


Method Summary
 Long getNextExecutionDelay()
          Returns the delay, relative to the current system time, after which the job wants to get executed next time, or null if no such execution is wanted.
 

Method Detail

getNextExecutionDelay

Long getNextExecutionDelay()
Returns the delay, relative to the current system time, after which the job wants to get executed next time, or null if no such execution is wanted. This function is executed in two cases: On the one hand, in the startup code executed right after the corresponding Runnable is passed to the scheduler; and on the other hand right after the job has completed. Thus, the interval is relative to the last completion of the job, and not meant to be a fixed interval in the sense "Execute at t = 1 * interval, t = 2 * interval, t = 3 * interval, ...".

Returns:
delay, relative to the current system time, after which the job wants to get executed next time; null if and only if the job does not want another execution


Copyright © 2013. All Rights Reserved.