public class AggSvcGroupByRefcountedWAccessImpl extends AggregationServiceBaseGrouped
Constructor and Description |
---|
AggSvcGroupByRefcountedWAccessImpl(ExprEvaluator[] evaluators,
AggregationMethodFactory[] prototypes,
java.lang.Object groupKeyBinding,
MethodResolutionService methodResolutionService,
AggregationAccessorSlotPair[] accessors,
AggregationStateFactory[] accessAggregations,
boolean isJoin)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(AggregationServiceVisitor visitor) |
void |
acceptGroupDetail(AggregationServiceVisitorWGroupDetail visitor) |
void |
applyEnter(EventBean[] eventsPerStream,
java.lang.Object groupByKey,
ExprEvaluatorContext exprEvaluatorContext)
Apply events as entering a window (new events).
|
void |
applyLeave(EventBean[] eventsPerStream,
java.lang.Object groupByKey,
ExprEvaluatorContext exprEvaluatorContext)
Apply events as leaving a window (old events).
|
void |
clearResults(ExprEvaluatorContext exprEvaluatorContext)
Clear current aggregation state.
|
java.util.Collection<EventBean> |
getCollection(int column,
ExprEvaluatorContext context) |
EventBean |
getEventBean(int column,
ExprEvaluatorContext context) |
java.lang.Object |
getGroupKey(int agentInstanceId) |
java.util.Collection<java.lang.Object> |
getGroupKeys(ExprEvaluatorContext exprEvaluatorContext) |
java.lang.Object |
getValue(int column,
int agentInstanceId)
Returns current aggregation state, for use by expression node representing an aggregation function.
|
void |
internalHandleGroupRemove(java.lang.Object groupByKey) |
void |
internalHandleGroupUpdate(java.lang.Object groupByKey,
AggregationMethodPairRow row) |
boolean |
isGrouped() |
void |
setCurrentAccess(java.lang.Object groupByKey,
int agentInstanceId,
AggregationGroupByRollupLevel rollupLevel)
Set the current aggregation state row - for use when evaluation nodes are asked to evaluate.
|
void |
setRemovedCallback(AggregationRowRemovedCallback callback) |
public AggSvcGroupByRefcountedWAccessImpl(ExprEvaluator[] evaluators, AggregationMethodFactory[] prototypes, java.lang.Object groupKeyBinding, MethodResolutionService methodResolutionService, AggregationAccessorSlotPair[] accessors, AggregationStateFactory[] accessAggregations, boolean isJoin)
evaluators
- - evaluate the sub-expression within the aggregate function (ie. sum(4*myNum))prototypes
- - collect the aggregation state that evaluators evaluate to, act as prototypes for new aggregations
aggregation states for each groupmethodResolutionService
- - factory for creating additional aggregation method instances per group keyaccessors
- accessor definitionsaccessAggregations
- access aggsisJoin
- true for join, false for single-streampublic void clearResults(ExprEvaluatorContext exprEvaluatorContext)
AggregationService
public void applyEnter(EventBean[] eventsPerStream, java.lang.Object groupByKey, ExprEvaluatorContext exprEvaluatorContext)
AggregationService
eventsPerStream
- - events for each stream entering windowgroupByKey
- - 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 evaluatiompublic void applyLeave(EventBean[] eventsPerStream, java.lang.Object groupByKey, ExprEvaluatorContext exprEvaluatorContext)
AggregationService
eventsPerStream
- - events for each stream entering windowgroupByKey
- - 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 evaluatiompublic void setCurrentAccess(java.lang.Object groupByKey, int agentInstanceId, AggregationGroupByRollupLevel rollupLevel)
AggregationService
groupByKey
- - single key identifying the row of aggregation statesagentInstanceId
- context partition idpublic java.lang.Object getValue(int column, int agentInstanceId)
AggregationResultFuture
column
- is assigned to the aggregation expression node and passed as an column (index) into a rowagentInstanceId
- the context partition idpublic java.util.Collection<EventBean> getCollection(int column, ExprEvaluatorContext context)
public EventBean getEventBean(int column, ExprEvaluatorContext context)
public void setRemovedCallback(AggregationRowRemovedCallback callback)
public void internalHandleGroupUpdate(java.lang.Object groupByKey, AggregationMethodPairRow row)
public void internalHandleGroupRemove(java.lang.Object groupByKey)
public void accept(AggregationServiceVisitor visitor)
public void acceptGroupDetail(AggregationServiceVisitorWGroupDetail visitor)
public boolean isGrouped()
public java.lang.Object getGroupKey(int agentInstanceId)
public java.util.Collection<java.lang.Object> getGroupKeys(ExprEvaluatorContext exprEvaluatorContext)