com.espertech.esper.view.window
Class IStreamRelativeAccess

java.lang.Object
  extended by com.espertech.esper.view.window.IStreamRelativeAccess
All Implemented Interfaces:
ViewUpdatedCollection, RelativeAccessByEventNIndex

public class IStreamRelativeAccess
extends java.lang.Object
implements RelativeAccessByEventNIndex, ViewUpdatedCollection

Provides relative access to insert stream events for certain window.


Nested Class Summary
static interface IStreamRelativeAccess.IStreamRelativeAccessUpdateObserver
          For indicating that the collection has been updated.
 
Constructor Summary
IStreamRelativeAccess(IStreamRelativeAccess.IStreamRelativeAccessUpdateObserver updateObserver)
          Ctor.
 
Method Summary
 void destroy()
          De-allocate resources held by the collection.
 int getNumEventsInsertBuf()
           
 EventBean getRelativeToEnd(EventBean theEvent, int prevIndex)
           
 EventBean getRelativeToEvent(EventBean theEvent, int prevIndex)
          Returns the prior event to the given event counting back the number of events as supplied by index.
 java.util.Iterator<EventBean> getWindowToEvent(java.lang.Object evalEvent)
           
 java.util.Collection<EventBean> getWindowToEventCollReadOnly(java.lang.Object evalEvent)
           
 int getWindowToEventCount(EventBean evalEvent)
           
 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

IStreamRelativeAccess

public IStreamRelativeAccess(IStreamRelativeAccess.IStreamRelativeAccessUpdateObserver updateObserver)
Ctor.

Parameters:
updateObserver - is invoked when updates are received
Method Detail

update

public void update(EventBean[] newData,
                   EventBean[] oldData)
Description copied from interface: ViewUpdatedCollection
Accepts view insert and remove stream.

Specified by:
update in interface ViewUpdatedCollection
Parameters:
newData - is the insert stream events or null if no data
oldData - is the remove stream events or null if no data

getRelativeToEvent

public EventBean getRelativeToEvent(EventBean theEvent,
                                    int prevIndex)
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 interface RelativeAccessByEventNIndex
Parameters:
theEvent - is the event to count back from
prevIndex - is the number of events to go back
Returns:
event

getRelativeToEnd

public EventBean getRelativeToEnd(EventBean theEvent,
                                  int prevIndex)
Specified by:
getRelativeToEnd in interface RelativeAccessByEventNIndex

getWindowToEvent

public java.util.Iterator<EventBean> getWindowToEvent(java.lang.Object evalEvent)
Specified by:
getWindowToEvent in interface RelativeAccessByEventNIndex

getWindowToEventCollReadOnly

public java.util.Collection<EventBean> getWindowToEventCollReadOnly(java.lang.Object evalEvent)
Specified by:
getWindowToEventCollReadOnly in interface RelativeAccessByEventNIndex

getWindowToEventCount

public int getWindowToEventCount(EventBean evalEvent)
Specified by:
getWindowToEventCount in interface RelativeAccessByEventNIndex

destroy

public void destroy()
Description copied from interface: ViewUpdatedCollection
De-allocate resources held by the collection.

Specified by:
destroy in interface ViewUpdatedCollection

getNumEventsInsertBuf

public int getNumEventsInsertBuf()
Specified by:
getNumEventsInsertBuf in interface ViewUpdatedCollection

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com