public final class ReferenceQueue
extends java.lang.Object
poll() : returns null if the queue is empty, otherwise returns and removes the first
element of the FIFO queue.remove() : blocks the current thread until the queue becomes not empty.
returns and removes the first element of the FIFO queue.EnqueuedWeakReference| Constructor and Description |
|---|
ReferenceQueue() |
| Modifier and Type | Method and Description |
|---|---|
EnqueuedWeakReference |
poll()
Queries the queue and returns and removes the first element of the queue.
|
EnqueuedWeakReference |
remove()
Queries the queue, returns and removes the first element of the queue.
|
public EnqueuedWeakReference poll()
null.nullpublic EnqueuedWeakReference remove() throws java.lang.InterruptedException
java.lang.InterruptedException - if the thread is interrupted