|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
WeakDataHolder is the means by which a WeakDataReference instance is able to communicate that its weakly referenced data has been garbage collected.
Implementation classes should take care to include protective code within their implementations to ensure that they do not incorrectly respond to the notification beyond a valid state. For example; if a WeakDataHolder implementation can be closed, disposed, or otherwise rendered unusable, the implementation should be prepared to correctly handle being notified of its data expiring (i.e. garbage collected) even while in that unusable state.
To disassociate a WeakDataHolder from a given WeakDataReference, calling WeakDataReference.clear() on the WeakDataReference instance will remove the WeakDataReference's reference to the WeakDataHolder.
Method Summary | |
void |
dataExpired(WeakDataReference data)
Notification that weakly referenced data held by the given WeakDataReference instance, of which this WeakDataHolder was provided as the holder, has been garbage collected. |
boolean |
isExpired()
Determine whether or not the weakly referenced data has expired. |
Method Detail |
public void dataExpired(WeakDataReference data)
data
- public boolean isExpired()
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.