com.espertech.esper.core.service
Interface StatementResultService

All Known Implementing Classes:
StatementResultServiceImpl

public interface StatementResultService

Interface for a statement-level service for coordinating the insert/remove stream generation, native deliver to subscribers and the presence/absence of listener or subscribers to a statement.


Method Summary
 void dispatchOnStop()
          Dispatch the remaining results, if any, to listeners as the statement is about to be stopped.
 void execute()
          Execution of result indication.
 int 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 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.
 

Method Detail

setContext

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.

Parameters:
epStatement - the statement
epServiceProvider - the engine instance
isInsertInto - true if this is insert into
isPattern - true if this is a pattern statement
isDistinct - true if using distinct
statementMetricHandle - handle for metrics reporting

setSelectClause

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.

Parameters:
selectClauseTypes - types of columns in the select clause
selectClauseColumnNames - column names

isMakeSynthetic

boolean isMakeSynthetic()
Returns true to indicate that synthetic events should be produced, for use in select expression processing.

Returns:
true to produce synthetic events

isMakeNatural

boolean isMakeNatural()
Returns true to indicate that natural events should be produced, for use in select expression processing.

Returns:
true to produce natural (object[] column) events

dispatchOnStop

void dispatchOnStop()
Dispatch the remaining results, if any, to listeners as the statement is about to be stopped.


setUpdateListeners

void setUpdateListeners(EPStatementListenerSet updateListeners,
                        boolean isRecovery)
Indicate a change in update listener.

Parameters:
updateListeners - is the new listeners and subscriber

indicate

void indicate(UniformPair<EventBean[]> results)
Stores for dispatching the statement results.

Parameters:
results - is the insert and remove stream data

execute

void execute()
Execution of result indication.


getStatementName

java.lang.String getStatementName()

getStatementId

int getStatementId()

getStatementListenerSet

EPStatementListenerSet getStatementListenerSet()

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