| Modifier and Type | Field and Description |
|---|---|
| protected int | capacity
Field capacity, threshold |
| protected boolean | closed
Field closed |
| protected LinkedList | queue
Field queue |
| protected int | threshold
Field capacity, threshold |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | |
| public synchronized Object | |
| public synchronized void |
| capacity | back to summary |
|---|---|
| protected int capacity Field capacity, threshold | |
| closed | back to summary |
|---|---|
| protected boolean closed Field closed | |
| queue | back to summary |
|---|---|
| protected LinkedList<Object> queue Field queue | |
| threshold | back to summary |
|---|---|
| protected int threshold Field capacity, threshold | |
| Queue | back to summary |
|---|---|
| public Queue() Instantiate a blocking queue with no bounded capacity. | |
| Queue | back to summary |
|---|---|
| public Queue(int capacity) Instantiate a blocking queue with the specified capacity. | |
| close | back to summary |
|---|---|
| public synchronized void close() Close the queue and notify all waiting Threads. | |
| dequeue | back to summary |
|---|---|
| public synchronized Object dequeue() throws InterruptedException Blocks until an object is dequeued or the queue is closed. | |
| enqueue | back to summary |
|---|---|
| public synchronized void enqueue(Object element) throws InterruptedException Enqueue an object and notify all waiting Threads. | |