org.mortbay.util
public class BlockingQueue extends Object
Version: $Id: BlockingQueue.java,v 1.5 2004/05/09 20:32:49 gregwilkins Exp $
Constructor Summary | |
---|---|
BlockingQueue(int maxSize) Constructor. | |
BlockingQueue(Object lock, int maxSize) Constructor. |
Method Summary | |
---|---|
void | clear() |
Object | get() Get object from queue.
|
Object | get(int timeoutMs) Get from queue.
|
int | maxSize() |
Object | peek() Peek at the queue.
|
Object | peek(int timeoutMs) Peek at the queue.
|
void | put(Object o) Put object in queue. |
void | put(Object o, int timeout) Put object in queue. |
int | size() |
Returns: The next object in the queue.
Parameters: timeoutMs the time to wait for a job
Returns: The next object in the queue, or null if timedout.
Returns: The next object in the queue, or null if timedout.
Parameters: timeoutMs the time to wait for a job
Returns: The next object in the queue, or null if timedout.
Parameters: o Object
Parameters: timeout If timeout expires, throw InterruptedException o Object
Throws: InterruptedException Timeout expired or otherwise interrupted