com.espertech.esper.view
Interface HistoricalEventViewable

All Superinterfaces:
EventCollection, java.lang.Iterable<EventBean>, StopCallback, ValidatedView, Viewable
All Known Implementing Classes:
DatabasePollingViewable, MethodPollingViewable

public interface HistoricalEventViewable
extends Viewable, ValidatedView, StopCallback

Interface for views that poll data based on information from other streams.


Method Summary
 java.lang.ThreadLocal<DataCache> getDataCacheThreadLocal()
          Historical views are expected to provide a thread-local data cache for use in keeping row (EventBean references) returned during iteration stable, since the concept of a primary key does not exist.
 java.util.SortedSet<java.lang.Integer> getRequiredStreams()
          Returns the a set of stream numbers of all streams that provide property values in any of the parameter expressions to the stream.
 boolean hasRequiredStreams()
          Returns true if the parameters expressions to the historical require other stream's data, or false if there are no parameters or all parameter expressions are only contants and variables without properties of other stream events.
 EventTable[][] poll(EventBean[][] lookupEventsPerStream, PollResultIndexingStrategy indexingStrategy, ExprEvaluatorContext exprEvaluatorContext)
          Poll for stored historical or reference data using events per stream and returing for each event-per-stream row a separate list with events representing the poll result.
 
Methods inherited from interface com.espertech.esper.view.Viewable
addView, getViews, hasViews, removeAllViews, removeView
 
Methods inherited from interface com.espertech.esper.view.EventCollection
getEventType, iterator
 
Methods inherited from interface com.espertech.esper.view.ValidatedView
validate
 
Methods inherited from interface com.espertech.esper.util.StopCallback
stop
 

Method Detail

hasRequiredStreams

boolean hasRequiredStreams()
Returns true if the parameters expressions to the historical require other stream's data, or false if there are no parameters or all parameter expressions are only contants and variables without properties of other stream events.

Returns:
indicator whether properties are required for parameter evaluation

getRequiredStreams

java.util.SortedSet<java.lang.Integer> getRequiredStreams()
Returns the a set of stream numbers of all streams that provide property values in any of the parameter expressions to the stream.

Returns:
set of stream numbers

getDataCacheThreadLocal

java.lang.ThreadLocal<DataCache> getDataCacheThreadLocal()
Historical views are expected to provide a thread-local data cache for use in keeping row (EventBean references) returned during iteration stable, since the concept of a primary key does not exist.

Returns:
thread-local cache, can be null for any thread to indicate no caching

poll

EventTable[][] poll(EventBean[][] lookupEventsPerStream,
                    PollResultIndexingStrategy indexingStrategy,
                    ExprEvaluatorContext exprEvaluatorContext)
Poll for stored historical or reference data using events per stream and returing for each event-per-stream row a separate list with events representing the poll result.

Parameters:
lookupEventsPerStream - is the events per stream where the first dimension is a number of rows (often 1 depending on windows used) and the second dimension is the number of streams participating in a join.
indexingStrategy - the strategy to use for converting poll results into a indexed table for fast lookup
exprEvaluatorContext - context for expression evalauation
Returns:
array of lists with one list for each event-per-stream row

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