|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.TimerTask
bb.util.MemoryMonitor.MonitorTask
private class MemoryMonitor.MonitorTask
Class which detects memory issues and calls the appropriate fireXXX event notification method.
This class is not multithread safe: it expects to be run by only a single thread.
Field Summary | |
---|---|
private MemoryMeasurer |
measurer
MemoryMeasurer used to measure the memory state. |
private double |
memoryLowTrigger
If the ratio of the available memory to the maximum memory falls below this value, the low memory state is triggered. |
Constructor Summary | |
---|---|
private |
MemoryMonitor.MonitorTask(MemoryMeasurer measurer,
double memoryLowTrigger)
Constructor. |
Method Summary | |
---|---|
void |
run()
Detects any memory issues and calls the appropriate fireXXX event notification method. |
Methods inherited from class java.util.TimerTask |
---|
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final MemoryMeasurer measurer
Contract: is never null.
private final double memoryLowTrigger
Constructor Detail |
---|
private MemoryMonitor.MonitorTask(MemoryMeasurer measurer, double memoryLowTrigger) throws IllegalArgumentException
IllegalArgumentException
- if measurer == null; memoryLowTrigger is NaN, infinite, or outside the range [0, 1]Method Detail |
---|
public void run()
If any Throwable is caught:
it is logged by the logger2
,
fireOnMonitoringError
is called,
and then stopMonitoring
is called.
run
in interface Runnable
run
in class TimerTask
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |