|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terrier.utility.RuntimeMemoryChecker
public class RuntimeMemoryChecker
A memory checker that uses the Java Runtime instance to check the amount of available memory. A given amount of memory must be kept free, however, this condition is only signalled if a given percentage of the JVM's potential memory usage has been exhausted.
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
logger
the logger for this class |
protected static java.lang.Runtime |
runtime
JVM runtime |
| Constructor Summary | |
|---|---|
RuntimeMemoryChecker()
Default constructor. |
|
RuntimeMemoryChecker(long _reserved,
double _threshold)
Construct a RuntimeMemoryChecker. |
|
| Method Summary | |
|---|---|
boolean |
checkMemory()
Returns true if memory is running low |
void |
reset()
Reset the out of memory flag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger logger
protected static final java.lang.Runtime runtime
| Constructor Detail |
|---|
public RuntimeMemoryChecker()
public RuntimeMemoryChecker(long _reserved,
double _threshold)
_reserved - The amount of memory that must be kept available._threshold - Percentage of possible memory that must be allocated before a lowMemory condition is allowed.| Method Detail |
|---|
public boolean checkMemory()
checkMemory in interface MemoryCheckerpublic void reset()
reset in interface MemoryChecker
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||