|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.core.MethodPollingViewable
public class MethodPollingViewable
Polling-data provider that calls a static method on a class and passed parameters, and wraps the results as POJO events.
Constructor Summary | |
---|---|
MethodPollingViewable(boolean isStaticMethod,
java.lang.Class methodProviderClass,
MethodStreamSpec methodStreamSpec,
int myStreamNumber,
java.util.List<ExprNode> inputParameters,
PollExecStrategy pollExecStrategy,
DataCache dataCache,
EventType eventType,
ExprEvaluatorContext exprEvaluatorContext)
Ctor. |
Method Summary | |
---|---|
View |
addView(View view)
Add a view to the viewable object. |
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. |
EventType |
getEventType()
Provides metadata information about the type of object the event collection contains. |
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. |
View[] |
getViews()
Returns all added views. |
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. |
boolean |
hasViews()
Test is there are any views to the Viewable. |
java.util.Iterator<EventBean> |
iterator()
Allows iteration through all elements in this event collection. |
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. |
void |
removeAllViews()
Remove all views. |
boolean |
removeView(View view)
Remove a view. |
void |
stop()
Stops the underlying resources. |
void |
validate(EngineImportService engineImportService,
StreamTypeService streamTypeService,
MethodResolutionService methodResolutionService,
TimeProvider timeProvider,
VariableService variableService,
TableService tableService,
ExprEvaluatorContext exprEvaluatorContext,
ConfigurationInformation configSnapshot,
SchedulingService schedulingService,
java.lang.String engineURI,
java.util.Map<java.lang.Integer,java.util.List<ExprNode>> sqlParameters,
EventAdapterService eventAdapterService,
java.lang.String statementName,
java.lang.String statementId,
java.lang.annotation.Annotation[] annotations)
Validate the view. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MethodPollingViewable(boolean isStaticMethod, java.lang.Class methodProviderClass, MethodStreamSpec methodStreamSpec, int myStreamNumber, java.util.List<ExprNode> inputParameters, PollExecStrategy pollExecStrategy, DataCache dataCache, EventType eventType, ExprEvaluatorContext exprEvaluatorContext)
methodStreamSpec
- defines class and method namesmyStreamNumber
- is the stream numberinputParameters
- the input parameter expressionspollExecStrategy
- the execution strategydataCache
- the cache to useeventType
- the type of event returnedexprEvaluatorContext
- expression evaluation contextMethod Detail |
---|
public void stop()
StopCallback
stop
in interface StopCallback
public java.lang.ThreadLocal<DataCache> getDataCacheThreadLocal()
HistoricalEventViewable
EventBean
references) returned during iteration
stable, since the concept of a primary key does not exist.
getDataCacheThreadLocal
in interface HistoricalEventViewable
public void validate(EngineImportService engineImportService, StreamTypeService streamTypeService, MethodResolutionService methodResolutionService, TimeProvider timeProvider, VariableService variableService, TableService tableService, ExprEvaluatorContext exprEvaluatorContext, ConfigurationInformation configSnapshot, SchedulingService schedulingService, java.lang.String engineURI, java.util.Map<java.lang.Integer,java.util.List<ExprNode>> sqlParameters, EventAdapterService eventAdapterService, java.lang.String statementName, java.lang.String statementId, java.lang.annotation.Annotation[] annotations) throws ExprValidationException
ValidatedView
validate
in interface ValidatedView
streamTypeService
- supplies the types of streams against which to validatemethodResolutionService
- for resolving imports and classes and methodstimeProvider
- for providing current timevariableService
- for access to variablesexprEvaluatorContext
- context for expression evaluation
ExprValidationException
- is thrown to indicate an exception in validating the viewpublic EventTable[][] poll(EventBean[][] lookupEventsPerStream, PollResultIndexingStrategy indexingStrategy, ExprEvaluatorContext exprEvaluatorContext)
HistoricalEventViewable
poll
in interface HistoricalEventViewable
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 lookupexprEvaluatorContext
- context for expression evalauation
public View addView(View view)
Viewable
addView
in interface Viewable
view
- to add
public View[] getViews()
Viewable
getViews
in interface Viewable
public boolean removeView(View view)
Viewable
removeView
in interface Viewable
view
- to remove
public void removeAllViews()
Viewable
removeAllViews
in interface Viewable
public boolean hasViews()
Viewable
hasViews
in interface Viewable
public EventType getEventType()
EventCollection
getEventType
in interface EventCollection
public java.util.Iterator<EventBean> iterator()
EventCollection
iterator
in interface EventCollection
iterator
in interface java.lang.Iterable<EventBean>
public java.util.SortedSet<java.lang.Integer> getRequiredStreams()
HistoricalEventViewable
getRequiredStreams
in interface HistoricalEventViewable
public boolean hasRequiredStreams()
HistoricalEventViewable
hasRequiredStreams
in interface HistoricalEventViewable
|
© 2006-2015 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |