com.espertech.esper.collection
Class ThreadWorkQueue

java.lang.Object
  extended by com.espertech.esper.collection.ThreadWorkQueue

public class ThreadWorkQueue
extends 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
static void add(Object event)
          Adds event to the end of the event queue.
protected static void addFront(Object event)
          Adds event to the front of the queue.
static boolean isEmpty()
          Returns an indicator whether the queue is empty.
static 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 static void add(Object event)
Adds event to the end of the event queue.

Parameters:
event - to add

addFront

protected static void addFront(Object event)
Adds event to the front of the queue.

Parameters:
event - to add

next

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

Returns:
next event to getSelectListEvents

isEmpty

public static boolean isEmpty()
Returns an indicator whether the queue is empty.

Returns:
true for empty, false for not empty

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com