Package fr.dyade.aaa.common
Class AverageCPUTask
- java.lang.Object
-
- java.util.TimerTask
-
- fr.dyade.aaa.common.AverageCPUTask
-
-
Field Summary
Fields Modifier and Type Field Description private intaverage(package private) long[]cpuTimeprivate longidthe thread ID of the monitored thread(package private) intidxprivate Loggerloggerloggerprivate Stringnamethe thread name of the monitored thread(package private) intnb
-
Constructor Summary
Constructors Constructor Description AverageCPUTask(long id, int nb)Creates a task that periodically computes the thread load.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAverage()voidrun()voidstart(Timer timer)Starts the resulting task.-
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
-
-
-
Method Detail
-
getAverage
public int getAverage()
-
run
public void run()
- Specified by:
runin interfaceRunnable- Specified by:
runin classTimerTask- See Also:
TimerTask.run()
-
start
public void start(Timer timer)
Starts the resulting task.- Parameters:
timer- Timer to use to schedule the resulting task.
-
-