public class ReferenceQueue<T> extends Object
Constructor and Description |
---|
ReferenceQueue()
构造一个新的引用对象队列。
|
public Reference<? extends T> poll()
null
public Reference<? extends T> remove(long timeout) throws IllegalArgumentException, InterruptedException
此方法不提供实时保证:它调度超时,就好像通过调用Object.wait(long)
方法一样。
timeout
- 如果为正,则在等待将引用添加到此队列时阻止最多timeout
毫秒。
如果为零,则无限期地阻止。
null
IllegalArgumentException
- 如果timeout参数的值为负
InterruptedException
- 如果超时等待中断
public Reference<? extends T> remove() throws InterruptedException
InterruptedException
- 如果等待中断
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.