Home » openjdk-7 » java » lang » ref » [javadoc | source]
java.lang.ref
public class: ReferenceQueue [javadoc | source]
java.lang.Object
   java.lang.ref.ReferenceQueue

Direct Known Subclasses:
    Null

Reference queues, to which registered reference objects are appended by the garbage collector after the appropriate reachability changes are detected.
Field Summary
static  ReferenceQueue NULL     
static  ReferenceQueue ENQUEUED     
Constructor:
 public ReferenceQueue() 
Method from java.lang.ref.ReferenceQueue Summary:
enqueue,   poll,   remove,   remove
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.lang.ref.ReferenceQueue Detail:
 boolean enqueue(Reference<? extends T> r) 
 public Reference<? extends T> poll() 
    Polls this queue to see if a reference object is available. If one is available without further delay then it is removed from the queue and returned. Otherwise this method immediately returns null.
 public Reference<? extends T> remove() throws InterruptedException 
    Removes the next reference object in this queue, blocking until one becomes available.
 public Reference<? extends T> remove(long timeout) throws IllegalArgumentException, InterruptedException 
    Removes the next reference object in this queue, blocking until either one becomes available or the given timeout period expires.

    This method does not offer real-time guarantees: It schedules the timeout as if by invoking the Object#wait(long) method.