public class ProducerConsumerQueue<T>
extends java.lang.Object
| Constructor and Description |
|---|
ProducerConsumerQueue() |
ProducerConsumerQueue(int sizeLimit) |
| Modifier and Type | Method and Description |
|---|---|
T |
get() |
T |
get(long timeout,
T returnOnTimeout) |
boolean |
isEmpty() |
boolean |
isFull() |
void |
put(T value) |
boolean |
put(T value,
long timeout) |
int |
size() |
int |
sizeLimit() |
void |
waitUntilEmpty() |
void |
waitUntilNotEmpty() |
boolean |
waitUntilNotEmpty(long timeout) |
public ProducerConsumerQueue()
public ProducerConsumerQueue(int sizeLimit)
public int size()
public int sizeLimit()
public boolean isFull()
public boolean isEmpty()
public void waitUntilNotEmpty()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void waitUntilEmpty()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic boolean waitUntilNotEmpty(long timeout)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic T get() throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic T get(long timeout, T returnOnTimeout) throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void put(T value) throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic boolean put(T value, long timeout) throws java.lang.InterruptedException
java.lang.InterruptedException