public class MemoryCongestionMonitor extends java.lang.Object implements CongestionMonitor
| Constructor and Description |
|---|
MemoryCongestionMonitor() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCongestionListener(CongestionListener listener)
|
int |
getBackToNormalMemoryThreshold() |
int |
getMemoryThreshold() |
java.lang.String |
getSource()
Get the name of underlying source
|
void |
monitor()
The user should call this method periodically to monitor underlying
resource
|
void |
removeCongestionListener(CongestionListener listener)
Remove
CongestionListener |
void |
setBackToNormalMemoryThreshold(int backToNormalMemoryThreshold) |
void |
setMemoryThreshold(int memoryThreshold) |
public void setBackToNormalMemoryThreshold(int backToNormalMemoryThreshold)
backToNormalPercentageOfMemoryUsed - the backToNormalPercentageOfMemoryUsed to setpublic int getBackToNormalMemoryThreshold()
public void setMemoryThreshold(int memoryThreshold)
memoryThreshold - the memoryThreshold to setpublic int getMemoryThreshold()
public void monitor()
CongestionMonitormonitor in interface CongestionMonitorpublic void addCongestionListener(CongestionListener listener)
CongestionMonitoraddCongestionListener in interface CongestionMonitorpublic void removeCongestionListener(CongestionListener listener)
CongestionMonitorCongestionListenerremoveCongestionListener in interface CongestionMonitorpublic java.lang.String getSource()
CongestionMonitorgetSource in interface CongestionMonitorCopyright © 2014. All Rights Reserved.