public class RuntimeMemoryChecker extends Object implements MemoryChecker
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.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.slf4j.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 MemoryCheckerpublic void reset()
reset in interface MemoryCheckerTerrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow