Class IStreamRelativeAccess
java.lang.Object
com.espertech.esper.common.internal.view.previous.IStreamRelativeAccess
- All Implemented Interfaces:
ViewUpdatedCollection
,RelativeAccessByEventNIndex
public class IStreamRelativeAccess
extends Object
implements RelativeAccessByEventNIndex, ViewUpdatedCollection
Provides relative access to insert stream events for certain window.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
For indicating that the collection has been updated. -
Field Summary
Fields inherited from interface com.espertech.esper.common.internal.view.access.RelativeAccessByEventNIndex
EPTYPE
-
Constructor Summary
ConstructorDescriptionCtor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
De-allocate resources held by the collection.int
getRelativeToEnd
(int prevIndex) getRelativeToEvent
(EventBean theEvent, int prevIndex) Returns the prior event to the given event counting back the number of events as supplied by index.int
void
Accepts view insert and remove stream.
-
Constructor Details
-
IStreamRelativeAccess
public IStreamRelativeAccess(IStreamRelativeAccess.IStreamRelativeAccessUpdateObserver updateObserver) Ctor.- Parameters:
updateObserver
- is invoked when updates are received
-
-
Method Details
-
update
Description copied from interface:ViewUpdatedCollection
Accepts view insert and remove stream.- Specified by:
update
in interfaceViewUpdatedCollection
- Parameters:
newData
- is the insert stream events or null if no dataoldData
- is the remove stream events or null if no data
-
getRelativeToEvent
Description copied from interface:RelativeAccessByEventNIndex
Returns the prior event to the given event counting back the number of events as supplied by index.- Specified by:
getRelativeToEvent
in interfaceRelativeAccessByEventNIndex
- Parameters:
theEvent
- is the event to count back fromprevIndex
- is the number of events to go back- Returns:
- event
-
getRelativeToEnd
- Specified by:
getRelativeToEnd
in interfaceRelativeAccessByEventNIndex
-
getWindowToEvent
- Specified by:
getWindowToEvent
in interfaceRelativeAccessByEventNIndex
-
getWindowToEventCollReadOnly
- Specified by:
getWindowToEventCollReadOnly
in interfaceRelativeAccessByEventNIndex
-
getWindowToEventCount
public int getWindowToEventCount()- Specified by:
getWindowToEventCount
in interfaceRelativeAccessByEventNIndex
-
destroy
public void destroy()Description copied from interface:ViewUpdatedCollection
De-allocate resources held by the collection.- Specified by:
destroy
in interfaceViewUpdatedCollection
-
getNumEventsInsertBuf
public int getNumEventsInsertBuf()- Specified by:
getNumEventsInsertBuf
in interfaceViewUpdatedCollection
-