SHOW Signed

net.rim.device.api.lowmemory
Interface LowMemoryListener


public interface LowMemoryListener

A listener interface for receiving and reacting to low memory events.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

See Also:
LowMemoryFailedListener, LowMemoryManager

Field Summary
 Category: Signed static int HIGH_PRIORITY
          The highest priority of low memory requests.
 Category: Signed static int LOW_PRIORITY
          The lowest priority of low memory requests.
 Category: Signed static int MEDIUM_PRIORITY
          The middle priority of low memory requests.
 
Method Summary
 Category: Signed  boolean freeStaleObject(int priority)
          Called when the amount of available flash on the device has dropped below a safe level.
 

Field Detail

LOW_PRIORITY

public static final int LOW_PRIORITY
The lowest priority of low memory requests.

In response to requests at LOW_PRIORITY, the listener should only free non-critical objects such as cached data.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

MEDIUM_PRIORITY

public static final int MEDIUM_PRIORITY
The middle priority of low memory requests.

In response to requests at MEDIUM_PRIORITY, the listener should free objects that are "stale" such as very old unfiled messages or old calendar entries.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

HIGH_PRIORITY

public static final int HIGH_PRIORITY
The highest priority of low memory requests.

In response to requests at HIGH_PRIORITY, the listener should free any objects that it considers to be "stale" in an effort to meet the memory requirements.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Method Detail

freeStaleObject

public boolean freeStaleObject(int priority)
Called when the amount of available flash on the device has dropped below a safe level.

In response to this call, the listener should attempt to free one stale persistent object, and call LowMemoryManager.markAsRecoverable(Object o) to indicate to the VM the amount of flash freed.

Parameters:
priority - The priority level of the request. Listeners should use parameter to determine what types of objects are to be freed.
Returns:
true if some persistent object was released; false otherwise.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.


Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.