com.espertech.esper.view.ext
Class IStreamSortRankRandomAccess

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

public class IStreamSortRankRandomAccess
extends java.lang.Object
implements RandomAccessByIndex

Provides random access into a rank-window's data.


Constructor Summary
IStreamSortRankRandomAccess(RandomAccessByIndexObserver updateObserver)
          Ctor.
 
Method Summary
 EventBean getNewData(int index)
          Returns an new data event given an index.
 EventBean getNewDataTail(int index)
           
 EventBean getOldData(int index)
          Returns an old data event given an index.
 java.util.Collection<EventBean> getWindowCollectionReadOnly()
           
 int getWindowCount()
           
 java.util.Iterator<EventBean> getWindowIterator()
           
 void refresh(java.util.TreeMap<java.lang.Object,java.lang.Object> sortedEvents, int currentSize, int maxSize)
          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

IStreamSortRankRandomAccess

public IStreamSortRankRandomAccess(RandomAccessByIndexObserver updateObserver)
Ctor.

Parameters:
updateObserver - for indicating updates to
Method Detail

refresh

public void refresh(java.util.TreeMap<java.lang.Object,java.lang.Object> sortedEvents,
                    int currentSize,
                    int maxSize)
Refreshes the random access data with the updated information.

Parameters:
sortedEvents - is the sorted window contents
currentSize - is the current size of the window
maxSize - is the maximum 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

getNewDataTail

public EventBean getNewDataTail(int index)
Specified by:
getNewDataTail in interface RandomAccessByIndex

getWindowIterator

public java.util.Iterator<EventBean> getWindowIterator()
Specified by:
getWindowIterator in interface RandomAccessByIndex

getWindowCollectionReadOnly

public java.util.Collection<EventBean> getWindowCollectionReadOnly()
Specified by:
getWindowCollectionReadOnly in interface RandomAccessByIndex

getWindowCount

public int getWindowCount()
Specified by:
getWindowCount in interface RandomAccessByIndex

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com