117 |
|
|
118 |
|
/** |
119 |
|
* Retrieves and removes the head of this queue, waiting |
120 |
< |
* if no elements with an unexpired delay are present on this queue. |
120 |
> |
* if no elements with an expired delay are present on this queue. |
121 |
|
* @return the head of this queue |
122 |
|
* @throws InterruptedException if interrupted while waiting. |
123 |
|
*/ |
151 |
|
/** |
152 |
|
* Retrieves and removes the head of this queue, waiting |
153 |
|
* if necessary up to the specified wait time if no elements with |
154 |
< |
* an unexpired delay are |
154 |
> |
* an expired delay are |
155 |
|
* present on this queue. |
156 |
|
* @param timeout how long to wait before giving up, in units of |
157 |
|
* <tt>unit</tt> |
159 |
|
* <tt>timeout</tt> parameter |
160 |
|
* @return the head of this queue, or <tt>null</tt> if the |
161 |
|
* specified waiting time elapses before an element with |
162 |
< |
* an unexpired delay is present. |
162 |
> |
* an expired delay is present. |
163 |
|
* @throws InterruptedException if interrupted while waiting. |
164 |
|
*/ |
165 |
|
public E poll(long timeout, TimeUnit unit) throws InterruptedException { |
198 |
|
|
199 |
|
/** |
200 |
|
* Retrieves and removes the head of this queue, or <tt>null</tt> |
201 |
< |
* if this queue has no elements with an unexpired delay. |
201 |
> |
* if this queue has no elements with an expired delay. |
202 |
|
* |
203 |
|
* @return the head of this queue, or <tt>null</tt> if this |
204 |
< |
* queue has no elements with an unexpired delay. |
204 |
> |
* queue has no elements with an expired delay. |
205 |
|
*/ |
206 |
|
public E poll() { |
207 |
|
final ReentrantLock lock = this.lock; |
225 |
|
/** |
226 |
|
* Retrieves, but does not remove, the head of this queue, |
227 |
|
* returning <tt>null</tt> if this queue has no elements with an |
228 |
< |
* unexpired delay. |
228 |
> |
* expired delay. |
229 |
|
* |
230 |
|
* @return the head of this queue, or <tt>null</tt> if this queue |
231 |
< |
* has no elements with an unexpired delay. |
231 |
> |
* has no elements with an expired delay. |
232 |
|
*/ |
233 |
|
public E peek() { |
234 |
|
final ReentrantLock lock = this.lock; |