public class IStreamSortRankRandomAccessImpl extends Object implements RandomAccessByIndex, IStreamSortRankRandomAccess
Constructor and Description |
---|
IStreamSortRankRandomAccessImpl(RandomAccessByIndexObserver updateObserver)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Collection<EventBean> |
getWindowCollectionReadOnly() |
int |
getWindowCount() |
Iterator<EventBean> |
getWindowIterator() |
void |
refresh(TreeMap<Object,Object> sortedEvents,
int currentSize,
int maxSize)
Refreshes the random access data with the updated information.
|
public IStreamSortRankRandomAccessImpl(RandomAccessByIndexObserver updateObserver)
updateObserver
- for indicating updates topublic void refresh(TreeMap<Object,Object> sortedEvents, int currentSize, int maxSize)
refresh
in interface IStreamSortRankRandomAccess
sortedEvents
- is the sorted window contentscurrentSize
- is the current size of the windowmaxSize
- is the maximum size of the windowpublic EventBean getNewData(int index)
RandomAccessByIndex
getNewData
in interface RandomAccessByIndex
index
- to return new data forpublic EventBean getOldData(int index)
RandomAccessByIndex
getOldData
in interface RandomAccessByIndex
index
- to return old data forpublic EventBean getNewDataTail(int index)
getNewDataTail
in interface RandomAccessByIndex
public Iterator<EventBean> getWindowIterator()
getWindowIterator
in interface RandomAccessByIndex
public Collection<EventBean> getWindowCollectionReadOnly()
getWindowCollectionReadOnly
in interface RandomAccessByIndex
public int getWindowCount()
getWindowCount
in interface RandomAccessByIndex