|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Queue
An interface for queues.
Method Summary | |
---|---|
boolean |
append(Object o)
Appends the object to the queue and notifies any threads that are blocked in pull(). |
Object |
poll()
Poll this queue to see if an object is available, immediately removing one if so. |
Object |
pull()
Remove the next object in this queue, blocking until one becomes available. |
Object |
pull(long timeout)
Remove the next object in this queue, blocking until one becomes available or the given timeout period expires. |
Object |
replace(Object o)
Replaces the first occurrence of any equal object in the queue. |
Method Detail |
---|
boolean append(Object o)
Object poll()
Object pull() throws InterruptedException
InterruptedException
- If the wait is interrupted.Object pull(long timeout) throws InterruptedException
timeout
- If positive, block for up to timeout milliseconds while
waiting for an object to be added to this queue.
If zero, block indefinitely.
IllegalArgumentException
- If the value of the timeout argument is negative.
InterruptedException
- If the timeout wait is interrupted.Object replace(Object o) throws IndexOutOfBoundsException
IndexOutOfBoundsException
- If appending would cause the queue to exceed the maximum size.
|
CroftSoft Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |