|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ref.Reference java.lang.ref.WeakReference oracle.ide.util.WeakDataReference
The WeakDataReference class is an implementation of WeakReference with a built in notification mechanism. Upon determining that its data has been garbage collected, the WeakDataReference instance will notify its associated WeakDataHolder that the weakly referenced data has expired (i.e. been garbage collected).
The determination that the data has been garbage collected is governed by the behavior of the garbage collector's cooperation with the WeakDataReference's internal ReferenceQueue. That is to say that WeakDataReference notification to its WeakDataHolder can only occur after the garbage collector gets around to putting the WeakDataReference instance into the shared internal ReferenceQueue. The contents of the internal ReferenceQueue are examined regularly via a shared internal thread.
Notification sent by the WeakDataReference to the WeakDataHolder will occur on the AWT event thread.
Constructor Summary | |
WeakDataReference(WeakDataHolder holder,
java.lang.Object data)
Constructor. |
Method Summary | |
void |
clear()
Clears this reference object. |
Methods inherited from class java.lang.ref.Reference |
enqueue, get, isEnqueued |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WeakDataReference(WeakDataHolder holder, java.lang.Object data)
holder
- object to be notified some time after collection of the data.data
- object to be weakly referenced.Method Detail |
public void clear()
|
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.