public class MemoryCongestionMonitor extends Object implements CongestionMonitor
| Constructor and Description |
|---|
MemoryCongestionMonitor() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCongestionListener(CongestionListener listener)
|
int |
getBackToNormalMemoryThreshold() |
int |
getMemoryThreshold() |
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 String getSource()
CongestionMonitorgetSource in interface CongestionMonitorCopyright © 2015. All Rights Reserved.