net.esper.collection
Class EventBuffer

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

public class EventBuffer
extends Object

Buffer for events - accumulates events until flushed.


Constructor Summary
EventBuffer()
           
 
Method Summary
 void add(EventBean[] events)
          Add an event array to buffer.
 void flush()
          Empty buffer.
 EventBean[] getAndFlush()
          Get the events currently buffered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventBuffer

public EventBuffer()
Method Detail

add

public void add(EventBean[] events)
Add an event array to buffer.

Parameters:
events - to add

getAndFlush

public EventBean[] getAndFlush()
Get the events currently buffered. Returns null if the buffer is empty. Flushes the buffer.

Returns:
array of events in buffer or null if empty

flush

public void flush()
Empty buffer.