com.espertech.esper.core
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.
 EventBean getLastIterableEvent()
          Returns the last iterable event, for use by patterns since these are not iterable.
 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, EPServiceProvider epServiceProvider, boolean isInsertInto, boolean isPattern)
          For initialization of the service to provide statement context.
 void setSelectClause(Class[] selectClauseTypes, String[] selectClauseColumnNames)
          For initialize of the service providing select clause column types and names.
 void setUpdateListeners(EPStatementListenerSet updateListeners)
          Indicate a change in update listener.
 

Method Detail

setContext

void setContext(EPStatementSPI epStatement,
                EPServiceProvider epServiceProvider,
                boolean isInsertInto,
                boolean isPattern)
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

setSelectClause

void setSelectClause(Class[] selectClauseTypes,
                     String[] selectClauseColumnNames)
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.


getLastIterableEvent

EventBean getLastIterableEvent()
Returns the last iterable event, for use by patterns since these are not iterable.

Returns:
last event

setUpdateListeners

void setUpdateListeners(EPStatementListenerSet updateListeners)
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.


© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com