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.InterruptedException
public void waitUntilEmpty() throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean waitUntilNotEmpty(long timeout) throws java.lang.InterruptedException
java.lang.InterruptedException
public T get() throws java.lang.InterruptedException
java.lang.InterruptedException
public T get(long timeout, T returnOnTimeout) throws java.lang.InterruptedException
java.lang.InterruptedException
public void put(T value) throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean put(T value, long timeout) throws java.lang.InterruptedException
java.lang.InterruptedException