Package com.intergral.deep.agent.poll
Interface ITimerTask
-
- All Known Implementing Classes:
LongPollService
public interface ITimerTask
A task to run in the timer.- See Also:
DriftAwareThread
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
callback(long duration, long nextExecutionTime)
This method is called after therun(long)
method to allow performance tracking.void
run(long now)
This method is called by theDriftAwareThread
at the end of each interval.
-
-
-
Method Detail
-
run
void run(long now) throws Exception
This method is called by theDriftAwareThread
at the end of each interval.- Parameters:
now
- the current time- Throws:
Exception
- if the task fails
-
callback
long callback(long duration, long nextExecutionTime) throws Exception
This 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
-
-