Logo Search packages:      
Sourcecode: uimaj version File versions  Download package

Public Member Functions | Protected Attributes | Static Protected Attributes

org::apache::uima::collection::impl::cpm::engine::BoundedWorkQueue Class Reference

Inheritance diagram for org::apache::uima::collection::impl::cpm::engine::BoundedWorkQueue:
Inheritance graph
Collaboration diagram for org::apache::uima::collection::impl::cpm::engine::BoundedWorkQueue:
Collaboration graph

List of all members.

Public Member Functions

 BoundedWorkQueue (int aQueueSize, String aQueueName, CPMEngine aCpmEngine)
synchronized Object dequeue ()
synchronized Object dequeue (long aTimeout)
synchronized void enqueue (Object anObject)
int getCapacity ()
synchronized int getCurrentSize ()
String getName ()
void invalidate (CAS[] aCasObjectList)

Protected Attributes

CPMEngine cpm
int numberElementsInQueue = 0
LinkedList queue = new LinkedList()
final int queueMaxSize
String queueName = ""

Static Protected Attributes

static final int WAIT_TIMEOUT = 50

Detailed Description

Implementation of a Bounded Queue, a queue with a fixed number of slots. Used primarily to feed data to Processing Units, it is filled by a producer like ArtifactProducer and consumed by ProcessingUnit(s). When the queue is full it will block a request for enqueue until a slot frees up.

There are 2 dequeue calls. One returns null if the queue is empty, the other can be given a timeout - and it will wait up to that time waiting for something to get enqueued.

Definition at line 40 of file BoundedWorkQueue.java.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index