Class AggSvcGroupAllWTableImpl
java.lang.Object
com.espertech.esper.common.internal.epl.agg.table.AggSvcGroupAllWTableImpl
- All Implemented Interfaces:
AggregationResultFuture
,AggregationService
,AggregationServiceTable
,StopCallback
public class AggSvcGroupAllWTableImpl
extends Object
implements AggregationService, AggregationServiceTable
Implementation for handling aggregation without any grouping (no group-by).
-
Field Summary
Fields inherited from interface com.espertech.esper.common.internal.epl.agg.core.AggregationService
EPTYPE
-
Constructor Summary
ConstructorDescriptionAggSvcGroupAllWTableImpl
(TableInstanceUngrouped tableInstance, TableColumnMethodPairEval[] methodPairs, AggregationMultiFunctionAgent[] accessAgents, int[] accessColumnsZeroOffset) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(AggregationServiceVisitor visitor) void
void
applyEnter
(EventBean[] eventsPerStream, Object optionalGroupKeyPerRow, ExprEvaluatorContext exprEvaluatorContext) Apply events as entering a window (new events).void
applyLeave
(EventBean[] eventsPerStream, Object optionalGroupKeyPerRow, ExprEvaluatorContext exprEvaluatorContext) Apply events as leaving a window (old events).void
clearResults
(ExprEvaluatorContext exprEvaluatorContext) Clear current aggregation state.getAggregationRow
(int agentInstanceId, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext) getCollectionOfEvents
(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) getCollectionScalar
(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) getContextPartitionAggregationService
(int agentInstanceId) getEventBean
(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) getGroupKey
(int agentInstanceId) getGroupKeys
(ExprEvaluatorContext exprEvaluatorContext) getValue
(int column, int agentInstanceId, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext) boolean
void
setCurrentAccess
(Object groupKey, int agentInstanceId, AggregationGroupByRollupLevel rollupLevel) Set the current aggregation state row - for use when evaluation nodes are asked to evaluate.void
void
stop()
Stops the underlying resources.
-
Constructor Details
-
AggSvcGroupAllWTableImpl
public AggSvcGroupAllWTableImpl(TableInstanceUngrouped tableInstance, TableColumnMethodPairEval[] methodPairs, AggregationMultiFunctionAgent[] accessAgents, int[] accessColumnsZeroOffset)
-
-
Method Details
-
applyEnter
public void applyEnter(EventBean[] eventsPerStream, Object optionalGroupKeyPerRow, ExprEvaluatorContext exprEvaluatorContext) Description copied from interface:AggregationService
Apply events as entering a window (new events).- Specified by:
applyEnter
in interfaceAggregationService
- Parameters:
eventsPerStream
- - events for each stream entering windowoptionalGroupKeyPerRow
- - can be null if grouping without keys is desired, else the keys or array of keys to use for grouping, each distinct key value results in a new row of aggregation state.exprEvaluatorContext
- context for expression evaluatiom
-
applyLeave
public void applyLeave(EventBean[] eventsPerStream, Object optionalGroupKeyPerRow, ExprEvaluatorContext exprEvaluatorContext) Description copied from interface:AggregationService
Apply events as leaving a window (old events).- Specified by:
applyLeave
in interfaceAggregationService
- Parameters:
eventsPerStream
- - events for each stream entering windowoptionalGroupKeyPerRow
- - can be null if grouping without keys is desired, else the keys or array of keys to use for grouping, each distinct key value results in a new row of aggregation state.exprEvaluatorContext
- context for expression evaluatiom
-
setCurrentAccess
public void setCurrentAccess(Object groupKey, int agentInstanceId, AggregationGroupByRollupLevel rollupLevel) Description copied from interface:AggregationResultFuture
Set the current aggregation state row - for use when evaluation nodes are asked to evaluate.- Specified by:
setCurrentAccess
in interfaceAggregationResultFuture
- Parameters:
groupKey
- - single key identifying the row of aggregation statesagentInstanceId
- context partition idrollupLevel
- rollup level
-
getValue
public Object getValue(int column, int agentInstanceId, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext) - Specified by:
getValue
in interfaceAggregationResultFuture
-
getCollectionOfEvents
public Collection<EventBean> getCollectionOfEvents(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) - Specified by:
getCollectionOfEvents
in interfaceAggregationResultFuture
-
getCollectionScalar
public Collection<Object> getCollectionScalar(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) - Specified by:
getCollectionScalar
in interfaceAggregationResultFuture
-
getEventBean
public EventBean getEventBean(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) - Specified by:
getEventBean
in interfaceAggregationResultFuture
-
clearResults
Description copied from interface:AggregationService
Clear current aggregation state.- Specified by:
clearResults
in interfaceAggregationService
- Parameters:
exprEvaluatorContext
- context
-
setRemovedCallback
- Specified by:
setRemovedCallback
in interfaceAggregationService
-
accept
- Specified by:
accept
in interfaceAggregationService
-
acceptGroupDetail
- Specified by:
acceptGroupDetail
in interfaceAggregationService
-
isGrouped
public boolean isGrouped()- Specified by:
isGrouped
in interfaceAggregationService
-
getGroupKey
- Specified by:
getGroupKey
in interfaceAggregationResultFuture
-
getGroupKeys
- Specified by:
getGroupKeys
in interfaceAggregationResultFuture
-
stop
public void stop()Description copied from interface:StopCallback
Stops the underlying resources.- Specified by:
stop
in interfaceStopCallback
-
getContextPartitionAggregationService
- Specified by:
getContextPartitionAggregationService
in interfaceAggregationResultFuture
-
getTableInstance
- Specified by:
getTableInstance
in interfaceAggregationServiceTable
-
getAggregationRow
public AggregationRow getAggregationRow(int agentInstanceId, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext) - Specified by:
getAggregationRow
in interfaceAggregationResultFuture
-