Jvmstat

sun.jvmstat.perfdata.monitor
Class CountedTimerTaskUtils

java.lang.Object
  extended by sun.jvmstat.perfdata.monitor.CountedTimerTaskUtils

public class CountedTimerTaskUtils
extends Object

Utility methods for use with CountedTimerTask instances.

Since:
1.5

Constructor Summary
CountedTimerTaskUtils()
           
 
Method Summary
static void reschedule(Timer timer, CountedTimerTask oldTask, CountedTimerTask newTask, int oldInterval, int newInterval)
          Reschedule a CountedTimeTask at a different interval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountedTimerTaskUtils

public CountedTimerTaskUtils()
Method Detail

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 task
oldTask - the old Task
newTask - the new Task
oldInterval - the old interval; use for debugging output purposes only.
newInterval - scheduling interval in milliseconds

Jvmstat