com.espertech.esper.view.ext
Class IStreamTimeOrderRandomAccess

java.lang.Object
  extended by com.espertech.esper.view.ext.IStreamTimeOrderRandomAccess
All Implemented Interfaces:
RandomAccessByIndex

public class IStreamTimeOrderRandomAccess
extends Object
implements RandomAccessByIndex

Provides random access into a time-ordered-window's data.


Constructor Summary
IStreamTimeOrderRandomAccess(RandomAccessByIndexObserver updateObserver)
          Ctor.
 
Method Summary
 EventBean getNewData(int index)
          Returns an new data event given an index.
 EventBean getOldData(int index)
          Returns an old data event given an index.
 void refresh(TreeMap<Long,ArrayList<EventBean>> sortedEvents, int currentSize)
          Refreshes the random access data with the updated information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IStreamTimeOrderRandomAccess

public IStreamTimeOrderRandomAccess(RandomAccessByIndexObserver updateObserver)
Ctor.

Parameters:
updateObserver - for indicating updates to
Method Detail

refresh

public void refresh(TreeMap<Long,ArrayList<EventBean>> sortedEvents,
                    int currentSize)
Refreshes the random access data with the updated information.

Parameters:
sortedEvents - is the sorted window contents
currentSize - is the current size of the window

getNewData

public EventBean getNewData(int index)
Description copied from interface: RandomAccessByIndex
Returns an new data event given an index.

Specified by:
getNewData in interface RandomAccessByIndex
Parameters:
index - to return new data for
Returns:
new data event

getOldData

public EventBean getOldData(int index)
Description copied from interface: RandomAccessByIndex
Returns an old data event given an index.

Specified by:
getOldData in interface RandomAccessByIndex
Parameters:
index - to return old data for
Returns:
old data event

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