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<Atom>
                  extended by com.knowgate.scheduler.AtomQueue
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Atom>, java.util.Collection<Atom>, java.util.Deque<Atom>, java.util.List<Atom>, java.util.Queue<Atom>

public class AtomQueue
extends java.util.LinkedList<Atom>

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 10000 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
 int remove(java.lang.String sGuJob)
          Remove atoms from a given Job
 
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, 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 10000 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

Specified by:
push in interface java.util.Deque<Atom>
Overrides:
push in class java.util.LinkedList<Atom>
Parameters:
oAtm - Atom object to be added

pop

public Atom pop()

Pop first available atom from queue

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

remove

public int remove(java.lang.String sGuJob)

Remove atoms from a given Job

Parameters:
sGuJob - String Job GUID
Returns:
Count of atoms removed
Since:
5.0