|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.view.internal.PriorEventBufferSingle
public class PriorEventBufferSingle
Buffers view-posted insert stream (new data) and remove stream (old data) events for use with serving prior results in these streams, for a single prior event.
Buffers only exactly those events in new data and old data that are being asked for via the 2 or more 'prior' functions that specify different indexes. For example "select prior(2, price), prior(1, price)" results in on buffer instance handling both the need to the immediatly prior (1) and the 2-events-ago event (2).
As all views are required to post new data and post old data that removes the new data to subsequent views, this buffer can be attached to all views and should not result in a memory leak.
When the buffer receives old data (rstream) events it removes the prior events to the rstream events from the buffer the next time it receives a post (not immediatly) to allow queries to the buffer.
Constructor Summary | |
---|---|
PriorEventBufferSingle(int priorEventIndex)
Ctor. |
Method Summary | |
---|---|
EventBean |
getRelativeToEvent(EventBean event,
int priorToIndex)
|
void |
update(EventBean[] newData,
EventBean[] oldData)
Accepts view insert and remove stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PriorEventBufferSingle(int priorEventIndex)
priorEventIndex
- is the number-of-events prior to the current event we are interested inMethod Detail |
---|
public 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 getRelativeToEvent(EventBean event, int priorToIndex)
getRelativeToEvent
in interface RelativeAccessByEventNIndex
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |