Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.ide.util
Interface WeakDataHolder<T>

All Known Implementing Classes:
ContextWatcher

public interface WeakDataHolder<T>

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<T> 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

dataExpired

void dataExpired(WeakDataReference<T> 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.
Parameters:
data -

isExpired

boolean isExpired()
Determine whether or not the weakly referenced data has expired. Determination should be based upon the immediate contents of the associated WeakDataReference and should not simply be based on tracking a possibly delayed dataExpired notification.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


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