org.jwarp.service.threadpool
Class WorkQueue

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.AbstractSequentialList
                    |
                    +--java.util.LinkedList
                          |
                          +--org.jwarp.util.Queue
                                |
                                +--org.jwarp.service.threadpool.WorkQueue
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable

public class WorkQueue
extends Queue

This class extends the queue class by simply counting the waiting instances additoinally.

See Also:
Serialized Form

Fields inherited from class org.jwarp.util.Queue
queue
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
WorkQueue()
          Creates a new work queue.
 
Method Summary
 void freeThreads(boolean val)
           
protected  int getWaitingCount()
          Gets the number of waiting consumers
protected  java.lang.Object getWork()
          Gets work form the queue.
 
Methods inherited from class org.jwarp.util.Queue
isEmpty, pop, push
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, removeFirst, removeLast, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

WorkQueue

public WorkQueue()
Creates a new work queue.
Method Detail

getWork

protected java.lang.Object getWork()
Gets work form the queue.
Returns:
the next piece of work

getWaitingCount

protected int getWaitingCount()
Gets the number of waiting consumers
Returns:
the number of waiting consumers

freeThreads

public void freeThreads(boolean val)

©   O R C A   S y s t e m s