net.esper.collection
Class ThreadWorkQueue

java.lang.Object
  extended by net.esper.collection.ThreadWorkQueue

public class ThreadWorkQueue
extends java.lang.Object

Simple queue implementation based on a Linked List per thread. Objects can be added to the queue tail or queue head.


Constructor Summary
ThreadWorkQueue()
           
 
Method Summary
 void add(java.lang.Object event)
          Adds event to the end of the event queue.
 void addFront(java.lang.Object event)
          Adds event to the front of the queue.
 java.lang.Object next()
          Returns the next event to getSelectListEvents, or null if there are no more events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadWorkQueue

public ThreadWorkQueue()
Method Detail

add

public void add(java.lang.Object event)
Adds event to the end of the event queue.

Parameters:
event - to add

addFront

public void addFront(java.lang.Object event)
Adds event to the front of the queue.

Parameters:
event - to add

next

public java.lang.Object next()
Returns the next event to getSelectListEvents, or null if there are no more events.

Returns:
next event to getSelectListEvents