|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PseudoReference<T>
Interface for dealing with both strong references and java.lang.ref.Reference Objects interchangably. If Java supported a StrongReference subclass of Reference, this interface would not be necessary.
| Method Summary | |
|---|---|
void |
clear()Clears this reference object. |
boolean |
enqueue()Adds this reference object to the queue with which it is registered, if any. |
T |
get()Returns this reference object's referent. |
boolean |
isEnqueued()Tells whether or not this reference object has been enqueued, either by the program or by the garbage collector. |
| Method Detail |
|---|
T get()
null.null if this reference object has been clearedvoid clear()
This method is invoked only by Java code; when the garbage collector clears references it does so directly, without invoking this method.
boolean isEnqueued()
false.true if and only if this reference object has been enqueuedboolean enqueue()
This method is invoked only by Java code; when the garbage collector enqueues references it does so directly, without invoking this method.
true if this reference object was successfully enqueued; false if it was already enqueued or if it was not registered with a queue when it was created
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.