public class PriorEventBufferUnbound extends Object implements ViewUpdatedCollection, RandomAccessByIndex
Does not expect or care about the remove stream and simple keeps a rolling buffer of new data events up to the maximum prior event we are asking for.
Constructor and Description |
---|
PriorEventBufferUnbound(int maxPriorIndex)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
De-allocate resources held by the collection.
|
EventBean |
getNewData(int index)
Returns an new data event given an index.
|
EventBean |
getNewDataTail(int index) |
RollingEventBuffer |
getNewEvents() |
int |
getNumEventsInsertBuf() |
EventBean |
getOldData(int index)
Returns an old data event given an index.
|
Collection<EventBean> |
getWindowCollectionReadOnly() |
int |
getWindowCount() |
Iterator<EventBean> |
getWindowIterator() |
void |
update(EventBean[] newData,
EventBean[] oldData)
Accepts view insert and remove stream.
|
public PriorEventBufferUnbound(int maxPriorIndex)
maxPriorIndex
- is the highest prior-event index required by any expressionpublic void update(EventBean[] newData, EventBean[] oldData)
ViewUpdatedCollection
update
in interface ViewUpdatedCollection
newData
- is the insert stream events or null if no dataoldData
- is the remove stream events or null if no datapublic 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 void destroy()
ViewUpdatedCollection
destroy
in interface ViewUpdatedCollection
public 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
public RollingEventBuffer getNewEvents()
public int getNumEventsInsertBuf()
getNumEventsInsertBuf
in interface ViewUpdatedCollection