Skip navigation links

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

E13403-06


oracle.ide.util
Class WeakDataReference<T>

java.lang.Object
  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)
          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

WeakDataReference

public WeakDataReference(WeakDataHolder<T> holder,
                         T data)
Constructor.
Parameters:
holder - object to be notified some time after collection of the data.
data - object to be weakly referenced.

Method Detail

clear

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.
Overrides:
clear in class java.lang.ref.Reference<T>

Skip navigation links

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

E13403-06


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