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 Summary
Modifier and TypeFieldDescriptionprotected ThreadLocal<com.espertech.esper.common.internal.context.util.StatementDispatchTLEntry>
Buffer for holding dispatchable events.Fields inherited from interface com.espertech.esper.common.internal.context.util.StatementResultService
EPTYPE
-
Constructor Summary
ConstructorDescriptionStatementResultServiceImpl
(com.espertech.esper.common.internal.context.module.StatementInformationalsRuntime statementInformationals, EPServicesContext epServicesContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearDeliveriesRemoveStream
(com.espertech.esper.common.client.EventBean[] removedEvents) void
execute
(com.espertech.esper.common.internal.context.util.StatementDispatchTLEntry dispatchTLEntry) ThreadLocal<com.espertech.esper.common.internal.context.util.StatementDispatchTLEntry>
int
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) boolean
boolean
void
processDispatch
(com.espertech.esper.common.internal.collection.UniformPair<com.espertech.esper.common.client.EventBean[]> events) Indicate an outbound result.void
setContext
(EPStatementSPI epStatement, EPRuntimeSPI runtime) void
setSelectClause
(Class[] selectClauseTypes, String[] selectClauseColumnNames, boolean forClauseDelivery, com.espertech.esper.common.internal.epl.expression.core.ExprEvaluator groupDeliveryExpressions) void
setUpdateListeners
(EPStatementListenerSet updateListeners, boolean isRecovery)
-
Field Details
-
statementDispatchTL
protected ThreadLocal<com.espertech.esper.common.internal.context.util.StatementDispatchTLEntry> statementDispatchTLBuffer for holding dispatchable events.
-
-
Constructor Details
-
StatementResultServiceImpl
public StatementResultServiceImpl(com.espertech.esper.common.internal.context.module.StatementInformationalsRuntime statementInformationals, EPServicesContext epServicesContext)
-
-
Method Details
-
setContext
-
setSelectClause
-
getDispatchTL
public ThreadLocal<com.espertech.esper.common.internal.context.util.StatementDispatchTLEntry> getDispatchTL()- Specified by:
getDispatchTL
in interfacecom.espertech.esper.common.internal.context.util.StatementResultService
-
getStatementId
public int getStatementId() -
isMakeSynthetic
public boolean isMakeSynthetic()- Specified by:
isMakeSynthetic
in interfacecom.espertech.esper.common.internal.context.util.StatementResultService
-
isMakeNatural
public boolean isMakeNatural()- Specified by:
isMakeNatural
in interfacecom.espertech.esper.common.internal.context.util.StatementResultService
-
getStatementName
- Specified by:
getStatementName
in interfacecom.espertech.esper.common.internal.context.util.StatementResultService
-
getStatementListenerSet
-
setUpdateListeners
-
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 interfacecom.espertech.esper.common.internal.context.util.StatementResultService
-
execute
public void execute(com.espertech.esper.common.internal.context.util.StatementDispatchTLEntry dispatchTLEntry) - Specified by:
execute
in interfacecom.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 interfacecom.espertech.esper.common.internal.context.util.StatementResultService
-
getEpServicesContext
-