sun.jvmstat.perfdata.monitor
Class CountedTimerTaskUtils
java.lang.Object
sun.jvmstat.perfdata.monitor.CountedTimerTaskUtils
public class CountedTimerTaskUtils
- extends Object
Utility methods for use with CountedTimerTask
instances.
- Since:
- 1.5
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CountedTimerTaskUtils
public CountedTimerTaskUtils()
reschedule
public static void reschedule(Timer timer,
CountedTimerTask oldTask,
CountedTimerTask newTask,
int oldInterval,
int newInterval)
- Reschedule a CountedTimeTask at a different interval. Probably not
named correctly. This method cancels the old task and computes the
delay for starting the new task based on the new interval and the
time at which the old task was last executed.
- Parameters:
timer
- the Timer for the taskoldTask
- the old TasknewTask
- the new TaskoldInterval
- the old interval; use for debugging output
purposes only.newInterval
- scheduling interval in milliseconds