public class IStreamSortRankRandomAccessImpl extends java.lang.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.
|
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.
|
public IStreamSortRankRandomAccessImpl(RandomAccessByIndexObserver updateObserver)
updateObserver
- for indicating updates topublic void refresh(java.util.TreeMap<java.lang.Object,java.lang.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 java.util.Iterator<EventBean> getWindowIterator()
getWindowIterator
in interface RandomAccessByIndex
public java.util.Collection<EventBean> getWindowCollectionReadOnly()
getWindowCollectionReadOnly
in interface RandomAccessByIndex
public int getWindowCount()
getWindowCount
in interface RandomAccessByIndex