public class MemoryWarningSystem extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
MemoryWarningSystem.OnMemoryThresholdReached
Interface that is invoked when a certain memory threshold has been reached.
|
| Constructor and Description |
|---|
MemoryWarningSystem() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected void finalize()
throws Throwable
public void addListener(MemoryWarningSystem.OnMemoryThresholdReached listener)
listener - The listener to addpublic static MemoryPoolMXBean findTenuredGenPool()
public void setWarningThreshold(double percentage)
percentage - public void close()
Copyright © 2021 Fraunhofer SIT. All rights reserved.