public class SystemMonitor extends Object
Modifier and Type | Field and Description |
---|---|
static long |
BYTE_TO_MEGABYTE_FACTOR |
static String |
MEMORY_LIMIT_IS_REACHED_STRING_FORMAT |
static int |
MEMORY_THRESHOLD_IN_MB |
static int |
MEMORY_THRESHOLD_PERCENTAGE |
static String |
MEMORY_VALUES_STRING_FORMAT |
Constructor and Description |
---|
SystemMonitor() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isBelowAllThresholds(long maxMemoryInMb,
long totalMemoryInMb,
long freeMemoryInMb) |
boolean |
isMemoryLimitReached()
Evaluates whether the memory limit is reached.
|
public static final String MEMORY_LIMIT_IS_REACHED_STRING_FORMAT
public static final String MEMORY_VALUES_STRING_FORMAT
public static final long BYTE_TO_MEGABYTE_FACTOR
public static final int MEMORY_THRESHOLD_PERCENTAGE
public static final int MEMORY_THRESHOLD_IN_MB
public boolean isMemoryLimitReached()
MEMORY_THRESHOLD_IN_MB
and relatively below MEMORY_THRESHOLD_PERCENTAGE
.protected boolean isBelowAllThresholds(long maxMemoryInMb, long totalMemoryInMb, long freeMemoryInMb)
maxMemoryInMb
- maximum amount the JVM can grow tototalMemoryInMb
- current size of the JVMfreeMemoryInMb
- amount left of the current sizeCopyright © 2003–2016 Magnolia International Ltd.. All rights reserved.