Class StatementResultServiceImpl

java.lang.Object
com.espertech.esper.runtime.internal.kernel.service.StatementResultServiceImpl
All Implemented Interfaces:
com.espertech.esper.common.internal.context.util.StatementResultService

public class StatementResultServiceImpl extends Object implements com.espertech.esper.common.internal.context.util.StatementResultService
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 Details

    • statementDispatchTL

      protected ThreadLocal<com.espertech.esper.common.internal.context.util.StatementDispatchTLEntry> statementDispatchTL
      Buffer for holding dispatchable events.
  • Constructor Details

    • StatementResultServiceImpl

      public StatementResultServiceImpl(com.espertech.esper.common.internal.context.module.StatementInformationalsRuntime statementInformationals, EPServicesContext epServicesContext)
  • Method Details

    • setContext

      public void setContext(EPStatementSPI epStatement, EPRuntimeSPI runtime)
    • setSelectClause

      public void setSelectClause(Class[] selectClauseTypes, String[] selectClauseColumnNames, boolean forClauseDelivery, com.espertech.esper.common.internal.epl.expression.core.ExprEvaluator groupDeliveryExpressions)
    • getDispatchTL

      public ThreadLocal<com.espertech.esper.common.internal.context.util.StatementDispatchTLEntry> getDispatchTL()
      Specified by:
      getDispatchTL in interface com.espertech.esper.common.internal.context.util.StatementResultService
    • getStatementId

      public int getStatementId()
    • isMakeSynthetic

      public boolean isMakeSynthetic()
      Specified by:
      isMakeSynthetic in interface com.espertech.esper.common.internal.context.util.StatementResultService
    • isMakeNatural

      public boolean isMakeNatural()
      Specified by:
      isMakeNatural in interface com.espertech.esper.common.internal.context.util.StatementResultService
    • getStatementName

      public String getStatementName()
      Specified by:
      getStatementName in interface com.espertech.esper.common.internal.context.util.StatementResultService
    • getStatementListenerSet

      public EPStatementListenerSet getStatementListenerSet()
    • setUpdateListeners

      public void setUpdateListeners(EPStatementListenerSet updateListeners, boolean isRecovery)
    • indicate

      public void indicate(com.espertech.esper.common.internal.collection.UniformPair<com.espertech.esper.common.client.EventBean[]> results, com.espertech.esper.common.internal.context.util.StatementDispatchTLEntry dispatchTLEntry)
      Specified by:
      indicate in interface com.espertech.esper.common.internal.context.util.StatementResultService
    • execute

      public void execute(com.espertech.esper.common.internal.context.util.StatementDispatchTLEntry dispatchTLEntry)
      Specified by:
      execute in interface com.espertech.esper.common.internal.context.util.StatementResultService
    • processDispatch

      public void processDispatch(com.espertech.esper.common.internal.collection.UniformPair<com.espertech.esper.common.client.EventBean[]> events)
      Indicate an outbound result.
      Parameters:
      events - to indicate
    • clearDeliveriesRemoveStream

      public void clearDeliveriesRemoveStream(com.espertech.esper.common.client.EventBean[] removedEvents)
      Specified by:
      clearDeliveriesRemoveStream in interface com.espertech.esper.common.internal.context.util.StatementResultService
    • getEpServicesContext

      public EPServicesContext getEpServicesContext()