|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.core.service.StatementResultServiceImpl
public class StatementResultServiceImpl
Implements tracking of statement listeners and subscribers for a given statement such as to efficiently dispatch in situations where 0, 1 or more listeners are attached and/or 0 or 1 subscriber (such as iteration-only statement).
Field Summary | |
---|---|
protected java.lang.ThreadLocal<java.util.ArrayDeque<UniformPair<EventBean[]>>> |
lastResults
Buffer for holding dispatchable events. |
Constructor Summary | |
---|---|
StatementResultServiceImpl(java.lang.String statementName,
StatementLifecycleSvc statementLifecycleSvc,
MetricReportingServiceSPI metricReportingService,
ThreadingService threadingService)
Ctor. |
Method Summary | |
---|---|
void |
dispatchOnStop()
Dispatches when the statement is stopped any remaining results. |
void |
execute()
Execution of result indication. |
java.lang.String |
getStatementId()
|
EPStatementListenerSet |
getStatementListenerSet()
|
java.lang.String |
getStatementName()
|
void |
indicate(UniformPair<EventBean[]> results)
Stores for dispatching the statement results. |
boolean |
isMakeNatural()
Returns true to indicate that natural events should be produced, for use in select expression processing. |
boolean |
isMakeSynthetic()
Returns true to indicate that synthetic events should be produced, for use in select expression processing. |
void |
processDispatch(UniformPair<EventBean[]> events)
Indicate an outbound result. |
void |
setContext(EPStatementSPI epStatement,
EPServiceProviderSPI epServiceProvider,
boolean isInsertInto,
boolean isPattern,
boolean isDistinct,
boolean isForClause,
StatementMetricHandle statementMetricHandle)
For initialization of the service to provide statement context. |
void |
setSelectClause(java.lang.Class[] selectClauseTypes,
java.lang.String[] selectClauseColumnNames,
boolean forClauseDelivery,
ExprEvaluator[] groupDeliveryExpressions,
ExprEvaluatorContext exprEvaluatorContext)
For initialize of the service providing select clause column types and names. |
void |
setUpdateListeners(EPStatementListenerSet updateListeners,
boolean isRecovery)
Indicate a change in update listener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.ThreadLocal<java.util.ArrayDeque<UniformPair<EventBean[]>>> lastResults
Constructor Detail |
---|
public StatementResultServiceImpl(java.lang.String statementName, StatementLifecycleSvc statementLifecycleSvc, MetricReportingServiceSPI metricReportingService, ThreadingService threadingService)
statementLifecycleSvc
- handles persistence for statementsmetricReportingService
- for metrics reportingthreadingService
- for outbound threadingMethod Detail |
---|
public void setContext(EPStatementSPI epStatement, EPServiceProviderSPI epServiceProvider, boolean isInsertInto, boolean isPattern, boolean isDistinct, boolean isForClause, StatementMetricHandle statementMetricHandle)
StatementResultService
setContext
in interface StatementResultService
epStatement
- the statementepServiceProvider
- the engine instanceisInsertInto
- true if this is insert intoisPattern
- true if this is a pattern statementisDistinct
- true if using distinctstatementMetricHandle
- handle for metrics reportingpublic void setSelectClause(java.lang.Class[] selectClauseTypes, java.lang.String[] selectClauseColumnNames, boolean forClauseDelivery, ExprEvaluator[] groupDeliveryExpressions, ExprEvaluatorContext exprEvaluatorContext)
StatementResultService
setSelectClause
in interface StatementResultService
selectClauseTypes
- types of columns in the select clauseselectClauseColumnNames
- column namespublic java.lang.String getStatementId()
getStatementId
in interface StatementResultService
public boolean isMakeSynthetic()
StatementResultService
isMakeSynthetic
in interface StatementResultService
public boolean isMakeNatural()
StatementResultService
isMakeNatural
in interface StatementResultService
public java.lang.String getStatementName()
getStatementName
in interface StatementResultService
public EPStatementListenerSet getStatementListenerSet()
getStatementListenerSet
in interface StatementResultService
public void setUpdateListeners(EPStatementListenerSet updateListeners, boolean isRecovery)
StatementResultService
setUpdateListeners
in interface StatementResultService
updateListeners
- is the new listeners and subscriberpublic void indicate(UniformPair<EventBean[]> results)
StatementResultService
indicate
in interface StatementResultService
results
- is the insert and remove stream datapublic void execute()
StatementResultService
execute
in interface StatementResultService
public void processDispatch(UniformPair<EventBean[]> events)
events
- to indicatepublic void dispatchOnStop()
dispatchOnStop
in interface StatementResultService
|
© 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 |