| |
|
| java.lang.Object com.ziclix.python.sql.util.Queue
Queue | public class Queue (Code) | | This queue blocks until closed or an element is enqueued. If the queue
reaches capacity, the dequeue thread gets priority in order to bring the
queue size under a certain threshold.
author: brian zimmer version: $Revision: 2414 $ |
Constructor Summary | |
public | Queue() Instantiate a blocking queue with no bounded capacity. | public | Queue(int capacity) Instantiate a blocking queue with the specified capacity. |
Method Summary | |
public synchronized void | close() Close the queue and notify all waiting Threads. | public synchronized Object | dequeue() Blocks until an object is dequeued or the queue is closed. | public synchronized void | enqueue(Object element) Enqueue an object and notify all waiting Threads. |
capacitythreshold | protected int capacitythreshold(Code) | | Field capacity, threshold
|
closed | protected boolean closed(Code) | | Field closed
|
Queue | public Queue()(Code) | | Instantiate a blocking queue with no bounded capacity.
|
Queue | public Queue(int capacity)(Code) | | Instantiate a blocking queue with the specified capacity.
|
close | public synchronized void close()(Code) | | Close the queue and notify all waiting Threads.
|
|
|
|