|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.jetty.util.BlockingQueue
public class BlockingQueue
Blocking queue. Implemented as circular buffer in a Vector. Synchronization is on the vector to avoid double synchronization.
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlockingQueue(int maxSize)
public BlockingQueue(Object lock, int maxSize)
Method Detail |
---|
public void clear()
public int size()
public int maxSize()
public void put(Object o) throws InterruptedException
o
- Object
InterruptedException
public void put(Object o, int timeout) throws InterruptedException
timeout
- If timeout expires, throw InterruptedExceptiono
- Object
InterruptedException
- Timeout expired or otherwise interruptedpublic Object get() throws InterruptedException
InterruptedException
public Object get(int timeoutMs) throws InterruptedException
timeoutMs
- the time to wait for a job
InterruptedException
public Object peek() throws InterruptedException
InterruptedException
public Object peek(int timeoutMs) throws InterruptedException
timeoutMs
- the time to wait for a job
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |