Extension SDK 10.1.2

oracle.ide.util
Interface WeakDataHolder

All Known Implementing Classes:
TextNode

public interface WeakDataHolder

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

dataExpired

public 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.

Parameters:
data -

isExpired

public 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.


Extension SDK

 

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