public class MemoryWarningSystem extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
MemoryWarningSystem.OnMemoryThresholdReached
Interface that is invoked when a certain memory threshold has been reached.
|
| 构造器和说明 |
|---|
MemoryWarningSystem() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addListener(MemoryWarningSystem.OnMemoryThresholdReached listener)
Adds a listener that is called when the memory usage threshold defined using
setWarningThreshold() has been reached
|
void |
close()
Closes this warning system instance.
|
protected void |
finalize() |
static MemoryPoolMXBean |
findTenuredGenPool()
Tenured Space Pool can be determined by it being of type HEAP and by it being
possible to set the usage threshold.
|
void |
setWarningThreshold(double percentage)
Sets the one single global warning threshold for memory usage.
|
public void addListener(MemoryWarningSystem.OnMemoryThresholdReached listener)
listener - The listener to addpublic static MemoryPoolMXBean findTenuredGenPool()
public void setWarningThreshold(double percentage)
percentage - public void close()
Copyright © 2022 Fraunhofer SIT. All rights reserved.