101 |
|
* Take an object from the queue if one is available within given wait |
102 |
|
* time |
103 |
|
* @param timeout the maximum time to wait |
104 |
< |
* @param granularity the time unit of the timeout argument. |
104 |
> |
* @param unit the time unit of the timeout argument. |
105 |
|
* @return the object, or <tt>null</tt> if the specified |
106 |
|
* waiting time elapses before an object is present. |
107 |
|
* @throws InterruptedException if interrupted while waiting. |
108 |
|
*/ |
109 |
< |
public E poll(long timeout, TimeUnit granularity) |
109 |
> |
public E poll(long timeout, TimeUnit unit) |
110 |
|
throws InterruptedException; |
111 |
|
|
112 |
|
/** |
122 |
|
* given wait time. |
123 |
|
* @param x the object to add |
124 |
|
* @param timeout the maximum time to wait |
125 |
< |
* @param granularity the time unit of the timeout argument. |
125 |
> |
* @param unit the time unit of the timeout argument. |
126 |
|
* @return <tt>true</tt> if successful, or <tt>false</tt> if |
127 |
|
* the specified waiting time elapses before space is available. |
128 |
|
* @throws InterruptedException if interrupted while waiting. |
129 |
|
*/ |
130 |
< |
public boolean offer(E x, long timeout, TimeUnit granularity) |
130 |
> |
public boolean offer(E x, long timeout, TimeUnit unit) |
131 |
|
throws InterruptedException; |
132 |
|
|
133 |
|
/** |