public class RuntimeMemoryChecker extends Object implements MemoryChecker
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
logger
the logger for this class
|
protected static Runtime |
runtime
JVM runtime
|
Constructor and Description |
---|
RuntimeMemoryChecker()
Default constructor.
|
RuntimeMemoryChecker(long _reserved,
double _threshold)
Construct a RuntimeMemoryChecker.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkMemory()
Returns true if memory is running low
|
void |
reset()
Reset the out of memory flag
|
protected static final org.apache.log4j.Logger logger
protected static final Runtime runtime
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.public boolean checkMemory()
checkMemory
in interface MemoryChecker
public void reset()
reset
in interface MemoryChecker
Terrier 4.0. Copyright © 2004-2014 University of Glasgow