|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--Monitor.Omr.MemoryMonitor
Locally monitor the amount of free memory available.
This class locally monitors the amount of free memory available in the host. The
frequency in which this monitoring occurs is holded by a Frequency
object.
The value of the currently percentage of CPU usage is holded by a
CurrentRange
object. The monitoring performed by a
MemoryMonitor
object can be suspended and
resumed. These operations are controlled by a SuspendMonitor
object.
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
MemoryMonitor(CurrentRange cr,
Frequency fobj,
SuspendMonitor smonitor)
|
Method Summary | |
void |
run()
Continuously check the amount of free memory available. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MemoryMonitor(CurrentRange cr, Frequency fobj, SuspendMonitor smonitor)
Method Detail |
public void run()
extraiValores
where
the value of corresponding to the amount of free memory available is extracted.
The thread then waits for t
seconds and then repeats the loop. t
is obtained using the method
get
of the Frequency
object,
responsible for holding the frequency in which the monitoring process must
occur. The frequency is passed by the user, using the method
change_frequency
that belongs to the Rmo interface.
After getting the amount of free memory available, the loop always check if it must
suspend the monitoring process by calling the method
is_monitor_suspended
that belongs to a SuspendMonitor
object.
This method will stop the monitoring thread
if the user called the method suspend
that belongs to the
Rmo interface. The
monitoring thread will be resumed when the user calls resume, also from the
Rmo interface.
run
in class java.lang.Thread
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |