public class LowMemoryDetector extends Detector
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_LOW_WATERMARK_MONITOR_INTERVAL_IN_MILLIS |
static int |
DEFAULT_MEMORY_USAGE_THRESHOLD_PCT |
static int |
DEFAULT_NBR_INTERVALS_BETWEEN_WARNINGS |
static int |
DEFAULT_NBR_LOW_WATERMARK_INTERVALS |
static long |
DEFAULT_SLEEP_INTERVAL |
static long |
DEFAULT_STARTUP_PERIOD_IN_MILLIS |
Constructor and Description |
---|
LowMemoryDetector(Notifier notifier) |
LowMemoryDetector(Notifier notifier,
long memoryThresholdPct,
int nbrIntervalsBetweenWarnings,
int nbrLowWatermarkIntervals,
long lowWatermarkMonitorIntervalInMillis) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkMemory(MemoryUtilizationVO memoryVO) |
long |
getLowWatermarkMonitorIntervalInMillis() |
long |
getMemoryThresholdPct() |
int |
getNbrIntervalsBetweenWarnings() |
int |
getNbrIntervalsSinceLastWarning() |
int |
getNbrLowWatermarkIntervals() |
long |
getStartupPeriodInMillis() |
boolean |
isLowMemoryStateDetected() |
void |
run() |
protected void |
sendAllClearMemoryNotice(MemoryUtilizationVO memoryUtilization) |
protected void |
sendLowMemoryNotice(MemoryUtilizationVO memoryUtilization) |
protected void |
setLowWatermarkMonitorIntervalInMillis(long lowWatermarkMonitorIntervalInMillis) |
protected void |
setMemoryThresholdPct(long usedMemoryThresholdPct) |
protected void |
setNbrIntervalsBetweenWarnings(int nbrIntervalsBetweenWarnings) |
protected void |
setNbrLowWatermarkIntervals(int nbrLowWatermarkIntervals) |
protected void |
setStartupPeriodInMillis(long startupPeriodInMillis) |
protected void |
watchLowWatermark(MemoryUtilizationVO memoryVO) |
getNotifier, sendMessage
public static final int DEFAULT_MEMORY_USAGE_THRESHOLD_PCT
public static final long DEFAULT_SLEEP_INTERVAL
public static final int DEFAULT_NBR_INTERVALS_BETWEEN_WARNINGS
public static final long DEFAULT_STARTUP_PERIOD_IN_MILLIS
public static final long DEFAULT_LOW_WATERMARK_MONITOR_INTERVAL_IN_MILLIS
public static final int DEFAULT_NBR_LOW_WATERMARK_INTERVALS
public LowMemoryDetector(Notifier notifier)
public LowMemoryDetector(Notifier notifier, long memoryThresholdPct, int nbrIntervalsBetweenWarnings, int nbrLowWatermarkIntervals, long lowWatermarkMonitorIntervalInMillis)
public void run()
protected void watchLowWatermark(MemoryUtilizationVO memoryVO)
protected void checkMemory(MemoryUtilizationVO memoryVO)
protected void sendLowMemoryNotice(MemoryUtilizationVO memoryUtilization)
protected void sendAllClearMemoryNotice(MemoryUtilizationVO memoryUtilization)
public long getMemoryThresholdPct()
protected void setMemoryThresholdPct(long usedMemoryThresholdPct)
public int getNbrIntervalsBetweenWarnings()
protected void setNbrIntervalsBetweenWarnings(int nbrIntervalsBetweenWarnings)
public int getNbrIntervalsSinceLastWarning()
public boolean isLowMemoryStateDetected()
public long getStartupPeriodInMillis()
protected void setStartupPeriodInMillis(long startupPeriodInMillis)
public long getLowWatermarkMonitorIntervalInMillis()
protected void setLowWatermarkMonitorIntervalInMillis(long lowWatermarkMonitorIntervalInMillis)
public int getNbrLowWatermarkIntervals()
protected void setNbrLowWatermarkIntervals(int nbrLowWatermarkIntervals)
Copyright © 2015 The Admin4J Project. All Rights Reserved.