Package com.intergral.deep.agent.poll
Interface ITimerTask
-
- All Known Implementing Classes:
LongPollService
public interface ITimerTaskA task to run in the timer.- See Also:
DriftAwareThread
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longcallback(long duration, long nextExecutionTime)This method is called after therun(long)method to allow performance tracking.voidrun(long now)This method is called by theDriftAwareThreadat the end of each interval.
-
-
-
Method Detail
-
run
void run(long now) throws Exception
This method is called by theDriftAwareThreadat the end of each interval.- Parameters:
now- the current time- Throws:
Exception- if the task fails
-
callback
long callback(long duration, long nextExecutionTime) throws ExceptionThis method is called after therun(long)method to allow performance tracking.- Parameters:
duration- the duration of the last executionnextExecutionTime- the next calculated execution time- Returns:
- the modified execution next time
- Throws:
Exception- if the callback fails
-
-