|
TPTP 4.3.0 Tracing and Profiling Tools Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.equinox.memory.MemoryManager
This class is a placeholder to collect listeners that want to respond to low memory events. Some listeners may want to clear a cache. Others may want to close editors, entire perspectives, or other resources that consume memory in some form or another.
All this memory manager does is keep a list of listeners and provide a way to broadcast a low-memory event.
An external policy determines when to trigger a broadcast event to be sent to the listeners.
| Field Summary | |
|---|---|
static int |
CRITICAL
Indicates memory is running low at highest severity. |
static int |
LOW
Indicates memory is running low at the lowest severity. |
static int |
SERIOUS
Indicates memory is running low at medium severity. |
| Constructor Summary | |
|---|---|
MemoryManager()
|
|
| Method Summary | |
|---|---|
static void |
addLowMemoryListener(LowMemoryListener listener)
Register a listener with the memory manager. |
static void |
broadcastLowMemory(int severity)
Broadcast a low memory event. |
static java.util.List |
getListeners()
|
static void |
removeListener(LowMemoryListener listener)
Remove a low memory listener. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int LOW
public static final int SERIOUS
public static final int CRITICAL
| Constructor Detail |
public MemoryManager()
| Method Detail |
public static void addLowMemoryListener(LowMemoryListener listener)
listener - the listener that can clean up memorypublic static void removeListener(LowMemoryListener listener)
listener - the listener to removepublic static void broadcastLowMemory(int severity)
severity - either LOW, SERIOUS, or CRITICALpublic static java.util.List getListeners()
|
TPTP 4.3.0 Tracing and Profiling Tools Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||