Class AIRegistryAggregationSingle
java.lang.Object
com.espertech.esper.common.internal.context.airegistry.AIRegistryAggregationSingle
- All Implemented Interfaces:
AIRegistryAggregation
,AggregationResultFuture
,AggregationService
,StopCallback
public class AIRegistryAggregationSingle
extends Object
implements AIRegistryAggregation, AggregationService
-
Field Summary
Fields inherited from interface com.espertech.esper.common.internal.epl.agg.core.AggregationService
EPTYPE
-
Constructor Summary
-
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
assignService
(int serviceId, AggregationService aggregationService) void
clearResults
(ExprEvaluatorContext exprEvaluatorContext) Clear current aggregation state.void
deassignService
(int serviceId) getAggregationRow
(int agentInstanceId, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) 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) int
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
-
AIRegistryAggregationSingle
public AIRegistryAggregationSingle()
-
-
Method Details
-
assignService
- Specified by:
assignService
in interfaceAIRegistryAggregation
-
deassignService
public void deassignService(int serviceId) - Specified by:
deassignService
in interfaceAIRegistryAggregation
-
getInstanceCount
public int getInstanceCount()- Specified by:
getInstanceCount
in interfaceAIRegistryAggregation
-
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
-
clearResults
Description copied from interface:AggregationService
Clear current aggregation state.- Specified by:
clearResults
in interfaceAggregationService
- Parameters:
exprEvaluatorContext
- context
-
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
-
getAggregationRow
public AggregationRow getAggregationRow(int agentInstanceId, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) - Specified by:
getAggregationRow
in interfaceAggregationResultFuture
-
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
-
getContextPartitionAggregationService
- Specified by:
getContextPartitionAggregationService
in interfaceAggregationResultFuture
-
stop
public void stop()Description copied from interface:StopCallback
Stops the underlying resources.- Specified by:
stop
in interfaceStopCallback
-