public class SpillableMemoryManager extends Object implements NotificationListener
Low memory is defined as more than 50% of the tenured pool being allocated. Spillable objects are tracked using WeakReferences so that the objects can be GCed even though this class has a reference to them.
Modifier and Type | Method and Description |
---|---|
void |
clearSpillables() |
static void |
configure(Properties properties) |
static SpillableMemoryManager |
getInstance() |
void |
handleNotification(Notification n,
Object o) |
void |
registerSpillable(Spillable s)
Register a spillable to be tracked.
|
public static SpillableMemoryManager getInstance()
public static void configure(Properties properties)
public void handleNotification(Notification n, Object o)
handleNotification
in interface NotificationListener
public void clearSpillables()
public void registerSpillable(Spillable s)
s
- the spillable to track.Copyright © 2007-2012 The Apache Software Foundation