public class ReferenceQueue<T> extends Object
Constructor and Description |
---|
ReferenceQueue()
Constructs a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
Reference<? extends T> |
poll()
Returns the next available reference from the queue
if one is enqueued, null otherwise.
|
Reference<? extends T> |
remove()
Return the next available enqueued reference on the queue, blocking
indefinitely until one is available.
|
Reference<? extends T> |
remove(long timeout)
Return the next available enqueued reference on the queue, blocking
up to the time given until one is available.
|
public Reference<? extends T> poll()
public Reference<? extends T> remove() throws InterruptedException
InterruptedException
- to interrupt the wait.public Reference<? extends T> remove(long timeout) throws IllegalArgumentException, InterruptedException
timeout
- maximum time spent waiting for a reference object
to become available.IllegalArgumentException
- if the wait period is negative.InterruptedException
- to interrupt the wait.Eclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 1993, 2023 IBM Corp. and others.