APIdia Launch Partner
Top Description Constructors Methods
sun.jvmstat.perfdata.monitor

public Class CountedTimerTaskUtils

extends Object
Class Inheritance
Imports
java.util.*

Utility methods for use with CountedTimerTask instances.
Author
Brian Doherty
Since
1.5

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
reschedule(Timer
the Timer for the task
timer
,
CountedTimerTask
the old Task
oldTask
,
CountedTimerTask
the new Task
newTask
,
int
the old interval; use for debugging output purposes only.
oldInterval
,
int
scheduling interval in milliseconds
newInterval
)

Reschedule a CountedTimeTask at a different interval.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CountedTimerTaskUtilsback to summary
public CountedTimerTaskUtils()

Method Detail

rescheduleback to summary
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:Timer

the Timer for the task

oldTask:CountedTimerTask

the old Task

newTask:CountedTimerTask

the new Task

oldInterval:int

the old interval; use for debugging output purposes only.

newInterval:int

scheduling interval in milliseconds