Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)


Class WeakDataReference<T>

  extended by java.lang.ref.Reference<T>
      extended by java.lang.ref.WeakReference<T>
          extended by oracle.ide.util.WeakDataReference<T>

public class WeakDataReference<T>
extends java.lang.ref.WeakReference<T>

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<T> holder, T data)
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<T> holder,
                         T data)

holder - object to be notified some time after collection of the data.
data - object to be weakly referenced.
Method Detail


public void clear()
Clears this reference object. Invoking this method will not cause this object to be enqueued, will result in the release of the internal reference to the WeakDataHolder, and will not result in notification to the WeakDataHolder upon any possible eventual garbage collection of the data.

clear in class java.lang.ref.Reference<T>

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)


Copyright © 1997, 2010, Oracle. All rights reserved.