public class

CountedTimerTaskUtils

extends Object
java.lang.Object
   ↳ sun.jvmstat.perfdata.monitor.CountedTimerTaskUtils

Class Overview

Utility methods for use with CountedTimerTask instances.

Summary

Public Constructors
CountedTimerTaskUtils()
Public Methods
static void reschedule(Timer timer, CountedTimerTask oldTask, CountedTimerTask newTask, int oldInterval, int newInterval)
Reschedule a CountedTimeTask at a different interval.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CountedTimerTaskUtils ()

Public Methods

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