com.knowgate.scheduler
Class AtomQueue

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<E>
              extended by java.util.LinkedList
                  extended by com.knowgate.scheduler.AtomQueue
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.Deque, java.util.List, java.util.Queue

public class AtomQueue
extends java.util.LinkedList

Memory FIFO Queue for job atoms pending of processing

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()
           
 java.lang.Object 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, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, 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
 
Methods inherited from interface java.util.Deque
iterator
 

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 java.lang.Object pop()

Pop first available atom from queue

Specified by:
pop in interface java.util.Deque
Overrides:
pop in class java.util.LinkedList