info.magnolia.monitoring
Class SystemMonitor
java.lang.Object
info.magnolia.monitoring.SystemMonitor
public class SystemMonitor
- extends Object
Allows to monitor the system.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MEMORY_LIMIT_IS_REACHED_STRING_FORMAT
public static final String MEMORY_LIMIT_IS_REACHED_STRING_FORMAT
- See Also:
- Constant Field Values
MEMORY_VALUES_STRING_FORMAT
public static final String MEMORY_VALUES_STRING_FORMAT
- See Also:
- Constant Field Values
BYTE_TO_MEGABYTE_FACTOR
public static final long BYTE_TO_MEGABYTE_FACTOR
- See Also:
- Constant Field Values
MEMORY_THRESHOLD_PERCENTAGE
public static final int MEMORY_THRESHOLD_PERCENTAGE
- See Also:
- Constant Field Values
MEMORY_THRESHOLD_IN_MB
public static final int MEMORY_THRESHOLD_IN_MB
- See Also:
- Constant Field Values
SystemMonitor
public SystemMonitor()
isMemoryLimitReached
public boolean isMemoryLimitReached()
- Evaluates whether the memory limit is reached. This is the case when system memory is absolutely below
MEMORY_THRESHOLD_IN_MB
and relatively below MEMORY_THRESHOLD_PERCENTAGE
.
- Returns:
- whether the memory limit is reached or not.
isBelowAllThresholds
protected boolean isBelowAllThresholds(long maxMemoryInMb,
long totalMemoryInMb,
long freeMemoryInMb)
- Parameters:
maxMemoryInMb
- maximum amount the JVM can grow tototalMemoryInMb
- current size of the JVMfreeMemoryInMb
- amount left of the current size
Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.