com.knowgate.scheduler
Class AtomQueue

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.AbstractSequentialList
              extended byjava.util.LinkedList
                  extended bycom.knowgate.scheduler.AtomQueue
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable

public class AtomQueue
extends java.util.LinkedList

Memory FIFO Queue for job atoms pending of processing

Version:
1.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
AtomQueue()
          Create an empty queue with a maximum of 1000 atoms
AtomQueue(int iMaxSize)
          Create an empty queue
 
Method Summary
 int maxsize()
           
 Atom pop()
          Pop first available atom from queue
 void push(Atom oAtm)
          Add an atom to the end of the queue
 
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, isEmpty, 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, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

AtomQueue

public AtomQueue()
Create an empty queue with a maximum of 1000 atoms


AtomQueue

public AtomQueue(int iMaxSize)
Create an empty queue

Parameters:
iMaxSize - Maximum number of atoms that the queue can mantain in memory
Method Detail

maxsize

public int maxsize()
Returns:
Maximum number of atoms that the queue can mantain in memory

push

public void push(Atom oAtm)

Add an atom to the end of the queue

Parameters:
oAtm - Atom object to be added

pop

public Atom pop()

Pop first available atom from queue